All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] shared/timeout-ell: Fix timeout_add() implementation
@ 2021-04-15  5:03 Inga Stotland
  2021-04-15  5:43 ` [BlueZ] " bluez.test.bot
  2021-04-22 21:31 ` [PATCH BlueZ] " Gix, Brian
  0 siblings, 2 replies; 3+ messages in thread
From: Inga Stotland @ 2021-04-15  5:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Inga Stotland

Since timeout_add() expects the timeout in milliseconds, the correct
ELL primitive to call is l_timeout_create_ms()
---
 src/shared/timeout-ell.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/timeout-ell.c b/src/shared/timeout-ell.c
index 6416d8590..026286926 100644
--- a/src/shared/timeout-ell.c
+++ b/src/shared/timeout-ell.c
@@ -68,7 +68,7 @@ unsigned int timeout_add(unsigned int timeout, timeout_func_t func,
 	data->timeout = timeout;
 
 	while (id == 0 && tries < 3) {
-		to = l_timeout_create(timeout, timeout_callback,
+		to = l_timeout_create_ms(timeout, timeout_callback,
 							data, timeout_destroy);
 		if (!to)
 			break;
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-22 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  5:03 [PATCH BlueZ] shared/timeout-ell: Fix timeout_add() implementation Inga Stotland
2021-04-15  5:43 ` [BlueZ] " bluez.test.bot
2021-04-22 21:31 ` [PATCH BlueZ] " Gix, Brian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.