[sr-dev] git:master:531e288b: evapi: use msg->ldv.vdata for local env data instead of hdr date workaround

Daniel-Constantin Mierla miconda at gmail.com
Wed May 27 09:23:09 CEST 2020


Module: kamailio
Branch: master
Commit: 531e288bc981de536023697e8181cc5589b4d14b
URL: https://github.com/kamailio/kamailio/commit/531e288bc981de536023697e8181cc5589b4d14b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-05-27T09:21:24+02:00

evapi: use msg->ldv.vdata for local env data instead of hdr date workaround

---

Modified: src/modules/evapi/evapi_dispatch.h

---

Diff:  https://github.com/kamailio/kamailio/commit/531e288bc981de536023697e8181cc5589b4d14b.diff
Patch: https://github.com/kamailio/kamailio/commit/531e288bc981de536023697e8181cc5589b4d14b.patch

---

diff --git a/src/modules/evapi/evapi_dispatch.h b/src/modules/evapi/evapi_dispatch.h
index fa6135ae22..23b4c2565c 100644
--- a/src/modules/evapi/evapi_dispatch.h
+++ b/src/modules/evapi/evapi_dispatch.h
@@ -46,9 +46,9 @@ int pv_get_evapi(sip_msg_t *msg,  pv_param_t *param, pv_value_t *res);
 int pv_set_evapi(sip_msg_t *msg, pv_param_t *param, int op,
 		pv_value_t *val);
 
-/* set evapi env to shortcut of hdr date - not used in faked msg */
-#define evapi_set_msg_env(_msg, _evenv) do { _msg->date=(hdr_field_t*)_evenv; } while(0)
-#define evapi_get_msg_env(_msg) ((evapi_env_t*)_msg->date)
+/* set/get evapi env */
+#define evapi_set_msg_env(_msg, _evenv) do { _msg->ldv.vdata=(void*)_evenv; } while(0)
+#define evapi_get_msg_env(_msg) ((evapi_env_t*)_msg->ldv.vdata)
 
 int evapi_cfg_close(sip_msg_t *msg);
 int evapi_set_tag(sip_msg_t* msg, str* stag);




More information about the sr-dev mailing list