summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-27 16:49:23 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-03-27 17:05:48 +0200
commitb8e802851dd586b3e08799886cf4b144463b970f (patch)
tree4350294829443796ba615f30b0be818b0a7ba436
parenta4970327f2e050f697dd4e75fa1931902aa6c1de (diff)
mncc: Handle REJ_IND from the NITBzecke/mt-mncc-call
In case a call can not be connected we will receive a REJ.IND. Inform the other leg and release the call.
-rw-r--r--src/mncc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mncc.c b/src/mncc.c
index 1d97703..5531905 100644
--- a/src/mncc.c
+++ b/src/mncc.c
@@ -473,6 +473,23 @@ static void check_stp_cmpl_ind(struct mncc_connection *conn, char *buf, int rc)
leg->state = MNCC_CC_CONNECTED;
}
+static void check_rej_ind(struct mncc_connection *conn, char *buf, int rc)
+{
+ struct gsm_mncc *data;
+ struct mncc_call_leg *leg;
+ struct call_leg *other_leg;
+
+ leg = find_leg(conn, buf, rc, &data);
+ if (!leg)
+ return;
+
+ other_leg = call_leg_other(&leg->base);
+ if (other_leg)
+ other_leg->release_call(other_leg);
+ LOGP(DMNCC, LOGL_DEBUG, "leg(%u) was rejected.\n", data->callref);
+ call_leg_release(&leg->base);
+}
+
static void check_hello(struct mncc_connection *conn, char *buf, int rc)
{
struct gsm_mncc_hello *hello;
@@ -609,6 +626,9 @@ static int mncc_data(struct osmo_fd *fd, unsigned int what)
case MNCC_REL_IND:
check_rel_ind(conn, buf, rc);
break;
+ case MNCC_REJ_IND:
+ check_rej_ind(conn, buf, rc);
+ break;
case MNCC_REL_CNF:
check_rel_cnf(conn, buf, rc);
break;