Module: kamailio
Branch: master
Commit: 2db33ab33441cff2c40db84b057416659f8b53b2
URL:
https://github.com/kamailio/kamailio/commit/2db33ab33441cff2c40db84b0574166…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)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/2db33ab33441cff2c40db84b0574166…
Patch:
https://github.com/kamailio/kamailio/commit/2db33ab33441cff2c40db84b0574166…
---
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]*\[.+/ {