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

int osip_message_set_www_authenticate ( osip_message_t sip,
const char *  hvalue 
)

Set the Www-authenticate header.

Parameters:
sip The element to work on.
hvalue The string describing the element.

Definition at line 54 of file osip_www_authenticate.c.

References osip_message::message_property, osip_list_add(), osip_www_authenticate_free(), osip_www_authenticate_init(), osip_www_authenticate_parse(), and osip_message::www_authenticates.

Referenced by parser_init().

{
  osip_www_authenticate_t *www_authenticate;
  int i;

  if (hvalue == NULL || hvalue[0] == '\0')
    return 0;

  if (sip == NULL || sip->www_authenticates == NULL)
    return -1;
  i = osip_www_authenticate_init (&www_authenticate);
  if (i != 0)
    return -1;
  i = osip_www_authenticate_parse (www_authenticate, hvalue);
  if (i != 0)
    {
      osip_www_authenticate_free (www_authenticate);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->www_authenticates, www_authenticate, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index