Modify gdbus proxy flag to G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES 73/193473/2
authorWootak Jung <wootak.jung@samsung.com>
Wed, 21 Nov 2018 05:52:02 +0000 (14:52 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 10 Dec 2018 00:11:02 +0000 (00:11 +0000)
G_DBUS_PROXY_FLAGS_NONE causes some unnecessary error log

Change-Id: I8be66086d58431bb9894f30d7cbddc4f3ac76a63

bt-api/bt-audio.c
bt-api/bt-common.c
bt-api/bt-event-handler.c
bt-api/bt-gatt-client.c
bt-api/bt-gatt-service.c
bt-api/bt-hid-device.c
bt-api/bt-request-sender.c
bt-api/bt-telephony.c

index 9aa5011..e890624 100644 (file)
@@ -510,7 +510,7 @@ static GVariant* __bt_hf_agent_dbus_send(const char *path, const char *interface
        conn = _bt_gdbus_get_system_gconn();
        retv_if(conn == NULL, NULL);
 
-       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                NULL, BT_HF_SERVICE_NAME, path, interface, NULL, err);
        if (proxy == NULL) {
                BT_ERR("Unable to allocate new proxy");
index cee9744..6992b7c 100644 (file)
@@ -907,7 +907,7 @@ static GDBusProxy *__bt_gdbus_get_profile_proxy(void)
        if (gconn == NULL)
                return NULL;
 
-       profile_gproxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_NONE,
+       profile_gproxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                                NULL, BT_BLUEZ_NAME,
                                                "/org/bluez",
                                                "org.bluez.ProfileManager1",
@@ -931,7 +931,7 @@ static GDBusProxy *__bt_gdbus_get_device_proxy(char *object_path)
        if (gconn == NULL)
                return NULL;
 
-       device_gproxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_NONE,
+       device_gproxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                                NULL, BT_BLUEZ_NAME,
                                                object_path,
                                                BT_DEVICE_INTERFACE,
@@ -1001,7 +1001,7 @@ static GDBusProxy * __bt_gdbus_get_adapter_proxy()
        retv_if(conn == NULL, NULL);
 
        manager_proxy =  g_dbus_proxy_new_sync(conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        BT_MANAGER_PATH,
                        BT_MANAGER_INTERFACE,
@@ -1039,7 +1039,7 @@ static GDBusProxy * __bt_gdbus_get_adapter_proxy()
        BT_INFO("Adapter Path %s", adapter_path);
 
        adapter_proxy = g_dbus_proxy_new_sync(conn,
-                                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                        BT_BLUEZ_NAME,
                                        adapter_path,
                                        BT_ADAPTER_INTERFACE,
@@ -1529,7 +1529,7 @@ int _bt_discover_service_uuids(char *address, char *remote_uuid)
        object_path = _bt_get_device_object_path(address);
        retv_if(object_path == NULL, BLUETOOTH_ERROR_INTERNAL);
 
-       proxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+       proxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                BT_BLUEZ_NAME, object_path, BT_PROPERTIES_INTERFACE, NULL,
                                &err);
        g_free(object_path);
@@ -1600,7 +1600,7 @@ int _bt_get_cod_by_address(char *address, bluetooth_device_class_t *dev_class)
        object_path = _bt_get_device_object_path(address);
        retv_if(object_path == NULL, BLUETOOTH_ERROR_INTERNAL);
 
-       proxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+       proxy = g_dbus_proxy_new_sync(gconn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                BT_BLUEZ_NAME, object_path, BT_PROPERTIES_INTERFACE, NULL,
                                &err);
        if (proxy == NULL) {
@@ -1716,7 +1716,7 @@ int _bt_get_adapter_path(GDBusConnection *conn, char *path)
        retv_if(conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        manager_proxy =  g_dbus_proxy_new_sync(conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        BT_MANAGER_PATH,
                        BT_MANAGER_INTERFACE,
@@ -1854,7 +1854,7 @@ char *_bt_get_device_object_path(char *address)
        retv_if(conn == NULL, NULL);
 
        proxy =  g_dbus_proxy_new_sync(conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        BT_MANAGER_PATH,
                        BT_MANAGER_INTERFACE,
@@ -1986,7 +1986,7 @@ GVariant *_bt_get_managed_objects(void)
        retv_if(g_conn == NULL, NULL);
 
        manager_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        BT_MANAGER_PATH,
                        BT_MANAGER_INTERFACE,
index d79bebc..99476d7 100644 (file)
@@ -4161,7 +4161,7 @@ static void __bt_gatt_get_uuid_from_path(char *path, char **service_uuid)
        ret_if(g_conn == NULL);
 
        proxy = g_dbus_proxy_new_sync(g_conn,
-                               G_DBUS_PROXY_FLAGS_NONE, NULL,
+                               G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                BT_BLUEZ_NAME,
                                path,
                                BT_PROPERTIES_INTERFACE,
index 87819c4..929c4a0 100755 (executable)
@@ -227,7 +227,7 @@ BT_EXPORT_API int bluetooth_gatt_get_service_property(const char *service_handle
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        service_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -534,7 +534,7 @@ BT_EXPORT_API int bluetooth_gatt_discover_service_characteristics(
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        service_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -658,7 +658,7 @@ BT_EXPORT_API int bluetooth_gatt_get_characteristics_property(
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        char_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -823,7 +823,7 @@ BT_EXPORT_API int bluetooth_gatt_get_char_from_uuid(const char *service_handle,
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        service_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -869,7 +869,7 @@ BT_EXPORT_API int bluetooth_gatt_get_char_descriptor_property(
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        descriptor_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -1329,7 +1329,7 @@ static int __bluetooth_gatt_descriptor_iter(const char *char_handle,
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        char_handle,
                        BT_PROPERTIES_INTERFACE,
@@ -1494,7 +1494,7 @@ BT_EXPORT_API int bluetooth_gatt_discover_characteristic_descriptor(
        retv_if(g_conn == NULL, BLUETOOTH_ERROR_INTERNAL);
 
        properties_proxy = g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_BLUEZ_NAME,
                        characteristic_handle,
                        BT_PROPERTIES_INTERFACE,
index b912965..3670f20 100644 (file)
@@ -1524,7 +1524,7 @@ static GDBusProxy *__bt_gatt_gdbus_init_manager_proxy(const gchar *service,
        }
 
        proxy =  g_dbus_proxy_new_sync(g_conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        service, path,
                        interface, NULL, &err);
 
index cfbb33c..3c3cbdd 100644 (file)
@@ -100,7 +100,7 @@ static GVariant* __bt_hid_agent_dbus_send(const char *path,
        conn = _bt_gdbus_get_system_gconn();
        retv_if(conn == NULL, NULL);
 
-       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                NULL, BT_HID_SERVICE_NAME, path, interface, NULL, err);
        if (proxy == NULL) {
                BT_ERR("Unable to allocate new proxy");
@@ -488,7 +488,7 @@ int _bt_hid_device_get_fd(const char *address, int *ctrl, int *intr)
        adapter_path = _bt_get_device_object_path((char *)address);
        retv_if(adapter_path == NULL, BLUETOOTH_ERROR_INTERNAL);
        BT_INFO_C("Device : %s", adapter_path);
-       server_proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+       server_proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                        NULL, BT_BLUEZ_NAME,
                        adapter_path, "org.bluez.Input1",  NULL, NULL);
        g_free(adapter_path);
index ae3af3f..546711b 100644 (file)
@@ -50,7 +50,7 @@ static GDBusProxy *__bt_gdbus_init_service_proxy(void)
                return NULL;
 
        proxy =  g_dbus_proxy_new_sync(service_gconn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_DBUS_NAME,
                        BT_SERVICE_PATH,
                        BT_DBUS_NAME,
index c1274f4..673e787 100644 (file)
@@ -320,7 +320,7 @@ static GVariant *__bluetooth_telephony_dbus_method_send(const char *path,
        conn = telephony_dbus_info.conn;
        retv_if(conn == NULL, NULL);
 
-       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
+       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                        NULL, HFP_AGENT_SERVICE, path, interface, NULL, err);
        if (proxy == NULL) {
                BT_ERR("Unable to allocate new proxy");
@@ -928,7 +928,7 @@ static int __bluetooth_telephony_get_connected_device(void)
        retv_if(conn == NULL, BLUETOOTH_TELEPHONY_ERROR_INTERNAL);
 
        manager_proxy = g_dbus_proxy_new_sync(
-                       conn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BLUEZ_SERVICE_NAME, "/",
                        BLUEZ_MANAGER_INTERFACE, NULL, &error);
        if (manager_proxy == NULL) {
@@ -982,7 +982,7 @@ static int __bluetooth_telephony_get_connected_device(void)
                        g_variant_unref(path_values); /* path_values unused*/
 
                        proxy = g_dbus_proxy_new_sync(telephony_dbus_info.conn,
-                                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                        BLUEZ_SERVICE_NAME, object_path,
                                        BLUEZ_PROPERTIES_INTERFACE, NULL, &error);
                        if (proxy == NULL) {
@@ -1050,7 +1050,7 @@ static int __bluetooth_telephony_get_connected_device(void)
 
                        /* this is headset; Check for Connection */
                        headset_agent_proxy = g_dbus_proxy_new_sync(telephony_dbus_info.conn,
-                                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                                        HFP_AGENT_SERVICE, object_path,
                                        HFP_AGENT_INTERFACE, NULL, &error);
                        if (headset_agent_proxy == NULL) {
@@ -1151,7 +1151,7 @@ static GDBusProxy *__bluetooth_telephony_get_connected_device_proxy(void)
                return NULL;
 
        proxy = g_dbus_proxy_new_sync(telephony_dbus_info.conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        HFP_AGENT_SERVICE, HFP_AGENT_PATH,
                        HFP_AGENT_INTERFACE, NULL, &error);
        if (proxy == NULL) {
@@ -1329,7 +1329,7 @@ BT_EXPORT_API int bluetooth_telephony_init(bt_telephony_func_ptr cb,
 
        telephony_dbus_info.manager_proxy = g_dbus_proxy_new_sync(
                        telephony_dbus_info.conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BLUEZ_SERVICE_NAME, "/",
                        BLUEZ_MANAGER_INTERFACE, NULL, &error);
        if (telephony_dbus_info.manager_proxy == NULL) {
@@ -1349,7 +1349,7 @@ BT_EXPORT_API int bluetooth_telephony_init(bt_telephony_func_ptr cb,
 
        telephony_dbus_info.dbus_proxy = g_dbus_proxy_new_sync(
                        telephony_dbus_info.conn,
-                       G_DBUS_PROXY_FLAGS_NONE, NULL,
+                       G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        BT_EVENT_FREEDESKTOP, BT_FREEDESKTOP_PATH,
                        BT_EVENT_FREEDESKTOP, NULL, &error);
        if (NULL == telephony_dbus_info.dbus_proxy) {
@@ -1758,7 +1758,7 @@ BT_EXPORT_API int bluetooth_telephony_audio_open(void)
        if (telephony_info.headset_state == BLUETOOTH_STATE_PLAYING)
                return BLUETOOTH_TELEPHONY_ERROR_ALREADY_CONNECTED;
 
-       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        HFP_AGENT_SERVICE, HFP_AGENT_PATH,
                        HFP_AGENT_INTERFACE, NULL, &err);
        if (proxy == NULL) {
@@ -1831,7 +1831,7 @@ BT_EXPORT_API int bluetooth_telephony_audio_close(void)
        if (telephony_info.headset_state != BLUETOOTH_STATE_PLAYING)
                return BLUETOOTH_TELEPHONY_ERROR_NOT_CONNECTED;
 
-       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE, NULL,
+       proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, NULL,
                        HFP_AGENT_SERVICE, HFP_AGENT_PATH,
                        HFP_AGENT_INTERFACE, NULL, &err);
        if (proxy == NULL) {