Browse code

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

Daniel-Constantin Mierla authored on 27/05/2020 07:21:24
Showing 1 changed files
... ...
@@ -46,9 +46,9 @@ int pv_get_evapi(sip_msg_t *msg,  pv_param_t *param, pv_value_t *res);
46 46
 int pv_set_evapi(sip_msg_t *msg, pv_param_t *param, int op,
47 47
 		pv_value_t *val);
48 48
 
49
-/* set evapi env to shortcut of hdr date - not used in faked msg */
50
-#define evapi_set_msg_env(_msg, _evenv) do { _msg->date=(hdr_field_t*)_evenv; } while(0)
51
-#define evapi_get_msg_env(_msg) ((evapi_env_t*)_msg->date)
49
+/* set/get evapi env */
50
+#define evapi_set_msg_env(_msg, _evenv) do { _msg->ldv.vdata=(void*)_evenv; } while(0)
51
+#define evapi_get_msg_env(_msg) ((evapi_env_t*)_msg->ldv.vdata)
52 52
 
53 53
 int evapi_cfg_close(sip_msg_t *msg);
54 54
 int evapi_set_tag(sip_msg_t* msg, str* stag);