Module: sip-router
Branch: master
Commit: 94204ce852d16c9c9d620b7bd194737519f59c0f
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=94204ce…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Dec 13 23:08:50 2011 +0100
tls: rpc tls.info prints the limit and opened tls connections
---
modules/tls/tls_rpc.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/tls/tls_rpc.c b/modules/tls/tls_rpc.c
index 1dfa6ac..956154b 100644
--- a/modules/tls/tls_rpc.c
+++ b/modules/tls/tls_rpc.c
@@ -29,6 +29,7 @@
#include "../../rpc.h"
#include "../../tcp_conn.h"
+#include "../../tcp_info.h"
#include "../../timer.h"
#include "../../cfg/cfg.h"
#include "tls_init.h"
@@ -191,9 +192,14 @@ static const char* tls_info_doc[2] = {
static void tls_info(rpc_t* rpc, void* c)
{
+ struct tcp_gen_info ti;
void* handle;
+
+ tcp_get_info(&ti);
rpc->add(c, "{", &handle);
- rpc->struct_add(handle, "d",
+ rpc->struct_add(handle, "ddd",
+ "max_connections", ti.tls_max_connections,
+ "opened_connections", ti.tls_connections_no,
"clear_text_write_queued_bytes", tls_ct_wq_total_bytes());
}