aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2020-05-24 21:32:57 +0300
committerlaforge <laforge@osmocom.org>2020-05-29 20:03:26 +0000
commit962cb637fcb28f684dbd42dbd26eafcf18b9b722 (patch)
tree4b0a346ed09458f4f92a326918e77c262c7c0a78
parentb87103098c75da14a00972846fb3b732b536c8d9 (diff)
Return 0 from gsm0408_rcvmsg() if SCCP link is already closed.
Whether to forward the message or not to an SCCP connection is an internal question for the GSM 04.08 code. Unlike errors with the message decoding, memory allocation and other critical errors, this not an error which should be reported to the caller. abis_rsl_rx_rll() (the caller) shouldn't know about the message routing decisions and should only care about actual errors. This code path is hit in production very often because we frequently receive a Classmark Change message from a phone right after the MSC has shut the SCCP connection but before we close the lchan on the BTS. Change-Id: I2d430ebc894a2345bebaa1841a75e94a3b45eae2
-rw-r--r--src/osmo-bsc/gsm_04_08_rr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c
index 586eeaba2..4e5a3073a 100644
--- a/src/osmo-bsc/gsm_04_08_rr.c
+++ b/src/osmo-bsc/gsm_04_08_rr.c
@@ -1016,7 +1016,7 @@ int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id)
lchan = msg->lchan;
if (!lchan_may_receive_data(lchan)) {
LOG_LCHAN(msg->lchan, LOGL_INFO, "Got data in non active state, discarding.\n");
- return -1;
+ return 0;
}
if (lchan->conn) {