sip parser problem?
"Akito Nozaki" <[email protected]> Thu, 1 Feb 2007 12:02:52 -0800
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <411E0957C4307A4CBDD8749A976270693DA8A8@filesafe.windows.deltel.com> |
I'm new to the list but I couldn't find any information on this so I'm
posting message.
I'm looking at... StringMsgParser.java and I have few tests using UDP.
The problem I'm having is if I send a UDP packet that has a body
missing... it still parses correctly.
Isn't this what should be in StringMsgParser??
int bodyLength = message.getContentLength().getContentLength()
int bufferLeft = msgBuffer.length - i;
if(bodyLength > bufferLeft)
throw new ParseException("Bad body content!", 0);
Right now it just gets the remaining bytes in msgBuffer and sticks it in
the message content of message. Which is causing a SDP parse error later
down the line.
Thanks
Akito