From 76ac8652cb508adc6c3365ab2e49c7df015dac38 Mon Sep 17 00:00:00 2001 From: paulc Date: Wed, 3 May 2006 14:20:01 +0000 Subject: [PATCH] Applied authentication realm patch by Olaf Conradi. git-svn-id: http://yate.null.ro/svn/yate/trunk@770 acf43c95-373e-0410-b603-e72c3f656dc1 --- modules/ysipchan.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ysipchan.cpp b/modules/ysipchan.cpp index 0ed54812..a827c9ff 100644 --- a/modules/ysipchan.cpp +++ b/modules/ysipchan.cpp @@ -1338,7 +1338,7 @@ bool YateSIPEndPoint::generic(SIPEvent* e, SIPTransaction* t) int age = t->authUser(user); DDebug(&plugin,DebugAll,"User '%s' age %d",user.c_str(),age); if ((age < 0) || (age > 10)) { - t->requestAuth("realm","",age >= 0); + t->requestAuth(s_cfg.getValue("general","realm","Yate"),"",age >= 0); return true; } } @@ -2385,7 +2385,7 @@ bool YateSIPConnection::checkUser(SIPTransaction* t, bool refuse) return true; DDebug(this,DebugAll,"YateSIPConnection::checkUser(%p) failed, age %d [%p]",t,age,this); if (refuse) - t->requestAuth("realm","",false); + t->requestAuth(s_cfg.getValue("general","realm","Yate"),"",age >= 0); return false; } @@ -2630,7 +2630,7 @@ void YateSIPConnection::callRejected(const char* error, const char* reason, cons int code = lookup(error,dict_errors,500); if (m_tr && (m_tr->getState() == SIPTransaction::Process)) { if (code == 401) - m_tr->requestAuth("realm","",false); + m_tr->requestAuth(s_cfg.getValue("general","realm","Yate"),"",false); else m_tr->setResponse(code,reason); }