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

int osip_message_set_record_route ( osip_message_t sip,
const char *  hvalue 
)

Set the Record-Route header.

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

Definition at line 38 of file osip_record_route.c.

References osip_message::message_property, osip_list_add(), osip_record_route_free(), osip_record_route_init(), osip_record_route_parse(), and osip_message::record_routes.

Referenced by parser_init().

{
  osip_record_route_t *record_route;
  int i;

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

  i = osip_record_route_init (&record_route);
  if (i != 0)
    return -1;
  i = osip_record_route_parse (record_route, hvalue);
  if (i != 0)
    {
      osip_record_route_free (record_route);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->record_routes, record_route, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index