From 0c95c6ac93dfb3245d9fa40eb7958f2b4a84c0ab Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 7 Aug 2010 02:37:43 +0800 Subject: msc: Rename closing to msc_link_down This is the indicator if the MSC is connected and authenticated or not. This name should be better than closing. --- include/bsc_data.h | 2 +- src/main.c | 8 ++++---- src/msc_conn.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/bsc_data.h b/include/bsc_data.h index 059800a..1427db5 100644 --- a/include/bsc_data.h +++ b/include/bsc_data.h @@ -85,7 +85,7 @@ struct bsc_data { struct timer_list ping_timeout; struct timer_list pong_timeout; - int closing; + int msc_link_down; struct llist_head sccp_connections; struct timer_list reset_timeout; int reset_count; diff --git a/src/main.c b/src/main.c index 581ab8c..372c49a 100644 --- a/src/main.c +++ b/src/main.c @@ -159,7 +159,7 @@ void mtp_link_forward_sccp(struct mtp_link *link, struct msgb *_msg, int sls) } /* special responder */ - if (bsc.closing) { + if (bsc.msc_link_down) { if (rc == BSS_FILTER_RESET_ACK && bsc.reset_count > 0) { LOGP(DMSC, LOGL_ERROR, "Received reset ack for closing.\n"); clear_connections(&bsc); @@ -325,7 +325,7 @@ void release_bsc_resources(struct bsc_data *bsc) struct active_sccp_con *tmp; struct active_sccp_con *con; - bsc->closing = 1; + bsc->msc_link_down = 1; bsc_del_timer(&bsc->reset_timeout); /* 2. clear the MGCP endpoints */ @@ -378,7 +378,7 @@ void bsc_link_down(struct link_data *data) msc_clear_queue(data->bsc); /* for the case the link is going down while we are trying to reset */ - if (data->bsc->closing) + if (data->bsc->msc_link_down) msc_schedule_reconnect(data->bsc); else if (was_up) msc_send_reset(data->bsc); @@ -389,7 +389,7 @@ void bsc_link_up(struct link_data *data) data->the_link->available = 1; /* we have not gone through link down */ - if (data->bsc->closing) { + if (data->bsc->msc_link_down) { clear_connections(data->bsc); bsc_resources_released(data->bsc); } diff --git a/src/msc_conn.c b/src/msc_conn.c index c8ecb1d..ac160bb 100644 --- a/src/msc_conn.c +++ b/src/msc_conn.c @@ -170,7 +170,7 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd) LOGP(DMSC, LOGL_NOTICE, "Connected to MSC. Sending reset.\n"); bsc_del_timer(&bsc->msc_timeout); bsc->first_contact = 0; - bsc->closing = 0; + bsc->msc_link_down = 0; msc_send_reset(bsc); } if (msg->l2h[0] == IPAC_MSGT_ID_GET && bsc->token) { @@ -507,7 +507,7 @@ int msc_init(struct bsc_data *bsc) bsc->msc_connection.read_cb = ipaccess_a_fd_cb; bsc->msc_connection.write_cb = ipaccess_write_cb; bsc->msc_connection.bfd.data = bsc; - bsc->closing = 1; + bsc->msc_link_down = 1; /* handle the timeout */ bsc->ping_timeout.cb = msc_ping_timeout; -- cgit v1.2.3