Fix synchronous scan method
authorJiwan Kim <ji-wan.kim@samsung.com>
Fri, 26 May 2017 08:00:26 +0000 (17:00 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 17 Jul 2017 02:35:36 +0000 (11:35 +0900)
src/mesh-gdbus.c

index 255e7fd..7b6a2d4 100644 (file)
@@ -362,26 +362,18 @@ int mesh_ipc_remove_mesh_interface(mesh_service *service)
 
 int mesh_ipc_mesh_scan(mesh_service *service)
 {
-       GVariant *variant = NULL;
-       GError *error = NULL;
-
        meshd_check_null_ret_error("service", service, MESHD_ERROR_INVALID_PARAMETER);
        meshd_check_null_ret_error("connection", service->connection,
                        MESHD_ERROR_INVALID_PARAMETER);
        meshd_check_null_ret_error("_gproxy_connman_technology",
                        _gproxy_connman_technology, MESHD_ERROR_IO_ERROR);
 
-       variant = g_dbus_proxy_call_sync(_gproxy_connman_technology, "Scan",
+       g_dbus_proxy_call(_gproxy_connman_technology, "Scan",
                                NULL,
                                G_DBUS_CALL_FLAGS_NONE,
-                               -1, NULL, &error);
-       if (variant) {
-               MESH_LOGD("Successfully requested. [Scan]");
-       } else if (error) {
-               MESH_LOGE("Failed DBus call [%s]", error->message);
-               g_error_free(error);
-               return MESHD_ERROR_IO_ERROR;
-       }
+                               -1, NULL, NULL, NULL);
+
+       MESH_LOGD("Successfully requested. [Scan]");
 
        return MESHD_ERROR_NONE;
 }