diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-29 16:28:33 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-06 14:52:53 +0100 |
commit | 182c81f04e364a947c584c682ba443a3a51ea3f8 (patch) | |
tree | 0510710d616d55d3d78c158f3e98d88dcf1b9302 /openbsc | |
parent | 90c0aff174f98f2f631d77b888d898015cdf1652 (diff) |
subscr: Remember if we need to call subscr_put_channel at the end.
Remember if this channel got opened due a paging response and in
that case when we close it down we will call subscr_put_channel
that will try to page the subscriber again. This highlights the
lack of a good subscriber management in the MSC code.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 1 | ||||
-rw-r--r-- | openbsc/src/gsm_04_08.c | 1 | ||||
-rw-r--r-- | openbsc/src/osmo_msc.c | 8 |
3 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 59599ab03..fc02f58de 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -252,6 +252,7 @@ struct gsm_subscriber_connection { /* Are we part of a special "silent" call */ int silent_call; + int put_channel; /* bsc structures */ struct osmo_bsc_sccp_con *sccp_con; diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 94a620934..ea11a7109 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -1436,6 +1436,7 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event, /* Assign lchan */ if (!transt->conn) { transt->conn = conn; + conn->put_channel = 1; } /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); diff --git a/openbsc/src/osmo_msc.c b/openbsc/src/osmo_msc.c index beb90e5b1..8c86dcc8e 100644 --- a/openbsc/src/osmo_msc.c +++ b/openbsc/src/osmo_msc.c @@ -38,6 +38,10 @@ static void msc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci) static int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause) { gsm0408_clear_request(conn, cause); + if (conn->put_channel) { + conn->put_channel = 0; + subscr_put_channel(conn->subscr); + } return 1; } @@ -92,5 +96,9 @@ void msc_release_connection(struct gsm_subscriber_connection *conn) /* no more connections, asking to release the channel */ conn->in_release = 1; gsm0808_clear(conn); + if (conn->put_channel) { + conn->put_channel = 0; + subscr_put_channel(conn->subscr); + } subscr_con_free(conn); } |