Module: kamailio
Branch: master
Commit: 60904ee13dac929ee4f73b9be1b0592b41379019
URL:
https://github.com/kamailio/kamailio/commit/60904ee13dac929ee4f73b9be1b0592…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-22T18:35:25+01:00
kamctl: implemented miprint for unixsock ctl engine
---
Modified: utils/kamctl/kamctl.unixsock
---
Diff:
https://github.com/kamailio/kamailio/commit/60904ee13dac929ee4f73b9be1b0592…
Patch:
https://github.com/kamailio/kamailio/commit/60904ee13dac929ee4f73b9be1b0592…
---
diff --git a/utils/kamctl/kamctl.unixsock b/utils/kamctl/kamctl.unixsock
index d82e660..3124f14 100644
--- a/utils/kamctl/kamctl.unixsock
+++ b/utils/kamctl/kamctl.unixsock
@@ -62,7 +62,7 @@ unixsock_cmd()
shift
done
CMD="${CMD}\n"
-
+
printf "$CMD" | $OSERUNIX $OSER_UNIXSOCK | filter_fl
mdbg "UNIXSOCK command was:\n$CMD"
@@ -70,6 +70,24 @@ unixsock_cmd()
CTLCMD=unixsock_cmd
+unixsock_cmd_print()
+{
+ # construct the command now
+ CMD=":$1:\n";
+ shift
+ while [ -n "$1" ] ; do
+ CMD="${CMD}${1}\n"
+ shift
+ done
+ CMD="${CMD}\n"
+
+ minfo "The command is:\n"
+
+ mecho "$CMD"
+}
+
+CTLCMDPRINT=unixsock_cmd_print
+
unixsock_kamailio_monitor() {
attempt=0
if [ "$2" == "" ]; then