diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-09-14 18:49:49 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-09-20 12:22:53 +0200 |
commit | 3f7bd192a6ddd3a417ca41255f0071c32d050114 (patch) | |
tree | 04fdda40428efb978123847df9151eb82d6723d1 /include/osmo-bts | |
parent | 65c0341f3d7286b0fc1f4937850dd2efaf7a1447 (diff) |
abis.c: Fix mess with priv->bsc_oml_host
The pointer was used as "struct bsc_oml_host" sometimes, and other times
as "struct llist_head". It just worked because bsc_oml_host->list is the
first item in the script. The code was really confusing, also because
the bts list of items has a name really similar to the one currently
assigned. Let's rename the currently assigned address to "current_bsc",
store it always as "struct bsc_oml_host*" and finally use llist_entry
helpers when needed.
The related code is also moved to a helper function to enclose there the
logic to get next BSC in list. This change actually changes the logic
where a remote address is removed from VTY, since now the next address
in list is picked at the time, and later when reconnecting the list is
forwarded another time, meaning one address will be skipped.
This could be considered a bug, but this situation is really special
and anyway the entire logic will be changed in new commits where we'll
keep reconnecting in loop without exiting when reaching the end of the
list, so we are fine with it. Think of this commit as a preparation
commit for next ones.
Change-Id: I3cc8a4148b3d63bc185b72dab8108105a6644910
Diffstat (limited to 'include/osmo-bts')
-rw-r--r-- | include/osmo-bts/abis.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmo-bts/abis.h b/include/osmo-bts/abis.h index 1939faf9..40707cd1 100644 --- a/include/osmo-bts/abis.h +++ b/include/osmo-bts/abis.h @@ -9,7 +9,7 @@ enum abis_link_fsm_event { ABIS_LINK_EV_SIGN_LINK_OML_UP, ABIS_LINK_EV_SIGN_LINK_DOWN, - ABIS_LINK_EV_VTY_RM_ADDR, + ABIS_LINK_EV_VTY_RM_ADDR, /* data: struct bsc_oml_host* being removed */ }; void abis_init(struct gsm_bts *bts); |