Module: sip-router Branch: kamailio_3.0 Commit: 3e1130d1513ad93ed032efaccc1b810cfca5039f URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3e1130d1...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Dec 23 16:58:45 2009 +0100
sctp: SCTP_STATS_ASSOC_SHUTDOWN
Statistics placeholder for counting shutdowns. (cherry picked from commit 8dfdb3c7a9577438ced848cbbf5d845052ba5032)
---
sctp_server.c | 1 + sctp_stats.h | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sctp_server.c b/sctp_server.c index 7c5995d..c966ad3 100644 --- a/sctp_server.c +++ b/sctp_server.c @@ -2220,6 +2220,7 @@ again: /* no break */ case SCTP_SHUTDOWN_COMP: atomic_dec(sctp_conn_no); + SCTP_STATS_ASSOC_SHUTDOWN(); #ifdef SCTP_CONN_REUSE /* connection down*/ if (likely(cfg_get(sctp, sctp_cfg, assoc_tracking))) diff --git a/sctp_stats.h b/sctp_stats.h index e895ce8..4f6efdb 100644 --- a/sctp_stats.h +++ b/sctp_stats.h @@ -37,6 +37,7 @@ #define SCTP_STATS_CONNECT_FAILED() #define SCTP_STATS_LOCAL_REJECT() #define SCTP_STATS_REMOTE_SHUTDOWN() +#define SCTP_STATS_ASSOC_SHUTDOWN() #define SCTP_STATS_COMM_LOST() #define SCTP_STATS_SENDQ_FULL() #define SCTP_STATS_SEND_FAILED() @@ -69,6 +70,12 @@ #define SCTP_STATS_REMOTE_SHUTDOWN()
+/** called each time a connection is shutdown. + * sctp notification: SCTP_SHUTDOWN_COMP + */ +#define SCTP_STATS_ASSOC_SHUTDOWN() + + /** called each time an established connection is closed due to some error. * sctp notification: SCTP_COMM_LOST */