Module: sip-router
Branch: 4.0
Commit: 77a53b8df680808a20c73953f1e5348df5d309d2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=77a53b8…
Author: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite(a)crocodile-rcs.com>
Date: Thu Jul 4 09:33:56 2013 +0100
core: Improve tcp stats output
- Add connection ref count
- Add websocket protocols
(cherry picked from commit fb4dc4b7b866239a90a4d6441ed319664697edab)
---
core_cmd.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/core_cmd.c b/core_cmd.c
index 9914737..a31d124 100644
--- a/core_cmd.c
+++ b/core_cmd.c
@@ -772,8 +772,12 @@ static void core_tcp_list(rpc_t* rpc, void* c)
/* tcp data */
if (con->rcv.proto == PROTO_TCP)
type = "TCP";
- else if (con->rcv.proto == PROTO_TCP)
+ else if (con->rcv.proto == PROTO_TLS)
type = "TLS";
+ else if (con->rcv.proto == PROTO_WSS)
+ type = "WSS";
+ else if (con->rcv.proto == PROTO_WS)
+ type = "WS";
else
type = "UNKNOWN";
@@ -811,11 +815,12 @@ static void core_tcp_list(rpc_t* rpc, void* c)
default:
state = "UNKNOWN";
}
- rpc->struct_add(handle, "dssdsdsd",
+ rpc->struct_add(handle, "dssddsdsd",
"id", con->id,
"type", type,
"state", state,
"timeout", timeout,
+ "ref_count", con->refcnt,
"src_ip", src_ip,
"src_port", con->rcv.src_port,
"dst_ip", dst_ip,