HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
174 HP-UX C SIP Stack Programmer’s Guide
Working With Multipart MIME
}
/*Gets the method string from the message request line.*/
rv = RvSipMsgGetStrRequestMethod(hMsg,
startLineMethodStr,
startLineMethodStrLen,
&startLineMethodStrLen);
if(rv != RV_OK)
{
printf("Failed to get method string from message start-line");
return RV_ERROR_UNKNOWN;
}
/*Creates the correct header value string by concatenating the bad-syntax string with the
method.*/
cseqCorrectHeaderValueStr = malloc(cseqBadSyntaxLen + startLineMethodStrLen +1);
sprintf(cseqCorrectHeaderValueStr,"%s \0", cseqBadSyntaxStr);
strcat(cseqCorrectHeaderValueStr,startLineMethodStr);
/*Fixes the Cseq header by giving the correct header value
(for example "3 UPDATE").*/
rv = RvSipCSeqHeaderFix(hCSeq, cseqCorrectHeaderValueStr);
if(rv != RV_OK)
{
printf("Failed to fix cseq header");
return RV_ERROR_UNKNOWN;
}
printf("cseq header was fixed");
return RV_OK;
}
/*=========================================================================================*/
WORKING WITH
M
ULTIPART MIME
Multipart MIME is a generic mechanism that allows the encapsulation and
transfer of arbitrary chunks of data, both text and binary, within text messages.
The SIP Specification allows the usage of multipart MIME as SIP message
bodies. Multipart MIME, defined in RFC 2046, is a necessary capability for
some features, such as ISUP message tunneling through SIP, which is part of
SIP-T.