diff options
author | ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com> | 2017-11-02 16:50:32 +0900 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2017-11-02 13:18:19 +0200 |
commit | 8221f8336c98ad60e73565de38a621c7aed6df63 (patch) | |
tree | b37fe5c46df41945f29affe80319f4b99d55703b /client/advertising.c | |
parent | d3974659e3f712955f555c31140293890cea0022 (diff) | |
download | bluez-8221f8336c98ad60e73565de38a621c7aed6df63.tar.gz |
client: Clear ad manufacturer/service data when too much data
When data is too much, the data may include values not making sense, so
this patch clears the advertising manufacturer/service data corresponding
to the running command.
Diffstat (limited to 'client/advertising.c')
-rw-r--r-- | client/advertising.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/advertising.c b/client/advertising.c index 76eda3c97..e950aa278 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -456,6 +456,7 @@ void ad_advertise_service(DBusConnection *conn, const char *arg) if (i >= G_N_ELEMENTS(data->data)) { rl_printf("Too much data\n"); + ad_clear_service(); goto done; } @@ -511,6 +512,7 @@ void ad_advertise_manufacturer(DBusConnection *conn, const char *arg) for (i = 1; i < w.we_wordc; i++) { if (i >= G_N_ELEMENTS(data->data)) { rl_printf("Too much data\n"); + ad_clear_manufacturer(); goto done; } |