linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 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.
Date: Mon, 29 Apr 2019 13:14:41 +0200	[thread overview]
Message-ID: <20190429111441.20481-2-troels.d.hoffmeyer@gmail.com> (raw)
In-Reply-To: <20190429111441.20481-1-troels.d.hoffmeyer@gmail.com>

---
 src/advertising.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/advertising.c b/src/advertising.c
index 2f187edcf..26e24ee01 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


  reply	other threads:[~2019-04-29 11:15 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 ` Troels Dalsgaard Hoffmeyer [this message]
2019-04-29 15:09   ` [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 Luiz Augusto von Dentz
2019-04-30 11:51 ` [PATCH Bluez 0/1] Commit message fixup Troels Dalsgaard Hoffmeyer
2019-04-30 11:51   ` [PATCH Bluez 1/1] advertising: Timeout of 0 should not fire a callback Troels Dalsgaard Hoffmeyer
2019-04-30 12:48   ` [PATCH Bluez 0/1] Commit message fixup 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=20190429111441.20481-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).