From da5ce30f84bc4796014d823ca37571855cfb1c60 Mon Sep 17 00:00:00 2001 From: ERAMOTO Masaya Date: Fri, 16 Feb 2018 14:51:15 +0900 Subject: [PATCH] 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 ..... Change-Id: I1e8f6f19adbbd967b2ddc06837ddf7103ea18167 Signed-off-by: Amit Purwar --- client/advertising.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/advertising.c b/client/advertising.c index 76a154c..7ebd40d 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -554,6 +554,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; -- 2.7.4