소스 검색

kamctl: implemented miprint for unixsock ctl engine

Daniel-Constantin Mierla 8 년 전
부모
커밋
60904ee13d
1개의 변경된 파일19개의 추가작업 그리고 1개의 파일을 삭제
  1. 19 1
      utils/kamctl/kamctl.unixsock

+ 19 - 1
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