瀏覽代碼

evapi: convert return code for kemi functions to match the ones from cfg equivalents

Daniel-Constantin Mierla 6 年之前
父節點
當前提交
6675a96049
共有 1 個文件被更改,包括 21 次插入4 次删除
  1. 21 4
      src/modules/evapi/evapi_mod.c

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