Module: kamailio
Branch: master
Commit: 930c69a88119c60560d815035d5bae2c95824a2a
URL:
https://github.com/kamailio/kamailio/commit/930c69a88119c60560d815035d5bae2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-15T11:48:29+02:00
app_jsdt: for now return NULL for array and map kemi results
- free result structure
---
Modified: src/modules/app_jsdt/app_jsdt_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/930c69a88119c60560d815035d5bae2…
Patch:
https://github.com/kamailio/kamailio/commit/930c69a88119c60560d815035d5bae2…
---
diff --git a/src/modules/app_jsdt/app_jsdt_api.c b/src/modules/app_jsdt/app_jsdt_api.c
index e313803bba..ff4e629075 100644
--- a/src/modules/app_jsdt/app_jsdt_api.c
+++ b/src/modules/app_jsdt/app_jsdt_api.c
@@ -176,6 +176,16 @@ int sr_kemi_jsdt_return_xval(duk_context *J, sr_kemi_t *ket,
sr_kemi_xval_t *rx)
duk_push_boolean(J, SRJSDT_FALSE);
}
return 1;
+ case SR_KEMIP_ARRAY:
+ LM_ERR("unsupported return type: array\n");
+ sr_kemi_xval_free(rx);
+ duk_push_string(J, NULL);
+ return 1;
+ case SR_KEMIP_DICT:
+ LM_ERR("unsupported return type: map\n");
+ sr_kemi_xval_free(rx);
+ duk_push_string(J, NULL);
+ return 1;
case SR_KEMIP_XVAL:
/* unknown content - return false */
duk_push_boolean(J, SRJSDT_FALSE);