Module: kamailio
Branch: master
Commit: 6be53f64755358334e9f1c0971ce886a5e299efb
URL:
https://github.com/kamailio/kamailio/commit/6be53f64755358334e9f1c0971ce886…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-02-26T18:42:23+01:00
core: kemi - wraper to execute top routing function
- reset the static buffer for selects and script flags
---
Modified: src/core/kemi.c
Modified: src/core/kemi.h
---
Diff:
https://github.com/kamailio/kamailio/commit/6be53f64755358334e9f1c0971ce886…
Patch:
https://github.com/kamailio/kamailio/commit/6be53f64755358334e9f1c0971ce886…
---
diff --git a/src/core/kemi.c b/src/core/kemi.c
index d15e0216fd..3457c6e860 100644
--- a/src/core/kemi.c
+++ b/src/core/kemi.c
@@ -31,6 +31,7 @@
#include "data_lump.h"
#include "data_lump_rpl.h"
#include "strutils.h"
+#include "select_buf.h"
#include "mem/shm.h"
#include "parser/parse_uri.h"
#include "parser/parse_from.h"
@@ -2265,3 +2266,20 @@ str *sr_kemi_param_map_get_params(int *ptypes)
sret.len = strlen(sret.s);
return &sret;
}
+
+/**
+ *
+ */
+int sr_kemi_route(sr_kemi_eng_t *keng, sip_msg_t *msg, int rtype,
+ str *ename, str *edata)
+{
+ flag_t sfbk;
+ int ret;
+
+ sfbk = getsflags();
+ setsflagsval(0);
+ reset_static_buffer();
+ ret = keng->froute(msg, rtype, ename, edata);
+ setsflagsval(sfbk);
+ return ret;
+}
diff --git a/src/core/kemi.h b/src/core/kemi.h
index 51ea72b43b..3321dd8b4e 100644
--- a/src/core/kemi.h
+++ b/src/core/kemi.h
@@ -145,4 +145,7 @@ str *sr_kemi_param_map_get_params(int *ptypes);
int sr_kemi_core_set_drop(sip_msg_t *msg);
+int sr_kemi_route(sr_kemi_eng_t *keng, sip_msg_t *msg, int rtype,
+ str *ename, str *edata);
+
#endif