diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-21 12:50:02 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-25 14:14:42 +0100 |
commit | 1a0609292c3b8fc831a1aa13aaa89e9a6e7d8fbc (patch) | |
tree | 8b11caf66c41e83fea6f068c35e84c125b53787e /src | |
parent | 377ba4293abaa4cc98b7bdee57e98528acbf023f (diff) |
msc: Fix crash due pong timeout started from a msc resetrelease/1.0
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/msc_conn.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ void msc_send_rlc(struct bsc_data *bsc, { 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 @@ void msc_send_reset(struct bsc_data *bsc) { 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; |