diff options
author | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 16:25:09 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 16:34:40 +0200 |
commit | 36a03bdfcb059ef22d7d2a52c5093194b5c12574 (patch) | |
tree | f42a38349446ca22f017f46dd573296b5fb0a9e9 /openbsc/src/libmgcp | |
parent | 1c81045521120ceb712f21b1c5fab5bca6af1abf (diff) |
osmux: display statistics once osmux input handle is released
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r-- | openbsc/src/libmgcp/osmux.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openbsc/src/libmgcp/osmux.c b/openbsc/src/libmgcp/osmux.c index c64578bce..c9f344def 100644 --- a/openbsc/src/libmgcp/osmux.c +++ b/openbsc/src/libmgcp/osmux.c @@ -12,6 +12,7 @@ #include <stdio.h> /* for printf */ #include <string.h> /* for memcpy */ #include <stdlib.h> /* for abs */ +#include <inttypes.h> /* for PRIu64 */ #include <netinet/in.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> @@ -86,10 +87,17 @@ static void osmux_handle_put(struct osmux_in_handle *in) llist_for_each_entry(h, &osmux_handle_list, head) { if (h->in == in) { if (--h->refcnt == 0) { - LOGP(DMGCP, LOGL_DEBUG, + LOGP(DMGCP, LOGL_INFO, "Releasing unused osmux handle for %s:%d\n", inet_ntoa(h->rem_addr), ntohs(h->rem_port)); + LOGP(DMGCP, LOGL_INFO, "Stats: " + "input RTP msgs: %u bytes: %"PRIu64" " + "output osmux msgs: %u bytes: %"PRIu64"\n", + in->stats.input_rtp_msgs, + in->stats.input_rtp_bytes, + in->stats.output_osmux_msgs, + in->stats.output_osmux_bytes); llist_del(&h->head); osmux_xfrm_input_fini(h->in); talloc_free(h); |