Problems Understanding the code

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

 



Hi,

I was going through the pjsip code and found that a lot of linked list is
used  throughout the code to add new headers,remove and manupulate them.
but ,what i am unsure at the moment is the type of linked list used for it
(i guess we are using circular linked liist but i am not sure)

how i guessed it...
 in this function of pjsip  pjsip_auth_clt_reinit_req

the line  hdr = rdata->msg_info.msg->hdr.next;
   while (hdr != &rdata->msg_info.msg->hdr) {


tells me that hdr is pointing to the next instance and with the help of hdr
ponter we are traversing the entire linked list until we reach the same
position from where we started.
i would be really great  if someone could point out the type of linked list
employed.

Also,in the same functon i find this line..
 cached_auth->is_proxy = (hchal->type == PJSIP_H_PROXY_AUTHENTICATE);

i tried to find  (const pjsip_www_authenticate_hdr *hchal;) hcal->type i.e
to be precise* type* is the member i tried to find but to no avail,also
besides *type*  i see many extensions such as *slen* and* next* which are
not part of the structure and are throughly used throughout the code.

I am a beginner so please,overlook my silly questions and help me in
understanding the flow.


Thanks in Advance.
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110206/0d59daab/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