HP-UX C SIP Stack Message Layer Reference Guide (January 2008)

56 HP C SIP Stack Message Layer Reference Guide
Get and Set Functions
RvSipMsgSetBody()
RvSipMsgSetBody()
DESCRIPTION
Sets a body in the message and updates the content-length parameter with the
body length. Remember to update the Content-Type value according to the new
body type.
SYNTAX
RvStatus RvSipMsgSetBody(
IN RvSipMsgHandle hSipMsg,
IN RvChar* strBody);
PARAMETERS
hSipMsg
The handle to the message.
strBody
SIP message body to be set in the message. If NULL is supplied, the existing
body is removed and the message contentLength is set to zero.
RETURN VALUES
Returns RvStatus.
REMARKS
You can use RvSipMsgSetBody() only when the body string does not contain
NULL characters.
To set body string that contains NULL characters you must first
get the body object from the message using
RvSipMsgGetBodyObject(). Then you can use
RvSipBodySetBodyStr() to set the body string.
You can also use RvSipBodyConstructInMsg() to construct a
new body object in the message.