presence(k): updated to use hooks attribute of dialog event header
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 29 Sep 2010 21:32:11 +0000 (23:32 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 29 Sep 2010 21:32:11 +0000 (23:32 +0200)
modules_k/presence/event_list.c
modules_k/presence/utils_func.h

index b9ed39e..a8d3eac 100644 (file)
@@ -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;
        }
index 5f94f0b..077fef1 100644 (file)
@@ -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)