From: Troels Dalsgaard Hoffmeyer <troels.d.hoffmeyer@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Troels Dalsgaard Hoffmeyer <troels.d.hoffmeyer@gmail.com>
Subject: [PATCH Bluez 1/1] advertising: Timeout of 0 should not fire a callback
Date: Tue, 30 Apr 2019 13:51:47 +0200 [thread overview]
Message-ID: <20190430115147.14631-2-troels.d.hoffmeyer@gmail.com> (raw)
In-Reply-To: <20190430115147.14631-1-troels.d.hoffmeyer@gmail.com>
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.
---
src/advertising.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/advertising.c b/src/advertising.c
index 2f187edcf..890acd542 100644
--- a/src/advertising.c
+++ b/src/advertising.c
@@ -587,8 +587,10 @@ 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;
}
--
2.17.1
next prev parent reply other threads:[~2019-04-30 11:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 11:14 [PATCH Bluez 0/1] advertising: Timeout of 0 should not fire a callback Troels Dalsgaard Hoffmeyer
2019-04-29 11:14 ` [PATCH Bluez 1/1] 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 Troels Dalsgaard Hoffmeyer
2019-04-29 15:09 ` Luiz Augusto von Dentz
2019-04-30 11:51 ` [PATCH Bluez 0/1] Commit message fixup Troels Dalsgaard Hoffmeyer
2019-04-30 11:51 ` Troels Dalsgaard Hoffmeyer [this message]
2019-04-30 12:48 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190430115147.14631-2-troels.d.hoffmeyer@gmail.com \
--to=troels.d.hoffmeyer@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).