[MERGED] osmo-bts[master]: Signal to BSC when PCU disconnects

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/.

Max gerrit-no-reply at lists.osmocom.org
Mon May 8 08:31:53 UTC 2017


Max has submitted this change and it was merged.

Change subject: Signal to BSC when PCU disconnects
......................................................................


Signal to BSC when PCU disconnects

While at it - do not serialize NULL as a string when delivering OML
Failure Report.

Change-Id: I41a731bd719aee0bbb98d3236405fb3a7f3ddec0
Related: OS#1615
---
M src/common/oml.c
M src/common/pcu_sock.c
2 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/oml.c b/src/common/oml.c
index 7069377..9d65d83 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1241,7 +1241,10 @@
 static int handle_fail_sig(unsigned int subsys, unsigned int signal, void *handle,
 			   void *signal_data)
 {
-	oml_tx_failure_event_rep(handle, signal, "%s", signal_data);
+	if (signal_data)
+		oml_tx_failure_event_rep(handle, signal, "%s", signal_data);
+	else
+		oml_tx_failure_event_rep(handle, signal, "");
 
 	return 0;
 }
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index fa2c585..1ae6cb6 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -670,6 +670,8 @@
 	bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list);
 
 	LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n");
+	osmo_signal_dispatch(SS_FAIL, OSMO_EVT_PCU_VERS, NULL);
+	bts->pcu_version[0] = '\0';
 
 	close(bfd->fd);
 	bfd->fd = -1;

-- 
To view, visit https://gerrit.osmocom.org/2288
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I41a731bd719aee0bbb98d3236405fb3a7f3ddec0
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list