diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-04 02:31:55 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-08-04 02:31:55 +0800 |
commit | a99c5b9d0fd33039235396515eba389cce549c61 (patch) | |
tree | 8a5b14a9f8f81e7c3a04e10295b57f0dacac633d /openbsc | |
parent | 03a0ad08cf7470018fcd339f1de4633caef9d3fb (diff) |
nat: Count the number of connects to the MSC.
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 0a4422989..e5c2c39ac 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -496,8 +496,6 @@ static void msc_connection_was_lost(struct bsc_msc_connection *con) { struct bsc_connection *bsc, *tmp; - counter_inc(nat->stats.msc.reconn); - LOGP(DMSC, LOGL_ERROR, "Closing all connections downstream.\n"); llist_for_each_entry_safe(bsc, tmp, &nat->bsc_connections, list_entry) bsc_close_connection(bsc); @@ -506,6 +504,11 @@ static void msc_connection_was_lost(struct bsc_msc_connection *con) bsc_msc_schedule_connect(con); } +static void msc_connection_connected(struct bsc_msc_connection *con) +{ + counter_inc(nat->stats.msc.reconn); +} + static void msc_send_reset(struct bsc_msc_connection *msc_con) { static const uint8_t reset[] = { @@ -1163,6 +1166,7 @@ int main(int argc, char** argv) } nat->msc_con->connection_loss = msc_connection_was_lost; + nat->msc_con->connected = msc_connection_connected; nat->msc_con->write_queue.read_cb = ipaccess_msc_read_cb; nat->msc_con->write_queue.write_cb = ipaccess_msc_write_cb;; nat->msc_con->write_queue.bfd.data = nat->msc_con; |