Logo Search packages:      
Sourcecode: wengophone version File versions  Download package

int osip_message_header_get_byname ( const osip_message_t sip,
const char *  hname,
int  pos,
osip_header_t **  dest 

Find an "unknown" header. (not defined in oSIP)

sip The element to work on.
hname The name of the header to find.
pos The index where to start searching for the header.
dest A pointer to the header found.

Definition at line 153 of file osip_header.c.

References osip_message::headers, osip_header::hname, osip_list_get(), and osip_list_size().

Referenced by eXosip_register(), and osip_message_set_header().

  int i;
  osip_header_t *tmp;

  *dest = NULL;
  i = pos;
  if (osip_list_size (sip->headers) <= pos)
    return -1;                /* NULL */
  while (osip_list_size (sip->headers) > i)
      tmp = (osip_header_t *) osip_list_get (sip->headers, i);
      if (osip_strcasecmp (tmp->hname, hname) == 0)
        *dest = tmp;
        return i;
  return -1;                  /* not found */

Generated by  Doxygen 1.6.0   Back to index