Module: kamailio
Branch: 5.2
Commit: c3065e717f686cc11ceadd8a95fd3d98c2ffe2c7
URL:
https://github.com/kamailio/kamailio/commit/c3065e717f686cc11ceadd8a95fd3d9…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2019-02-05T21:18:03+01:00
jansson: Log column on parse error
(cherry picked from commit 4038a6046bc34c92313817549c93a9f16e993032)
---
Modified: src/modules/jansson/jansson_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c3065e717f686cc11ceadd8a95fd3d9…
Patch:
https://github.com/kamailio/kamailio/commit/c3065e717f686cc11ceadd8a95fd3d9…
---
diff --git a/src/modules/jansson/jansson_funcs.c b/src/modules/jansson/jansson_funcs.c
index 012f1aba40..7eceae4e96 100644
--- a/src/modules/jansson/jansson_funcs.c
+++ b/src/modules/jansson/jansson_funcs.c
@@ -41,9 +41,9 @@ int janssonmod_get_helper(sip_msg_t* msg, str *path_s, str *src_s,
pv_spec_t *ds
json = json_loads(src_s->s, JSON_REJECT_DUPLICATES, &parsing_error);
if(!json) {
- ERR("failed to parse: %.*s\n", src_s->len, src_s->s);
- ERR("json error at line %d: %s\n",
- parsing_error.line, parsing_error.text);
+ ERR("failed to parse json: %.*s\n", src_s->len, src_s->s);
+ ERR("json error at line %d, col %d: %s\n",
+ parsing_error.line, parsing_error.column, parsing_error.text);
goto fail;
}