Module: kamailio
Branch: 5.2
Commit: 0eb813ee88c03ecc5e6fb35d2a2b3225716b2fc0
URL:
https://github.com/kamailio/kamailio/commit/0eb813ee88c03ecc5e6fb35d2a2b322…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-07T13:22:49+01:00
evapi: convert return code for kemi functions to match the ones from cfg equivalents
(cherry picked from commit 6675a960490c9c72e69aab7a676a3012da2999b2)
---
Modified: src/modules/evapi/evapi_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0eb813ee88c03ecc5e6fb35d2a2b322…
Patch:
https://github.com/kamailio/kamailio/commit/0eb813ee88c03ecc5e6fb35d2a2b322…
---
diff --git a/src/modules/evapi/evapi_mod.c b/src/modules/evapi/evapi_mod.c
index c8d32ac9cb..7d3a4ecf36 100644
--- a/src/modules/evapi/evapi_mod.c
+++ b/src/modules/evapi/evapi_mod.c
@@ -586,7 +586,13 @@ static int w_evapi_set_tag(sip_msg_t* msg, char* ptag, char* p2)
*/
static int ki_evapi_relay(sip_msg_t *msg, str *sdata)
{
- return evapi_relay(sdata);
+ int ret;
+
+ ret = evapi_relay(sdata);
+
+ if(ret<0) return ret;
+
+ return (ret+1);
}
/**
@@ -598,7 +604,6 @@ static int ki_evapi_async_relay(sip_msg_t *msg, str *sdata)
unsigned int tlabel;
tm_cell_t *t = 0;
-
if(tmb.t_suspend==NULL) {
LM_ERR("evapi async relay is disabled - tm module not loaded\n");
return -1;
@@ -644,7 +649,13 @@ static int ki_evapi_async_relay(sip_msg_t *msg, str *sdata)
*/
static int ki_evapi_relay_unicast(sip_msg_t *msg, str *sdata, str *stag)
{
- return evapi_relay_unicast(sdata, stag);
+ int ret;
+
+ ret = evapi_relay_unicast(sdata, stag);
+
+ if(ret<0) return ret;
+
+ return (ret+1);
}
/**
@@ -652,7 +663,13 @@ static int ki_evapi_relay_unicast(sip_msg_t *msg, str *sdata, str
*stag)
*/
static int ki_evapi_relay_multicast(sip_msg_t *msg, str *sdata, str *stag)
{
- return evapi_relay_multicast(sdata, stag);
+ int ret;
+
+ ret = evapi_relay_multicast(sdata, stag);
+
+ if(ret<0) return ret;
+
+ return (ret+1);
}
/**