aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_subscriber.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-29 14:17:51 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-30 21:32:26 +0100
commit9ff82892da2b58ba344b2f6e70256d08947b9c34 (patch)
treecd36eac91371ad1c9efb72e213381060edf754f4 /openbsc/src/gprs/gprs_subscriber.c
parent85ba655788b49dc83e33109368f81b7c3ea0b090 (diff)
gprs: Use 'Network failure' as default cause
This commit adds a check after a GSUP message has been decoded whether it is an error message and does not contain a cause value. If his is the case, the cause value is set to 'Network failure', so that this cause if effectively the default value for error messages. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gprs_subscriber.c')
-rw-r--r--openbsc/src/gprs/gprs_subscriber.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c
index 4434324ab..0009685b1 100644
--- a/openbsc/src/gprs/gprs_subscriber.c
+++ b/openbsc/src/gprs/gprs_subscriber.c
@@ -514,6 +514,9 @@ int gprs_subscr_rx_gsup_message(struct msgb *msg)
return -GMM_CAUSE_INV_MAND_INFO;
}
+ if (!gsup_msg.cause && GPRS_GSUP_IS_MSGT_ERROR(gsup_msg.message_type))
+ gsup_msg.cause = GMM_CAUSE_NET_FAIL;
+
subscr = gprs_subscr_get_by_imsi(gsup_msg.imsi);
if (!subscr) {