Module: kamailio
Branch: master
Commit: 3cefc76ade4046962962f112beafe939d5ff2ed0
URL:
https://github.com/kamailio/kamailio/commit/3cefc76ade4046962962f112beafe93…
Author: Jason Newman <jason(a)getweave.com>
Committer: Jason Newman <jason(a)getweave.com>
Date: 2015-08-10T17:20:26-06:00
janssonrpc-c: correct jansson_get parameter order in examples
parameter order should be jansson_get(key/path, src, dst) and not jansson_get(src,
key/path, dst)
---
Modified: modules/janssonrpc-c/README
Modified: modules/janssonrpc-c/doc/janssonrpc-c_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/3cefc76ade4046962962f112beafe93…
Patch:
https://github.com/kamailio/kamailio/commit/3cefc76ade4046962962f112beafe93…
---
diff --git a/modules/janssonrpc-c/README b/modules/janssonrpc-c/README
index d585e05..53c3ca2 100644
--- a/modules/janssonrpc-c/README
+++ b/modules/janssonrpc-c/README
@@ -308,12 +308,12 @@ E;retry=1");
}
route[RESPONSE] {
- if(jansson_get($var(jsrpc_result), "internal_error",
"$var(internal)"))
+ if(jansson_get("internal_error", $var(jsrpc_result),
"$var(internal)"))
{
route(INTERNAL);
- } else if(jansson_get($var(jsrpc_result), "error",
"$var(error)")) {
+ } else if(jansson_get("error", $var(jsrpc_result),
"$var(error)")) {
route(ERROR);
- } else if(jansson_get($var(jsrpc_result), "result",
"$var(result)")) {
+ } else if(jansson_get("result", $var(jsrpc_result),
"$var(result)")) {
route(RESULT);
}
t_reply("200", "OK");
@@ -326,15 +326,15 @@ route[RESULT] {
route[ERROR] {
xlog("There was an error\n");
- if(jansson_get($var(error), "code", "$var(c)")) {
+ if(jansson_get("code", $var(error), "$var(c)")) {
xlog("code is $var(c)\n");
}
- if(jansson_get($var(error), "message", "$var(r)")) {
+ if(jansson_get("message", $var(error), "$var(r)")) {
xlog("error is $var(r)\n");
}
- if(jansson_get($var(error), "data", "$var(d)")) {
+ if(jansson_get("data", $var(error), "$var(d)")) {
xlog("data is $var(d)\n");
}
}
@@ -342,13 +342,13 @@ route[ERROR] {
route[INTERNAL] {
xlog("There was an internal error\n");
- jansson_get($var(internal), "code", "$var(c)");
+ jansson_get("code", $var(internal), "$var(c)");
xlog("code is $var(c)\n");
- jansson_get($var(internal), "message", "$var(r)");
+ jansson_get("message", $var(internal), "$var(r)");
xlog("error is $var(r)\n");
- if(jansson_get($var(internal), "data", "$var(d)")) {
+ if(jansson_get("data", $var(internal), "$var(d)")) {
xlog("request is $var(d)\n");
}
}
diff --git a/modules/janssonrpc-c/doc/janssonrpc-c_admin.xml
b/modules/janssonrpc-c/doc/janssonrpc-c_admin.xml
index 27f0f45..4ae65c0 100644
--- a/modules/janssonrpc-c/doc/janssonrpc-c_admin.xml
+++ b/modules/janssonrpc-c/doc/janssonrpc-c_admin.xml
@@ -356,11 +356,11 @@ route {
}
route[RESPONSE] {
- if(jansson_get($var(jsrpc_result), "internal_error",
"$var(internal)")) {
+ if(jansson_get("internal_error", $var(jsrpc_result),
"$var(internal)")) {
route(INTERNAL);
- } else if(jansson_get($var(jsrpc_result), "error", "$var(error)"))
{
+ } else if(jansson_get("error", $var(jsrpc_result), "$var(error)"))
{
route(ERROR);
- } else if(jansson_get($var(jsrpc_result), "result", "$var(result)"))
{
+ } else if(jansson_get("result", $var(jsrpc_result), "$var(result)"))
{
route(RESULT);
}
t_reply("200", "OK");
@@ -373,15 +373,15 @@ route[RESULT] {
route[ERROR] {
xlog("There was an error\n");
- if(jansson_get($var(error), "code", "$var(c)")) {
+ if(jansson_get("code", $var(error), "$var(c)")) {
xlog("code is $var(c)\n");
}
- if(jansson_get($var(error), "message", "$var(r)")) {
+ if(jansson_get("message", $var(error), "$var(r)")) {
xlog("error is $var(r)\n");
}
- if(jansson_get($var(error), "data", "$var(d)")) {
+ if(jansson_get("data", $var(error), "$var(d)")) {
xlog("data is $var(d)\n");
}
}
@@ -389,13 +389,13 @@ route[ERROR] {
route[INTERNAL] {
xlog("There was an internal error\n");
- jansson_get($var(internal), "code", "$var(c)");
+ jansson_get("code", $var(internal), "$var(c)");
xlog("code is $var(c)\n");
- jansson_get($var(internal), "message", "$var(r)");
+ jansson_get("message", $var(internal), "$var(r)");
xlog("error is $var(r)\n");
- if(jansson_get($var(internal), "data", "$var(d)")) {
+ if(jansson_get("data", $var(internal), "$var(d)")) {
xlog("request is $var(d)\n");
}
}