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

int osip_message_set_proxy_authenticate ( osip_message_t sip,
const char *  hvalue 
)

Set the Proxy-authenticate header.

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

Definition at line 33 of file osip_proxy_authenticate.c.

References osip_message::message_property, osip_list_add(), osip_proxy_authenticate_free, osip_proxy_authenticate_init, osip_proxy_authenticate_parse, and osip_message::proxy_authenticates.

Referenced by parser_init().

{
  osip_proxy_authenticate_t *proxy_authenticate;
  int i;

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

  i = osip_proxy_authenticate_init (&(proxy_authenticate));
  if (i != 0)
    return -1;
  i = osip_proxy_authenticate_parse (proxy_authenticate, hvalue);
  if (i != 0)
    {
      osip_proxy_authenticate_free (proxy_authenticate);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->proxy_authenticates, proxy_authenticate, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index