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

int osip_message_set_replaces ( osip_message_t sip,
const char *  hvalue 
)

Set the Replaces header.

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

Definition at line 33 of file osip_replaces.c.

References osip_message::message_property, osip_replaces_free(), osip_replaces_init(), osip_replaces_parse(), and osip_message::replaces.

Referenced by parser_init().

{
  int i;

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

  if (sip->replaces != NULL)
    return -1;
  i = osip_replaces_init (&(sip->replaces));
  if (i != 0)
    return -1;
  sip->message_property = 2;
  i = osip_replaces_parse (sip->replaces, hvalue);
  if (i != 0)
    {
      osip_replaces_free (sip->replaces);
      sip->replaces = NULL;
      return -1;
    }
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index