[sr-dev] git:master:2db33ab3: Merge pull request #1669 from micmac1/master-jsonrpc-portable

GitHub noreply at github.com
Fri Oct 12 00:34:00 CEST 2018


Module: kamailio
Branch: master
Commit: 2db33ab33441cff2c40db84b057416659f8b53b2
URL: https://github.com/kamailio/kamailio/commit/2db33ab33441cff2c40db84b057416659f8b53b2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: GitHub <noreply at github.com>
Date: 2018-10-12T00:33:54+02:00

Merge pull request #1669 from micmac1/master-jsonrpc-portable

kamctl: make jsonrpc filter portable

---

Modified: utils/kamctl/kamctl.base

---

Diff:  https://github.com/kamailio/kamailio/commit/2db33ab33441cff2c40db84b057416659f8b53b2.diff
Patch: https://github.com/kamailio/kamailio/commit/2db33ab33441cff2c40db84b057416659f8b53b2.patch

---

diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base
index adeceb77fb..a776e10d82 100644
--- a/utils/kamctl/kamctl.base
+++ b/utils/kamctl/kamctl.base
@@ -715,7 +715,7 @@ filter_json()
 	$AWK 'function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
 		BEGIN { line=0; IGNORECASE=1; }
 		{ line++; }
-		NR == 1 && /^{.+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
+		NR == 1 && /^[{].+"id"[ \t]*:[ \t]*[0-9]+[ \t]*}$/ { print; next; }
 		NR == 1 && /^200 OK/ { next; }
 		/^[ \t]*"jsonrpc":[ \t]*"2.0"/ { print; next; }
 		/^[ \t]*"result":[ \t]*\[.+/ {




More information about the sr-dev mailing list