Re: [Sofia-sip-devel] Loop through all headers in a message

2009-03-02 Thread Pekka Pessi
2009/2/27 Fabio Margarido : > On Thu, Feb 26, 2009 at 18:21, Pekka Pessi wrote: >> >> You can get msg_href_t by name with msg_find_hclass(), like >> >>  msg_href_t *href = msg_find_hclass(msg_mclass(msg), name, NULL); >>  msg_header_t **slot = (char *)sip + href->hr_offset; >> >>  if (href->hr_cla

Re: [Sofia-sip-devel] Loop through all headers in a message

2009-02-27 Thread Fabio Margarido
On Thu, Feb 26, 2009 at 18:21, Pekka Pessi wrote: > You can get msg_href_t by name with msg_find_hclass(), like > > msg_href_t *href = msg_find_hclass(msg_mclass(msg), name, NULL); > msg_header_t **slot = (char *)sip + href->hr_offset; > > if (href->hr_class->hc_name[0]) { >/* Well-known h

Re: [Sofia-sip-devel] Loop through all headers in a message

2009-02-26 Thread Pekka Pessi
2009/2/26 Fabio Margarido : > I'd like to know what's the best way to check if a header is present (and > get its contents) in a sip_t (or msg_t) structure by name (as a string) or > if there is a way to loop through all the headers in a sip_t structure, > checking if each one's name matches an arb

[Sofia-sip-devel] Loop through all headers in a message

2009-02-26 Thread Fabio Margarido
Hi there, I'd like to know what's the best way to check if a header is present (and get its contents) in a sip_t (or msg_t) structure by name (as a string) or if there is a way to loop through all the headers in a sip_t structure, checking if each one's name matches an arbitrary string the user of