aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-04-10 17:01:47 +0200
committerMax <msuraev@sysmocom.de>2017-05-08 08:31:52 +0000
commit9d5ec1af749c82515023f16318b40d775c8e795a (patch)
tree6cae298189b53d6213222c0255e97b794c4ba58e /src/common
parent91685096f8eae4a0be2b3bd2a773259c516897de (diff)
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
Diffstat (limited to 'src/common')
-rw-r--r--src/common/oml.c5
-rw-r--r--src/common/pcu_sock.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index 7069377f..9d65d835 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1241,7 +1241,10 @@ int down_oml(struct gsm_bts *bts, struct msgb *msg)
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 fa2c5851..1ae6cb6e 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -670,6 +670,8 @@ static void pcu_sock_close(struct pcu_sock_state *state)
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;