Module: kamailio
Branch: 5.2
Commit: 548955b101a1752b8525e8101014ab4e5576dc36
URL:
https://github.com/kamailio/kamailio/commit/548955b101a1752b8525e8101014ab4…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2019-02-05T21:25:44+01:00
jansson: Fix reverse logic for JSON boolean
(cherry picked from commit 0125c1c8d8c1179670def9dc4b3e66d6a8e58360)
---
Modified: src/modules/jansson/jansson_utils.c
---
Diff:
https://github.com/kamailio/kamailio/commit/548955b101a1752b8525e8101014ab4…
Patch:
https://github.com/kamailio/kamailio/commit/548955b101a1752b8525e8101014ab4…
---
diff --git a/src/modules/jansson/jansson_utils.c b/src/modules/jansson/jansson_utils.c
index 29ffc306f6..ae2040bc7c 100644
--- a/src/modules/jansson/jansson_utils.c
+++ b/src/modules/jansson/jansson_utils.c
@@ -45,7 +45,7 @@ int jansson_to_val(pv_value_t* val, char** freeme, json_t* v) {
val->rs.len = strlen(value);
val->flags = PV_VAL_STR;
}else if(json_is_boolean(v)) {
- val->ri = json_is_true(v) ? 0 : 1;
+ val->ri = json_is_true(v) ? 1 : 0;
val->flags = PV_TYPE_INT|PV_VAL_INT;
}else if(json_is_real(v)) {
char* value = NULL;