if ((flag == MsnP2PMessage.FLAG_NONE || flag==MsnP2PMessage.FLAG_OLD_NONE)&&
sessionId == 0 &&
totalLength == currentLength) {
MsnP2PSlpMessage slpMessage = new MsnP2PSlpMessage();
slpMessage.parseMessage(message);
MsnslpMessage msg = slpMessage.getSlpMessage();
if (msg instanceof MsnslpRequest) {
MsnslpRequest msnslpRequest = (MsnslpRequest) slpMessage
.getSlpMessage();
if (msnslpRequest.getRequestMethod() != null &&
msnslpRequest.getRequestMethod().
equals(MsnP2PByeMessage.METHOD_BYE)) {
return new MsnP2PByeMessage();
}
if (msnslpRequest.getRequestMethod() != null
&& msnslpRequest.getRequestMethod().
equals(MsnP2PInvitationMessage.METHOD_INVITE)) {
return new MsnP2PInvitationMessage();
}
}
return slpMessage;
}
if(flag == MsnP2PMessage.FLAG_OLD_NONE)
{
MsnP2PSlpMessage slpMessage = new MsnP2PSlpMessage();
slpMessage.parseMessage(message);
MsnslpMessage msg = slpMessage.getSlpMessage();
if (msg instanceof MsnslpRequest)
{
MsnslpRequest msnslpRequest = (MsnslpRequest) slpMessage
.getSlpMessage();
if (msnslpRequest.getRequestMethod() == null)