diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-06-12 06:26:28 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-06-12 23:07:36 +0700 |
commit | 9aec25e464865573acc7ccde92f471a1af799cd6 (patch) | |
tree | ee4c1b087430e5457bfea3d5eeaf3b9aceb0c5ac | |
parent | f5b9e6cdf687351bda631ee98c368e4f318188d8 (diff) |
libmsc/gsm_09_11.c: properly indicate transaction errors
Previously it was intended that we are always parsing the
whole GSM 04.80 message, including the Invoke ID. But
there is no need to do that, since we are going to
forward the Facility IE payload to HLR in near future.
Moreover, there was a mistake (my bad) - transaction is
being established before parsing of the message, so the
req structure remains uninitialized until that.
Let's just send RELEASE COMPLETE message without any Cause or
Facility IEs. We could indicate a problem using the first one,
but according to GSM TS 04.80, the Cause IE only makes sense
when "its functional handling is specified in the service
description or GSM TS 09.11".
Change-Id: Iecba2dccada9bbcdeb3a9dfd868719aeedc07022
-rw-r--r-- | src/libmsc/gsm_09_11.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index 8f7e54fac..fc588f5c2 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -94,9 +94,9 @@ int gsm0911_rcv_nc_ss(struct gsm_subscriber_connection *conn, struct msgb *msg) LOGP(DMM, LOGL_ERROR, "Unexpected message (msg_type=%s), " "transaction is not allocated yet\n", gsm48_pdisc_msgtype_name(pdisc, msg_type)); - gsm0480_send_ussd_reject(conn, &req, - GSM_0480_PROBLEM_CODE_TAG_GENERAL, - GSM_0480_GEN_PROB_CODE_UNRECOGNISED); + gsm48_tx_simple(conn, + GSM48_PDISC_NC_SS | (tid << 4), + GSM0480_MTYPE_RELEASE_COMPLETE); return -EINVAL; } @@ -105,8 +105,9 @@ int gsm0911_rcv_nc_ss(struct gsm_subscriber_connection *conn, struct msgb *msg) pdisc, tid, new_callref++); if (!trans) { DEBUGP(DMM, " -> No memory for trans\n"); - gsm0480_send_ussd_return_error(conn, &req, - GSM0480_ERR_CODE_SYSTEM_FAILURE); + gsm48_tx_simple(conn, + GSM48_PDISC_NC_SS | (tid << 4), + GSM0480_MTYPE_RELEASE_COMPLETE); return -ENOMEM; } |