[sr-dev] git:5.2:c3065e71: jansson: Log column on parse error

Henning Westerholt hw at kamailio.org
Tue Feb 5 21:29:12 CET 2019


Module: kamailio
Branch: 5.2
Commit: c3065e717f686cc11ceadd8a95fd3d98c2ffe2c7
URL: https://github.com/kamailio/kamailio/commit/c3065e717f686cc11ceadd8a95fd3d98c2ffe2c7

Author: Alex Hermann <alex at hexla.nl>
Committer: Henning Westerholt <hw at 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/c3065e717f686cc11ceadd8a95fd3d98c2ffe2c7.diff
Patch: https://github.com/kamailio/kamailio/commit/c3065e717f686cc11ceadd8a95fd3d98c2ffe2c7.patch

---

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;
 	}
 




More information about the sr-dev mailing list