libmsc/gsm_09_11.c: properly handle MS-initiated release

According to GSM TS 02.90, section 4.3, release of the connection
used for SS/USSD is normally the responsibility of the network.
But the user may also initiate connection release, e.g. by
pressing the 'red button'.

TTCN-3 test case: I7936ed5072ed2ae02f039dc90a1fece1e7f70a70
Change-Id: I76fc277bf9db614a97824b1541cd5bb75aa3e29d
This commit is contained in:
Vadim Yanitskiy 2018-06-21 17:55:56 +07:00 committed by Harald Welte
parent f2f83b07f3
commit fcc24ed553
1 changed files with 5 additions and 2 deletions

View File

@ -179,8 +179,11 @@ int gsm0911_rcv_nc_ss(struct gsm_subscriber_connection *conn, struct msgb *msg)
goto error;
}
/* Don't release connection, wait for response */
msc_subscr_conn_communicating(conn);
/* Should we release connection? Or wait for response? */
if (msg_type == GSM0480_MTYPE_RELEASE_COMPLETE)
trans_free(trans);
else
msc_subscr_conn_communicating(conn);
return 0;