Skip to content

adapter: Fix discovery trigger for 0 second delay

Frédéric Danis linux-bluetooth 5 versions – Applied

Status from this message: Applied, note that I changed the commit message a little bit.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 2 repliesApplied
  2. v44 patches 1 replySuperseded
  3. v34 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch4 repliesSuperseded
v11 patch1 replySuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4shared/timeout: Add timeout_add_seconds abstractionsrc/shared/tester.c src/shared/timeout-ell.c src/shared/timeout-glib.c +2 more+51 -72 replies
2/4src: Replace calls to g_timeout_add_seconds by timeout_add_secondssrc/adapter.c src/adv_monitor.c src/advertising.c +3 more+115 -970 replies
3/4plugins: Replace calls to g_timeout_add_seconds by timeout_add_secondsplugins/policy.c+46 -450 replies
4/4profiles: Replace calls to g_timeout_add_seconds by timeout_add_secondsprofiles/audio/a2dp.c profiles/audio/avctp.c profiles/audio/avdtp.c +6 more+120 -1100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH Bluez v5 0/4] adapter: Fix discovery trigger for 0 second delay

When calling StartDiscovery the effective start can take around 10 ms or up to 700 ms.
g_timeout_add_seconds() call doesn't ensure the time for the first call of the timer if the delay is less or equal to 1 second.

v2: Fix issue found by CI
v3: Add a wrapper function for g_timeout_add_seconds and replace calls to it in
src/*, profiles/* and plugins/*
v4: Fix issue found by CI
v5: Fix issue found by CI

Frédéric Danis (4):
shared/timeout: Add timeout_add_seconds abstraction
src: Replace calls to g_timeout_add_seconds by timeout_add_seconds
plugins: Replace calls to g_timeout_add_seconds by timeout_add_seconds
profiles: Replace calls to g_timeout_add_seconds by
timeout_add_seconds

 plugins/policy.c              | 91 ++++++++++++++++++-----------------
 profiles/audio/a2dp.c         | 17 ++++---
 profiles/audio/avctp.c        | 44 +++++++++--------
 profiles/audio/avdtp.c        | 61 ++++++++++++-----------
 profiles/audio/avrcp.c        | 13 ++---
 profiles/health/hdp.c         | 16 +++---
 profiles/health/mcap.c        | 21 ++++----
 profiles/input/device.c       | 33 +++++++------
 profiles/network/bnep.c       | 12 +++--
 profiles/sap/server.c         | 13 ++---
 src/adapter.c                 | 90 ++++++++++++++++++----------------
 src/adv_monitor.c             | 14 +++---
 src/advertising.c             | 28 ++++++-----
 src/device.c                  | 60 ++++++++++++-----------
 src/main.c                    |  7 +--
 src/sdp-client.c              | 13 ++---
 src/shared/tester.c           | 16 +++---
 src/shared/timeout-ell.c      |  6 +++
 src/shared/timeout-glib.c     | 27 +++++++++++
 src/shared/timeout-mainloop.c |  6 +++
 src/shared/timeout.h          |  3 ++
 21 files changed, 332 insertions(+), 259 deletions(-)

--
2.18.0