msc: Fix crash due pong timeout started from a msc reset
This is fixing a crash that is caused by the MTP link going
down/up and the main routines asking to send a reset to the
MSC. The sending of a reset is triggering the ping/pong
timeouts. In case there is no MSC connection we could crash.
diff --git a/src/msc_conn.c b/src/msc_conn.c
index 902546f..1c6e350 100644
--- a/src/msc_conn.c
+++ b/src/msc_conn.c
@@ -553,6 +553,11 @@
{
struct msgb *msg;
+ if (bsc->msc_link_down) {
+ LOGP(DMSC, LOGL_NOTICE, "Not releasing connection due lack of connection.\n");
+ return;
+ }
+
msg = create_sccp_rlc(src, dst);
if (!msg)
return;
@@ -564,6 +569,11 @@
{
struct msgb *msg;
+ if (bsc->msc_link_down) {
+ LOGP(DMSC, LOGL_NOTICE, "Not sending reset due lack of connection.\n");
+ return;
+ }
+
msg = create_reset();
if (!msg)
return;