Module: sip-router
Branch: 3.3
Commit: c70012b1252174c66771f8d81611d2428ea48e50
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c70012b1252174c66771f8d81611d2428ea48e50

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Fri Jun 15 17:17:07 2012 +0200

dialog(k): proper local linking of profile before dlg is created

- reported by Nick R.
(cherry picked from commit 80c4f4b1d9ff31e79c999b82db35c3b9abc56e22)

---

 modules_k/dialog/dlg_profile.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules_k/dialog/dlg_profile.c b/modules_k/dialog/dlg_profile.c
index c8e3150..70ec2c5 100644
--- a/modules_k/dialog/dlg_profile.c
+++ b/modules_k/dialog/dlg_profile.c
@@ -468,6 +468,13 @@ int set_dlg_profile(struct sip_msg *msg, str *value, 
struct dlg_profile_table *p
                /* add linker directly to the dialog and profile */
                link_dlg_profile( linker, dlg);
        } else {
+               /* if existing linkers are not from current request, just 
discard them */
+               if (msg->id!=current_dlg_msg_id || 
msg->pid!=current_dlg_msg_pid) {
+                       current_dlg_msg_id = msg->id;
+                       current_dlg_msg_pid = msg->pid;
+                       destroy_linkers(current_pending_linkers);
+                       current_pending_linkers = NULL;
+               }
                /* no dialog yet -> set linker as pending */
                if (msg->id!=current_dlg_msg_id || 
msg->pid!=current_dlg_msg_pid) {
                        current_dlg_msg_id = msg->id;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to