From 3f002b3d066f27cbf8454855457b5f6bd97fa004 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 19 Jul 2022 19:29:47 +0700 Subject: fix incorrect timeout values: milliseconds vs microseconds osmo_timer_schedule() takes (*timer, seconds, microseconds), so the last argument must be in microseconds, not milliseconds. Change-Id: I1e0b319033415e42ca7f4da9bae348c5cb1da38c --- src/libosmo-pfcp/pfcp_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c index 83b7c1a..e044e75 100644 --- a/src/libosmo-pfcp/pfcp_endpoint.c +++ b/src/libosmo-pfcp/pfcp_endpoint.c @@ -167,7 +167,7 @@ static bool pfcp_queue_retrans(struct osmo_pfcp_queue_entry *qe) if (!qe->n1_remaining) return false; /* re-schedule timer, keep in queue */ - osmo_timer_schedule(&qe->t1, t1_ms/1000, t1_ms%1000); + osmo_timer_schedule(&qe->t1, t1_ms/1000, (t1_ms % 1000) * 1000); return true; } @@ -275,7 +275,7 @@ static int osmo_pfcp_endpoint_retrans_queue_add(struct osmo_pfcp_endpoint *endpo talloc_set_destructor(qe, osmo_pfcp_queue_destructor); osmo_timer_setup(&qe->t1, pfcp_queue_timer_cb, qe); - osmo_timer_schedule(&qe->t1, timeout/1000, timeout%1000); + osmo_timer_schedule(&qe->t1, timeout/1000, (timeout % 1000) * 1000); return 0; } -- cgit v1.2.3