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
This commit is contained in:
Neels Hofmeyr 2023-04-29 03:20:34 +02:00 committed by neels
parent a70d6b25c4
commit 5d8d6d2079
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;