diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-20 16:52:40 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-21 14:36:28 +0200 |
commit | f086fede93535d9019b1c515ece6508f5319f83f (patch) | |
tree | 1a66a2a020e8727e3b10f514d51388347ccc78c9 | |
parent | b53230acecfea4040d93059a957e837ae2756c14 (diff) |
ms: Rename field timer -> release_timer
Rename it so that it becomes clear what the timer is used for.
Change-Id: Id4738ea196b232858e1ec9cdc439f9b81839058f
-rw-r--r-- | src/gprs_ms.c | 10 | ||||
-rw-r--r-- | src/gprs_ms.h | 2 | ||||
-rw-r--r-- | tests/ms/MsTest.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 1450d190..720617e4 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -151,7 +151,7 @@ struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, const char *use_ref) LOGP(DMS, LOGL_INFO, "Creating MS object\n"); ms->imsi[0] = '\0'; - osmo_timer_setup(&ms->timer, ms_release_timer_cb, ms); + osmo_timer_setup(&ms->release_timer, ms_release_timer_cb, ms); llc_queue_init(&ms->llc_queue, ms); memset(&ms->llc_timer, 0, sizeof(ms->llc_timer)); osmo_timer_setup(&ms->llc_timer, ms_llc_timer_cb, ms); @@ -189,7 +189,7 @@ static int ms_talloc_destructor(struct GprsMs *ms) ms_set_reserved_slots(ms, NULL, 0, 0); - osmo_timer_del(&ms->timer); + osmo_timer_del(&ms->release_timer); if (ms->ul_tbf) { tbf_set_ms(ul_tbf_as_tbf(ms->ul_tbf), NULL); @@ -241,17 +241,17 @@ static void ms_becomes_idle(struct GprsMs *ms) } LOGPMS(ms, DMS, LOGL_INFO, "Schedule MS release in %lu secs\n", delay_rel_sec); - osmo_timer_schedule(&ms->timer, delay_rel_sec, 0); + osmo_timer_schedule(&ms->release_timer, delay_rel_sec, 0); } static void ms_becomes_active(struct GprsMs *ms) { - if (!osmo_timer_pending(&ms->timer)) + if (!osmo_timer_pending(&ms->release_timer)) return; LOGPMS(ms, DMS, LOGL_DEBUG, "Cancel scheduled MS release\n"); - osmo_timer_del(&ms->timer); + osmo_timer_del(&ms->release_timer); } void ms_set_mode(struct GprsMs *ms, enum mcs_kind mode) diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 4f6456e7..b2b3274f 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -79,7 +79,7 @@ struct GprsMs { struct osmo_timer_list llc_timer; struct osmo_use_count use_count; - struct osmo_timer_list timer; + struct osmo_timer_list release_timer; int64_t last_cs_not_low; diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 776f77c7..ea54a124 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -404,7 +404,7 @@ static void test_ms_timeout() /* test MS still exists and it's idle: */ OSMO_ASSERT(bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI) != NULL); OSMO_ASSERT(ms_is_idle(ms)); - OSMO_ASSERT(osmo_timer_pending(&ms->timer)); + OSMO_ASSERT(osmo_timer_pending(&ms->release_timer)); usleep(1100000); osmo_timers_update(); |