Added separate method to actually process a SIP message after identifying its transaction.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2791 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2009-08-14 12:51:05 +00:00
parent df88815dfe
commit a2835ec68d
2 changed files with 14 additions and 2 deletions

View File

@ -507,11 +507,16 @@ SIPTransaction::Processed SIPTransaction::processMessage(SIPMessage* message, co
}
}
processMessage(message);
return Matched;
}
void SIPTransaction::processMessage(SIPMessage* message)
{
if (isOutgoing())
processClientMessage(message,m_state);
else
processServerMessage(message,m_state);
return Matched;
}
void SIPTransaction::processClientMessage(SIPMessage* message, int state)

View File

@ -622,13 +622,20 @@ public:
/**
* Check if a message belongs to this transaction and process it if so
* @param message A pointer to the message to check, should not be used
* afterwards if this method returned True
* afterwards if this method returned Matched
* @param branch The branch parameter extracted from first Via header
* @return Matched if the message was handled by this transaction, in
* which case it takes ownership over the message
*/
virtual Processed processMessage(SIPMessage* message, const String& branch);
/**
* Process a message belonging to this transaction
* @param message A pointer to the message to process, the caller must
* make sure it belongs to this transaction
*/
virtual void processMessage(SIPMessage* message);
/**
* Get an event for this transaction if any is available.
* It provides default handling for invalid states, otherwise calls