diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-08 23:18:15 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-08 23:18:15 +0800 |
commit | 5d930f8745ae6ecbe995cc353217d50c542d9b9f (patch) | |
tree | 932778d949654f9308bc3154f5ea28b2621c8510 /src | |
parent | dedb7ce3fef7a14c52c62c22acdc043016f2563d (diff) |
mtp: Store the mtp_link inside the connection
Prepare to have multiple links to the BSC.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/msc_conn.c | 4 |
2 files changed, 6 insertions, 5 deletions
@@ -142,7 +142,7 @@ void mtp_link_forward_sccp(struct mtp_link *link, struct msgb *_msg, int sls) } /* update the connection state */ - update_con_state(rc, &result, _msg, 0, sls); + update_con_state(link, rc, &result, _msg, 0, sls); if (rc == BSS_FILTER_CLEAR_COMPL) { send_local_rlsd(link, &result); @@ -208,7 +208,7 @@ static void handle_local_sccp(struct mtp_link *link, struct msgb *inpt, struct s /* Update the state, maybe the connection was released? */ - update_con_state(0, result, inpt, 0, sls); + update_con_state(link, 0, result, inpt, 0, sls); if (llist_empty(&bsc.sccp_connections)) bsc_resources_released(&bsc); return; @@ -423,7 +423,7 @@ static void handle_rlsd(struct sccp_connection_released *rlsd, int from_msc) * 1.) We are destroying the connection, we might send a RLC to * the MSC if we are waiting for one. */ -void update_con_state(int rc, struct sccp_parse_result *res, struct msgb *msg, int from_msc, int sls) +void update_con_state(struct mtp_link *link, int rc, struct sccp_parse_result *res, struct msgb *msg, int from_msc, int sls) { struct active_sccp_con *con; struct sccp_connection_request *cr; @@ -459,6 +459,7 @@ void update_con_state(int rc, struct sccp_parse_result *res, struct msgb *msg, i con->src_ref = cr->source_local_reference; con->sls = sls; + con->link = link; llist_add_tail(&con->entry, &bsc.sccp_connections); LOGP(DINP, LOGL_DEBUG, "Adding CR: local ref: 0x%x\n", sccp_src_ref_to_int(&con->src_ref)); break; diff --git a/src/msc_conn.c b/src/msc_conn.c index 3d0d93f..6e996d9 100644 --- a/src/msc_conn.c +++ b/src/msc_conn.c @@ -207,7 +207,7 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd) LOGP(DMSC, LOGL_NOTICE, "Filtering reset ack from the MSC\n"); } else if (rc == BSS_FILTER_RLSD) { LOGP(DMSC, LOGL_DEBUG, "Filtering RLSD from the MSC\n"); - update_con_state(rc, &result, msg, 1, 0); + update_con_state(NULL, rc, &result, msg, 1, 0); } else if (rc == BSS_FILTER_RLC) { /* if we receive this we have forwarded a RLSD to the network */ LOGP(DMSC, LOGL_ERROR, "RLC from the network. BAD!\n"); @@ -216,7 +216,7 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd) } else if (link->sccp_up) { unsigned int sls; - update_con_state(rc, &result, msg, 1, 0); + update_con_state(NULL, rc, &result, msg, 1, 0); sls = sls_for_src_ref(result.destination_local_reference); /* Check for Location Update Accept */ |