Multiple subscribes in a dialog question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux