diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-23 16:11:21 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-23 16:11:21 +0100 |
commit | 4c9dd160c3ac8f4049d5f0c3d929bdfceb26fde6 (patch) | |
tree | 2918d19aa6a11f092cfae94e40f56be5c18e9de0 /src/sccp_state.c | |
parent | 47c9faac3b86f14a1dda0592d5bcf297f72c823f (diff) |
sccp: The link attribute was never used leading to a crash
Right now we assume that the source of an application with
SCCP state tracking is a linkset. Send the message to that
linkset.
Diffstat (limited to 'src/sccp_state.c')
-rw-r--r-- | src/sccp_state.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sccp_state.c b/src/sccp_state.c index 47d117f..f182a1f 100644 --- a/src/sccp_state.c +++ b/src/sccp_state.c @@ -476,6 +476,7 @@ static void send_local_rlsd_for_con(void *data) { struct msgb *rlsd; struct active_sccp_con *con = (struct active_sccp_con *) data; + struct mtp_link_set *set; /* try again in three seconds */ con->rlc_timeout.data = con; @@ -488,9 +489,16 @@ static void send_local_rlsd_for_con(void *data) return; ++con->rls_tries; + + set = con->app->route_src.set; + if (!set) { + LOGP(DINP, LOGL_DEBUG, "Application %d has no linkset\n", con->app->nr); + return; + } + LOGP(DINP, LOGL_DEBUG, "Sending RLSD for 0x%x the %d time.\n", sccp_src_ref_to_int(&con->src_ref), con->rls_tries); - mtp_link_set_submit_sccp_data(con->link, con->sls, rlsd->l2h, msgb_l2len(rlsd)); + mtp_link_set_submit_sccp_data(set, con->sls, rlsd->l2h, msgb_l2len(rlsd)); msgb_free(rlsd); } |