[sr-dev] git:master: presence(k): updated to use hooks attribute of dialog event header
Daniel-Constantin Mierla
miconda at gmail.com
Wed Sep 29 23:35:41 CEST 2010
Module: sip-router
Branch: master
Commit: caa38207fe7ff51b1f983d3d43cd5c7d1e05fbc7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=caa38207fe7ff51b1f983d3d43cd5c7d1e05fbc7
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Wed Sep 29 23:32:11 2010 +0200
presence(k): updated to use hooks attribute of dialog event header
---
modules_k/presence/event_list.c | 16 ++++++++++------
modules_k/presence/utils_func.h | 3 ++-
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/modules_k/presence/event_list.c b/modules_k/presence/event_list.c
index b9ed39e..a8d3eac 100644
--- a/modules_k/presence/event_list.c
+++ b/modules_k/presence/event_list.c
@@ -90,12 +90,16 @@ event_t* shm_copy_event(event_t* e)
/* Update parameter hooks in the shmmem copy, this is needed so that
* we can test for the presence of the sla parameter even in the
* shared copy of the event */
- if (e->params.dialog.call_id == p1) ev->params.dialog.call_id = p2;
- if (e->params.dialog.from_tag == p1) ev->params.dialog.from_tag = p2;
- if (e->params.dialog.to_tag == p1) ev->params.dialog.to_tag = p2;
- if (e->params.dialog.include_session_description == p1)
- ev->params.dialog.include_session_description = p2;
- if (e->params.dialog.sla == p1) ev->params.dialog.sla = p2;
+ if (e->params.hooks.event_dialog.call_id == p1)
+ ev->params.hooks.event_dialog.call_id = p2;
+ if (e->params.hooks.event_dialog.from_tag == p1)
+ ev->params.hooks.event_dialog.from_tag = p2;
+ if (e->params.hooks.event_dialog.to_tag == p1)
+ ev->params.hooks.event_dialog.to_tag = p2;
+ if (e->params.hooks.event_dialog.include_session_description == p1)
+ ev->params.hooks.event_dialog.include_session_description = p2;
+ if (e->params.hooks.event_dialog.sla == p1)
+ ev->params.hooks.event_dialog.sla = p2;
p1= p1->next;
}
diff --git a/modules_k/presence/utils_func.h b/modules_k/presence/utils_func.h
index 5f94f0b..077fef1 100644
--- a/modules_k/presence/utils_func.h
+++ b/modules_k/presence/utils_func.h
@@ -51,7 +51,8 @@
#define EVENT_DIALOG_SLA(ev) \
((ev)->type == EVENT_DIALOG \
- && ((ev)->params.dialog.sla || (ev)->params.dialog.ma))
+ && ((ev)->params.hooks.event_dialog.sla \
+ || (ev)->params.hooks.event_dialog.ma))
static inline int uandd_to_uri(str user, str domain, str *out)
More information about the sr-dev
mailing list