[sr-dev] git:5.2:0ded702c: evapi: use a completely new fake message structure for dispatcher handling

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 20 12:06:12 CEST 2019


Module: kamailio
Branch: 5.2
Commit: 0ded702ccbb746a26c7172bcbf80dd971ec8b530
URL: https://github.com/kamailio/kamailio/commit/0ded702ccbb746a26c7172bcbf80dd971ec8b530

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-08-20T10:23:39+02:00

evapi: use a completely new fake message structure for dispatcher handling

(cherry picked from commit 769dce2fad66efdbc6cce6951bc60b60bf453a19)

---

Modified: src/modules/evapi/evapi_dispatch.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0ded702ccbb746a26c7172bcbf80dd971ec8b530.diff
Patch: https://github.com/kamailio/kamailio/commit/0ded702ccbb746a26c7172bcbf80dd971ec8b530.patch

---

diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c
index e603753cec..b0e1e8386b 100644
--- a/src/modules/evapi/evapi_dispatch.c
+++ b/src/modules/evapi/evapi_dispatch.c
@@ -151,8 +151,10 @@ int evapi_run_cfg_route(evapi_env_t *evenv, int rt, str *rtname)
 	if((rt<0) && (_evapi_event_callback.s==NULL || _evapi_event_callback.len<=0))
 		return 0;
 
-	fmsg = faked_msg_next();
-	memcpy(&tmsg, fmsg, sizeof(sip_msg_t));
+	if(faked_msg_get_new(&tmsg)<0) {
+		LM_ERR("failed to get a new faked message\n");
+		return -1;
+	}
 	fmsg = &tmsg;
 	evapi_set_msg_env(fmsg, evenv);
 	backup_rt = get_route_type();




More information about the sr-dev mailing list