summaryrefslogtreecommitdiff
path: root/client/advertising.c
diff options
context:
space:
mode:
authorERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>2018-02-16 14:51:15 +0900
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-02-19 12:21:11 +0200
commit3df943537a92eb116e861705594848e53e2d2bc0 (patch)
treec0bbc365b038286769acbd4fef5e9838e8eb870e /client/advertising.c
parent7c6d0647ee41fc5d464369e50d8e5e04a62ff5f6 (diff)
downloadbluez-3df943537a92eb116e861705594848e53e2d2bc0.tar.gz
client: Fix data growth if reconfiguring ad service
Since commit 65eff5c2 ("client: Rename set-service to service"), data are appended in every run of advertise service with data arguments as below: [bluetooth]# service 1 1 2 [bluetooth]# service UUID: SDP(1) 01 02 .. [bluetooth]# service 1 1 2 3 [bluetooth]# service UUID: SDP(1) 01 02 01 02 03 .....
Diffstat (limited to 'client/advertising.c')
-rw-r--r--client/advertising.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/advertising.c b/client/advertising.c
index e500a2e86..f1b08c0b6 100644
--- a/client/advertising.c
+++ b/client/advertising.c
@@ -549,6 +549,8 @@ void ad_advertise_service(DBusConnection *conn, int argc, char *argv[])
return;
}
+ ad_clear_service();
+
ad.service.uuid = g_strdup(argv[1]);
data = &ad.service.data;