diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-19 19:29:47 +0700 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2022-07-19 19:33:53 +0700 |
commit | 3f002b3d066f27cbf8454855457b5f6bd97fa004 (patch) | |
tree | da25f83861981f8ff234fd786a402a0b74b29047 /src | |
parent | 6b458fa06072dddd26ec71ceed9b07d6061268e5 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/libosmo-pfcp/pfcp_endpoint.c | 4 |
1 files 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; } |