Skip to content

Commit

Permalink
evapi: convert return code for kemi functions to match the ones from …
Browse files Browse the repository at this point in the history
…cfg equivalents
  • Loading branch information
miconda committed Nov 7, 2018
1 parent 2b295f8 commit 6675a96
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/modules/evapi/evapi_mod.c
Expand Up @@ -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);
}

/**
Expand All @@ -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;
Expand Down Expand Up @@ -644,15 +649,27 @@ 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);
}

/**
*
*/
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);
}

/**
Expand Down

0 comments on commit 6675a96

Please sign in to comment.