Made MGCPEngine::knownCommand take a const String& to avoid unnecessarily constructing a String.
git-svn-id: http://voip.null.ro/svn/yate@3789 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
ef5a8f1e2a
commit
f12e027b64
|
@ -52,7 +52,7 @@ MGCPMessage::MGCPMessage(MGCPEngine* engine, const char* name, const char* ep, c
|
|||
m_endpoint(ep),
|
||||
m_version(ver)
|
||||
{
|
||||
if (!(engine && (engine->allowUnkCmd() || engine->knownCommand(name)))) {
|
||||
if (!(engine && (engine->allowUnkCmd() || engine->knownCommand(m_name)))) {
|
||||
Debug(engine,DebugNote,"MGCPMessage. Unknown cmd=%s [%p]",name,this);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -868,7 +868,7 @@ public:
|
|||
* @param cmd The command name to check
|
||||
* @return True if the given command is known by this engine
|
||||
*/
|
||||
inline bool knownCommand(const char* cmd)
|
||||
inline bool knownCommand(const String& cmd)
|
||||
{ Lock lock(this); return (m_knownCommands.find(cmd) != 0); }
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue