[CodeClean] unnecessary header
authorJaeyun Jung <jy1210.jung@samsung.com>
Thu, 2 Jan 2025 01:29:56 +0000 (10:29 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 2 Jan 2025 02:27:11 +0000 (11:27 +0900)
Code clean, remove unnecessary header and print log for custom connection.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
src/libnnstreamer-edge/nnstreamer-edge-internal.c

index 862905b08da449461661460e5460d4e67e396b1c..7adf0610f0fc5e8cbfa65e7d494c2683bd804151 100644 (file)
@@ -13,7 +13,6 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <poll.h>
-#include <dlfcn.h>
 
 #include "nnstreamer-edge-data.h"
 #include "nnstreamer-edge-event.h"
@@ -1579,7 +1578,10 @@ nns_edge_release_handle (nns_edge_h edge_h)
       }
       break;
     case NNS_EDGE_CONNECT_TYPE_CUSTOM:
-      nns_edge_custom_release (&eh->custom);
+      if (nns_edge_custom_release (&eh->custom) !=
+          NNS_EDGE_ERROR_NONE) {
+        nns_edge_logw ("Failed to close custom connection.");
+      }
       break;
     default:
       break;
@@ -2041,7 +2043,10 @@ nns_edge_set_info (nns_edge_h edge_h, const char *key, const char *value)
   if (ret == NNS_EDGE_ERROR_NONE &&
       NNS_EDGE_CONNECT_TYPE_CUSTOM == eh->connect_type) {
     /* Pass value to custom library and ignore error. */
-    nns_edge_custom_set_info (&eh->custom, key, value);
+    if (nns_edge_custom_set_info (&eh->custom, key, value) !=
+        NNS_EDGE_ERROR_NONE) {
+      nns_edge_logw ("Failed to set info '%s' in custom connection.", key);
+    }
   }
 
   nns_edge_unlock (eh);