aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-map-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/bluetooth-map-api.c')
-rw-r--r--binding/bluetooth-map-api.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/binding/bluetooth-map-api.c b/binding/bluetooth-map-api.c
index 7874181..b0a97d7 100644
--- a/binding/bluetooth-map-api.c
+++ b/binding/bluetooth-map-api.c
@@ -654,7 +654,17 @@ static void bluez_map_signal_callback(
if (!map_notification_check(var))
return;
+ /* Some messaging applications send out
+ * notifications on startup, even if already
+ * sent
+ */
+ if (g_hash_table_contains(ns->already_notified, path))
+ return;
+
map_request_message(ns, path);
+
+ g_hash_table_insert(ns->already_notified, g_strdup(path), NULL);
+
continue;
}
@@ -790,6 +800,7 @@ static struct map_state *map_init(GMainLoop *loop)
}
ns->xfer_queue = g_hash_table_new(g_str_hash, g_str_equal);
+ ns->already_notified = g_hash_table_new(g_str_hash, g_str_equal);
ns->message_sub = g_dbus_connection_signal_subscribe(
ns->conn,
BLUEZ_OBEX_SERVICE,