diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2023-04-29 03:20:34 +0200 |
---|---|---|
committer | neels <nhofmeyr@sysmocom.de> | 2023-05-01 00:11:48 +0000 |
commit | 5d8d6d20794b954b17f57d909901084569e21d7e (patch) | |
tree | b19b23906a613742f756203d1808a847c6b8dbd0 | |
parent | a70d6b25c4943fd58de5b19597d98bec9da1b118 (diff) |
fix mscpool for large msc NRs
Use the proper type that can handle the entire range of MSC numbers we
allow on the VTY, we have:
#define MSC_NR_RANGE "<0-1000>"
Before this patch, MSC pool round robin would glitch around for any
'msc' numbers 'msc 256' thru 'msc 1000'.
Change-Id: I98bee022c1a78508554d2ff4a10fbce3c53f1128
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 4 | ||||
-rw-r--r-- | src/osmo-bsc/gsm_08_08.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 6e8161086..c2bd7adc0 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -930,10 +930,10 @@ struct gsm_network { /* msc configuration */ struct llist_head mscs; - uint8_t mscs_round_robin_next_nr; + unsigned int mscs_round_robin_next_nr; /* Emergency calls potentially select a different set of MSCs, so to not mess up the normal round-robin * behavior, emergency calls need a separate round-robin counter. */ - uint8_t mscs_round_robin_next_emerg_nr; + unsigned int mscs_round_robin_next_emerg_nr; /* rf ctl related bits */ int mid_call_timeout; diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index 769cec4ce..692e35cea 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -182,7 +182,7 @@ static struct bsc_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn, struct bsc_msc_data *msc_target = NULL; struct bsc_msc_data *msc_round_robin_next = NULL; struct bsc_msc_data *msc_round_robin_first = NULL; - uint8_t round_robin_next_nr; + unsigned int round_robin_next_nr; int16_t nri_v = -1; bool is_null_nri = false; |