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-21 12:58:08 +0100 |
commit | e250ac3f4bdac174871b80183884c88c1419d810 (patch) | |
tree | 0e405f0089a730c47349b2942c72440ed3f30872 /src | |
parent | 42f9aa94ba5a3f7236ba279785f03c4608a9dc5a (diff) |
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.
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 bc05744..8f17eb4 100644 --- a/src/msc_conn.c +++ b/src/msc_conn.c @@ -539,6 +539,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; @@ -550,6 +555,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; |