From 2aa73d10349f8ddd5f023758fa0558fd4c1fb361 Mon Sep 17 00:00:00 2001 From: Deokhyun Kim Date: Wed, 25 Mar 2020 17:06:48 +0900 Subject: [PATCH] Specify the sender(org.bluez or org.bluez.obex) on subscribe to receive only necessary PropertiesChanged signals. Change-Id: I2ccbf14553bd5bb643d393056f0fd757e9a9bbed Signed-off-by: Deokhyun Kim --- bt-otp/bt-otpserver.c | 2 +- .../services/ipsp/bt-service-ipsp-event-receiver.c | 2 +- .../services/obex/bt-service-obex-event-receiver.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bt-otp/bt-otpserver.c b/bt-otp/bt-otpserver.c index ae40cef..81d915c 100644 --- a/bt-otp/bt-otpserver.c +++ b/bt-otp/bt-otpserver.c @@ -2173,7 +2173,7 @@ int _bt_otp_init_event_receiver() NULL, NULL); device_property_sub_id = g_dbus_connection_signal_subscribe(conn, - NULL, BT_PROPERTIES_INTERFACE, + BT_BLUEZ_NAME, BT_PROPERTIES_INTERFACE, PROPERTIES_CHANGED, NULL, NULL, 0, _bt_otp_device_property_event_filter, NULL, NULL); diff --git a/bt-service-adaptation/services/ipsp/bt-service-ipsp-event-receiver.c b/bt-service-adaptation/services/ipsp/bt-service-ipsp-event-receiver.c index 51629b9..521cb58 100644 --- a/bt-service-adaptation/services/ipsp/bt-service-ipsp-event-receiver.c +++ b/bt-service-adaptation/services/ipsp/bt-service-ipsp-event-receiver.c @@ -234,7 +234,7 @@ int _bt_register_ipsp_subscribe_signal(GDBusConnection *conn, } if (subs_property_id == -1) { subs_property_id = g_dbus_connection_signal_subscribe(conn, - NULL, BT_PROPERTIES_INTERFACE, + BT_BLUEZ_NAME, BT_PROPERTIES_INTERFACE, BT_PROPERTIES_CHANGED, NULL, NULL, 0, __bt_manager_event_filter, NULL, NULL); diff --git a/bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c b/bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c index e89832e..8d25d57 100644 --- a/bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c +++ b/bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c @@ -968,7 +968,7 @@ int _bt_register_opp_server_subscribe_signal(GDBusConnection *conn, } if (subs_opp_server_property_id == -1) { subs_opp_server_property_id = g_dbus_connection_signal_subscribe(conn, - NULL, BT_PROPERTIES_INTERFACE, + BT_OBEX_SERVICE_NAME, BT_PROPERTIES_INTERFACE, BT_PROPERTIES_CHANGED, NULL, NULL, 0, __bt_obexd_event_filter, NULL, NULL); @@ -1021,7 +1021,7 @@ int _bt_register_opp_client_subscribe_signal(GDBusConnection *conn, } if (subs_opp_client_property_id == -1) { subs_opp_client_property_id = g_dbus_connection_signal_subscribe(conn, - NULL, BT_PROPERTIES_INTERFACE, + BT_OBEX_SERVICE_NAME, BT_PROPERTIES_INTERFACE, BT_PROPERTIES_CHANGED, NULL, NULL, 0, __bt_opc_event_filter, NULL, NULL); @@ -1074,7 +1074,7 @@ int _bt_register_map_client_subscribe_signal(GDBusConnection *conn, } if (subs_map_client_property_id == -1) { subs_map_client_property_id = g_dbus_connection_signal_subscribe(conn, - NULL, BT_PROPERTIES_INTERFACE, + BT_OBEX_SERVICE_NAME, BT_PROPERTIES_INTERFACE, BT_PROPERTIES_CHANGED, NULL, NULL, 0, __bt_map_event_filter, NULL, NULL); -- 2.7.4