Module: kamailio
Branch: master
Commit: 9077a87978ff57ff369f8fbc103d8c52b92be622
URL:
https://github.com/kamailio/kamailio/commit/9077a87978ff57ff369f8fbc103d8c5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-08T14:01:58+01:00
app_jsdt: exposed KSR.x.drop()
---
Modified: src/modules/app_jsdt/app_jsdt_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9077a87978ff57ff369f8fbc103d8c5…
Patch:
https://github.com/kamailio/kamailio/commit/9077a87978ff57ff369f8fbc103d8c5…
---
diff --git a/src/modules/app_jsdt/app_jsdt_api.c b/src/modules/app_jsdt/app_jsdt_api.c
index bf6686a..a903375 100644
--- a/src/modules/app_jsdt/app_jsdt_api.c
+++ b/src/modules/app_jsdt/app_jsdt_api.c
@@ -411,6 +411,17 @@ static int jsdt_sr_exit (duk_context *J)
/**
*
*/
+static int jsdt_sr_drop (duk_context *J)
+{
+ sr_kemi_core_drop(NULL);
+ duk_eval_string_noresult(J, JSDT_SR_EXIT_EXEC_STR);
+ return 0;
+}
+
+
+/**
+ *
+ */
static int jsdt_sr_modf (duk_context *J)
{
int ret;
@@ -572,6 +583,7 @@ static int jsdt_sr_modf (duk_context *J)
const duk_function_list_entry _sr_kemi_x_J_Map[] = {
{ "exit", jsdt_sr_exit, 0 /* 0 args */ },
+ { "drop", jsdt_sr_drop, 0 /* 0 args */ },
{ "modf", jsdt_sr_modf, DUK_VARARGS /* var args */ },
{ NULL, NULL, 0 }
};