HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with SIP Messages 171
Handling Messages with Syntax Errors
RvSipXXXHeaderGetStrBadSyntax()
Gets the bad-syntax string from the header object. Use this function in the
RvSipTransportBadSyntaxMsgEv() callback implementation to see the bad-
syntax header-value.
RvSipXXXHeaderSetStrBadSyntax()
Sets a bad syntax string to the header object and marks the header as a bad-
syntax header.
RvSipXXXHeaderFix()
Fixes a bad syntax header. This function parses a given correct header-value
string to the supplied header object. If parsing succeeds, this function places all
fields inside the object and removes the bad syntax string. If parsing fails, the
bad-syntax string in the header remains as it was.
S
AMPLE CODE The following sample code shows how to handle messages with syntax errors.
Sample One: RvSipTransportBadSyntaxMsgEv() callback implementation
This sample code demonstrates an implementation of the
RvSipTransportBadSyntaxMsgEv() callback function. In this sample, the
application tries to fix the defected headers. If it fails, the application instructs
the Stack to reject the message. Otherwise, the application chooses the
“continue processing” option.