Module: sems
Branch: master
Commit: 93edd3cfe41a44a54d47cf5dd7c271734180d6eb
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=93edd3cfe41a44a54d47cf5dd7c271734180d6eb

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Jul  9 15:28:18 2014 +0200

stats: added dump_transactions command (to dbg log)

---

 core/plug-in/stats/StatsUDPServer.cpp |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/core/plug-in/stats/StatsUDPServer.cpp 
b/core/plug-in/stats/StatsUDPServer.cpp
index 7115bba..b5c7909 100644
--- a/core/plug-in/stats/StatsUDPServer.cpp
+++ b/core/plug-in/stats/StatsUDPServer.cpp
@@ -36,6 +36,8 @@
 #include "AmPlugIn.h"
 #include "AmApi.h"
 
+#include "sip/trans_table.h"
+
 #include <string>
 using std::string;
 
@@ -301,6 +303,8 @@ int StatsUDPServer::execute(char* msg_buf, string& reply,
       "get_cpsavg                         -  get calls per second (5 sec 
average)\n"
       "get_cpsmax                         -  get maximum of CPS since the last 
query\n"
 
+      "dump_transactions                  -  dump transaction table to log 
(loglevel debug)\n"
+
       "DI <factory> <function> (<args>)*  -  invoke DI command\n"
       "\n"
       "When in shutdown mode, SEMS will answer with the configured 5xx 
errorcode to\n"
@@ -310,6 +314,10 @@ int StatsUDPServer::execute(char* msg_buf, string& reply,
   else if (cmd_str == "version") {
     reply = SEMS_VERSION;
   }
+  else if (cmd_str == "dump_transactions") {
+    dumps_transactions();
+    reply = "200 OK";
+  }
   else if (cmd_str.length() > 4 && cmd_str.substr(0, 4) == "set_") {
     // setters 
     if (cmd_str.substr(4, 8) == "loglevel") {

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to