summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile/gsm48_cc.c
diff options
context:
space:
mode:
authorAndreas.Eversberg <jolly@eversberg.eu>2010-10-15 19:15:59 +0000
committerAndreas.Eversberg <jolly@eversberg.eu>2010-10-15 19:15:59 +0000
commitf92f7773574a93c185ed69786d2999f3f61a2e07 (patch)
tree7df10be45bd745decbac5c8948cc9c5e9c74deb8 /src/host/layer23/src/mobile/gsm48_cc.c
parentadf65e29fd0723cc2550be9c37668cfaf27858f9 (diff)
[layer23] Support of receiving STATUS at call control
Diffstat (limited to 'src/host/layer23/src/mobile/gsm48_cc.c')
-rw-r--r--src/host/layer23/src/mobile/gsm48_cc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/host/layer23/src/mobile/gsm48_cc.c b/src/host/layer23/src/mobile/gsm48_cc.c
index 77caffe5..d8976eb2 100644
--- a/src/host/layer23/src/mobile/gsm48_cc.c
+++ b/src/host/layer23/src/mobile/gsm48_cc.c
@@ -451,6 +451,24 @@ static int gsm48_cc_rx_status_enq(struct gsm_trans *trans, struct msgb *msg)
return gsm48_cc_tx_status(trans, GSM48_CC_CAUSE_RESP_STATUS_INQ);
}
+static int gsm48_cc_rx_status(struct gsm_trans *trans, struct msgb *msg)
+{
+ struct gsm48_hdr *gh = msgb_l3(msg);
+ unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
+ struct gsm_mncc_cause cause;
+
+ if (payload_len < 1 || payload_len < gh->data[0] + 1) {
+ LOGP(DCC, LOGL_NOTICE, "Short read of status message "
+ "error.\n");
+ return -EINVAL;
+ }
+ gsm48_decode_cause(&cause, gh->data);
+
+ LOGP(DCC, LOGL_INFO, "received STATUS (cause %d)\n", cause.value);
+
+ return 0;
+}
+
/*
* process handlers (mobile originating call establish)
*/
@@ -1982,6 +2000,9 @@ static struct datastate {
{ALL_STATES, /* 8.4 */
GSM48_MT_CC_STATUS_ENQ, gsm48_cc_rx_status_enq},
+ {ALL_STATES,
+ GSM48_MT_CC_STATUS, gsm48_cc_rx_status},
+
{ALL_STATES, /* 5.5.7.2 */
GSM48_MT_CC_START_DTMF_ACK, gsm48_cc_rx_start_dtmf_ack},