Change in osmo-bts[master]: abis: Try one reconnect to previously connected BSC before trying nex...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Nov 3 19:29:36 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/26093 )


Change subject: abis: Try one reconnect to previously connected BSC before trying next one
......................................................................

abis: Try one reconnect to previously connected BSC before trying next one

This way we keep all BTS connected to the same BSC if there was a
spurious network problem.

Related: SYS#4971
Change-Id: I16b75da5987584d099edc3a640f3a5cd61f3ad69
---
M src/common/abis.c
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/93/26093/1

diff --git a/src/common/abis.c b/src/common/abis.c
index 06e6f3b..4afe81a 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -82,6 +82,7 @@
 	struct bsc_oml_host *current_bsc;
 	struct gsm_bts *bts;
 	char *model_name;
+	bool reconnect_to_current_bsc;
 };
 
 static void reset_oml_link(struct gsm_bts *bts)
@@ -122,6 +123,13 @@
 		return -1;
 	}
 
+	/* Keep current pointer to priv->current_bsc: */
+	if (priv->reconnect_to_current_bsc) {
+		OSMO_ASSERT(priv->current_bsc);
+		priv->reconnect_to_current_bsc = false;
+		return 0;
+	}
+
 	last = (struct bsc_oml_host *)llist_last_entry(&bts->bsc_oml_hosts, struct bsc_oml_host, list);
 
 	if (!priv->current_bsc || priv->current_bsc == last) /* Pick first one (wrap around): */
@@ -233,6 +241,9 @@
 		 * line when something goes wrong... */
 	}
 	bts_model_abis_close(bts);
+
+	/* We want to try reconnecting to the current BSC at least once before switching to a new one: */
+	priv->reconnect_to_current_bsc = true;
 	osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_WAIT_RECONNECT, OML_RETRY_TIMER, 0);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/26093
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I16b75da5987584d099edc3a640f3a5cd61f3ad69
Gerrit-Change-Number: 26093
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211103/82d24081/attachment.htm>


More information about the gerrit-log mailing list