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

int osip_message_set_body_mime ( osip_message_t sip,
const char *  buf,
size_t  length 

Set the Body of the SIP message. (please report bugs)

sip The element to work on.
buf the buffer containing the body.
length The length of the buffer.

Definition at line 201 of file osip_body.c.

References osip_message::bodies, osip_message::message_property, osip_body_free(), osip_body_init(), osip_body_parse_mime(), and osip_list_add().

  osip_body_t *body;
  int i;

  i = osip_body_init (&body);
  if (i != 0)
    return -1;
  i = osip_body_parse_mime (body, buf, length);
  if (i != 0)
      osip_body_free (body);
      return -1;
  sip->message_property = 2;
  osip_list_add (sip->bodies, body, -1);
  return 0;

Generated by  Doxygen 1.6.0   Back to index