Trim any leading or trailing whitespaces from returned route.

An empty route causes a "noroute" error.


git-svn-id: http://yate.null.ro/svn/yate/trunk@4790 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-12-22 13:46:09 +00:00
parent d67564675c
commit 0a8aec34aa
1 changed files with 1 additions and 1 deletions

View File

@ -1617,7 +1617,7 @@ bool Router::route()
// chan will keep it referenced even if message user data is changed
m_msg->userData(chan);
if (ok) {
if (ok && m_msg->retValue().trimSpaces()) {
if ((m_msg->retValue() == YSTRING("-")) || (m_msg->retValue() == YSTRING("error")))
chan->callRejected(m_msg->getValue(YSTRING("error"),"unknown"),
m_msg->getValue("reason"),m_msg);