diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-06-06 14:31:36 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-06-18 17:50:08 +0200 |
commit | 8b0d8a97fb5cddb718c0b35af02bbcfe4599bdc5 (patch) | |
tree | d81ce0f11db4ae55542fd702132f3b89c4b3cef8 /openbsc/src/osmo-bsc/osmo_bsc_bssap.c | |
parent | fabe468dd47ffd72a3ff2b6387422d304b178665 (diff) |
osmo-bsc: Handle RESET/RESET-ACK properly
Improve the way the BSC executes its RESET/RESET-ACK sequence.
Currently only a simple bool variable serves as a state holder.
We set this variable to true when we receive the RESET-ACK
message. Unfortunately no further checking is done. This
patch replaces the old mechanism with a more elaborated
implementation which also detects a loss of the connection
and makes sure to reconnect properly afterwards. Also the
all open connections are closed on connection loss
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_bssap.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_bssap.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c index 7d81a9ece..739f93c05 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c @@ -31,6 +31,7 @@ #include <osmocom/gsm/gsm0808.h> #include <osmocom/gsm/gsm0808_utils.h> #include <openbsc/osmo_bsc_sigtran.h> +#include <openbsc/osmo_bsc_reset.h> #include <osmocom/core/byteswap.h> #define IP_V4_ADDR_LEN 4 @@ -194,17 +195,10 @@ static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) { LOGP(DMSC, LOGL_NOTICE, "Reset ACK from MSC No.: %i\n", msc->nr); - msc->msc_con->reset_ack = true; -#if 0 - struct msc_signal_data sig; - struct bsc_msc_data *data; - - data = (struct bsc_msc_data *) msc; - sig.data = data; - osmo_signal_dispatch(SS_MSC, S_MSC_CONNECTED, &sig); - osmo_signal_dispatch(SS_MSC, S_MSC_AUTHENTICATED, &sig); -#endif + /* Inform the FSM that controls the RESET/RESET-ACK procedure + * that we have successfully received the reset-ack message */ + reset_ack_confirm(msc); return 0; } |