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

int osip_message_set_error_info ( osip_message_t sip,
const char *  hvalue 
)

Set the Error-info header.

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

Definition at line 29 of file osip_error_info.c.

References osip_message::error_infos, osip_message::message_property, osip_error_info_free, osip_error_info_init, osip_error_info_parse, and osip_list_add().

Referenced by parser_init().

{
  osip_error_info_t *error_info;
  int i;

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

  i = osip_error_info_init (&error_info);
  if (i != 0)
    return -1;
  i = osip_error_info_parse (error_info, hvalue);
  if (i != 0)
    {
      osip_error_info_free (error_info);
      return -1;
    }
  sip->message_property = 2;
  osip_list_add (sip->error_infos, error_info, -1);
  return 0;
}


Generated by  Doxygen 1.6.0   Back to index