neels submitted this change.
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
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/gsm_08_08.c
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 6e81610..c2bd7ad 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -930,10 +930,10 @@
/* 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 769cec4..692e35c 100644
--- a/src/osmo-bsc/gsm_08_08.c
+++ b/src/osmo-bsc/gsm_08_08.c
@@ -182,7 +182,7 @@
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;
To view, visit change 32554. To unsubscribe, or for help writing mail filters, visit settings.