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

int osip_message_set_accept_encoding ( osip_message_t sip,
const char *  hvalue 
)

Set the Accept-encoding header.

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

Definition at line 33 of file osip_accept_encoding.c.

References osip_message::accept_encodings, osip_message::message_property, osip_accept_encoding_free(), osip_accept_encoding_init(), osip_accept_encoding_parse(), and osip_list_add().

Referenced by parser_init().

{
  osip_accept_encoding_t *accept_encoding;
  int i;

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

  i = osip_accept_encoding_init (&accept_encoding);
  if (i != 0)
    return -1;
  i = osip_accept_encoding_parse (accept_encoding, hvalue);
  if (i != 0)
    {
      osip_accept_encoding_free (accept_encoding);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->accept_encodings, accept_encoding, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index