[pjsip] Multiple subscribes in a dialog question.

Wang Eric eric_wanga at hotmail.com
Tue Jan 12 20:30:54 CST 2010


Hi Benny and All,
 
I have suffered a problem in these days.
When there incoming a subscribe, The on_new_transaction() will be called to create dialog sub list.
 
 dlgsub_head = (struct dlgsub*) dlg->mod_data[mod_evsub.mod.id];
 if (dlgsub_head == NULL) 
 {
  // allocate a new dlgsub instance 
    }
 
  // Point to the first dlgsub in the list..
 dlgsub = dlgsub_head->next;    
 
 
However, we have the following problem..

Please correct me in case of my missunderstand, thanks!

(1) Where the dlg->mod_data[mod_evsub.mod.id] was initialized? 
pjsip_dlg_add_usage is the one who initial the dlg->mod_data.
Is that correct?
 
(2) We found if multiple subscribes were received, the last one will overwrite the previous one in the dlgsub list.
My question was should we allocate a new node once the dlgsub not NULL
 dlgsub_head = (struct dlgsub*) dlg->mod_data[mod_evsub.mod.id];
 if (dlgsub_head == NULL) {
  // allocate new node
    }
    else
      // Allocate new node and attach to the existed list
    
 
Champion Wang

Best Regards!
 
eric_wanga at hotmail.com 

 		 	   		  
_________________________________________________________________
隨身的 Windows Live Messenger 和 Hotmail,不限時地掌握資訊盡在指間 — Windows Live for Mobile
http://3c.msn.com.tw/mobile/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100113/d15409c1/attachment.html>


More information about the pjsip mailing list