From: Inga Stotland <inga.stotland@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com, Inga Stotland <inga.stotland@intel.com>
Subject: [PATCH BlueZ 4/4 v3] test: test-mesh - Correctly stop periodic publication
Date: Fri, 28 Jun 2019 16:01:42 -0700 [thread overview]
Message-ID: <20190628230142.16367-5-inga.stotland@intel.com> (raw)
In-Reply-To: <20190628230142.16367-1-inga.stotland@intel.com>
This changes the order of checks for an updated publication period:
check for zero period first, and, if this is the case, stop sending
the periodic model publications.
---
test/test-mesh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/test-mesh b/test/test-mesh
index c075a642b..4d515e186 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -606,15 +606,15 @@ class OnOffServer(Model):
def set_publication(self, period):
- # We do not handle ms in this example
- if period < 1000:
- return
-
self.pub_period = period
if period == 0:
self.timer.cancel()
return
+ # We do not handle ms in this example
+ if period < 1000:
+ return
+
self.timer.start(period/1000, self.publish)
def publish(self):
--
2.21.0
prev parent reply other threads:[~2019-06-28 23:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 23:01 [PATCH BlueZ 0/4 v3] Model publication fixes Inga Stotland
2019-06-28 23:01 ` [PATCH BlueZ 1/4 v3] mesh: Clean up model.c and cfg-server.c Inga Stotland
2019-06-28 23:01 ` [PATCH BlueZ 2/4 v3] mesh: Fix virtual address processing Inga Stotland
2019-06-29 8:34 ` Michał Lowas-Rzechonek
2019-06-30 6:42 ` Stotland, Inga
2019-06-28 23:01 ` [PATCH BlueZ 3/4 v3] mesh: Fix and clean up model publication code Inga Stotland
2019-06-28 23:01 ` Inga Stotland [this message]
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=20190628230142.16367-5-inga.stotland@intel.com \
--to=inga.stotland@intel.com \
--cc=brian.gix@intel.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