diff options
author | Troels Dalsgaard Hoffmeyer <troels.d.hoffmeyer@gmail.com> | 2019-04-30 13:51:47 +0200 |
---|---|---|
committer | himanshu <h.himanshu@samsung.com> | 2020-02-11 14:27:47 +0530 |
commit | 43a2b3a6301b5b7feecb5ec51f4deed2904bdf81 (patch) | |
tree | d0e442b50c854e293efa7104a57cfa7f8514dfec /src | |
parent | ddba95613d76c8ad877e579d2c35bd0f76f3c6c0 (diff) | |
download | bluez-43a2b3a6301b5b7feecb5ec51f4deed2904bdf81.tar.gz bluez-43a2b3a6301b5b7feecb5ec51f4deed2904bdf81.tar.bz2 bluez-43a2b3a6301b5b7feecb5ec51f4deed2904bdf81.zip |
advertising: Timeout of 0 should not fire a callback
Setting a timeout of 0 on an advertisement should let the
advertisement run forever. The client was released
immediately after, although the advertisement was still in the air.
Change-Id: I4916bd36d3a12d5d35ab20c9d356e49e17af94fa
Signed-off-by: himanshu <h.himanshu@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/advertising.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/advertising.c b/src/advertising.c index 89831bcb..27cbad69 100644 --- a/src/advertising.c +++ b/src/advertising.c @@ -582,8 +582,9 @@ static bool parse_timeout(DBusMessageIter *iter, if (client->to_id) g_source_remove(client->to_id); - client->to_id = g_timeout_add_seconds(client->timeout, client_timeout, - client); + if (client->timeout > 0) + client->to_id = g_timeout_add_seconds(client->timeout, + client_timeout, client); return true; } |