Bail out quickly if database query or account are empty after substitition.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4506 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-07-14 15:47:12 +00:00
parent 8d9a1e73b8
commit b6022e03b9
1 changed files with 6 additions and 0 deletions

View File

@ -420,6 +420,9 @@ bool AAAHandler::received(Message& msg)
String account(m_account);
msg.replaceParams(query,true);
msg.replaceParams(account,true);
if (query.null() || account.null())
return false;
switch (m_type)
{
case Regist:
@ -574,6 +577,9 @@ bool CDRHandler::received(Message& msg)
String account(m_account);
msg.replaceParams(query,true);
msg.replaceParams(account,true);
if (query.null() || account.null())
return false;
// failure while accounting is critical
Message m("database");
prepareQuery(m,account,query,true);