fix in case of no auth loaded

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@834 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 19 years ago
parent 92759417ba
commit 7c0c5caf4b

@ -286,7 +286,8 @@ void AuthB2BDialog::createCalleeSession()
AuthB2BCalleeSession::AuthB2BCalleeSession(const AmB2BCallerSession* caller,
const string& user, const string& pwd)
: credentials("", user, pwd), // domain (realm) is unused in credentials
: auth(NULL),
credentials("", user, pwd), // domain (realm) is unused in credentials
AmB2BCalleeSession(caller) {
}
@ -298,6 +299,11 @@ inline UACAuthCred* AuthB2BCalleeSession::getCredentials() {
}
void AuthB2BCalleeSession::onSipReply(const AmSipReply& reply) {
if (NULL == auth) {
AmB2BCalleeSession::onSipReply(reply);
return;
}
int cseq_before = dlg.cseq;
if (!auth->onSipReply(reply)) {
AmB2BCalleeSession::onSipReply(reply);
@ -318,10 +324,11 @@ void AuthB2BCalleeSession::onSipReply(const AmSipReply& reply) {
void AuthB2BCalleeSession::onSendRequest(const string& method, const string& content_type,
const string& body, string& hdrs, int flags, unsigned int cseq)
{
DBG("auth->onSendRequest cseq = %d\n", cseq);
auth->onSendRequest(method, content_type,
body, hdrs, flags, cseq);
if (NULL != auth) {
DBG("auth->onSendRequest cseq = %d\n", cseq);
auth->onSendRequest(method, content_type,
body, hdrs, flags, cseq);
}
AmB2BCalleeSession::onSendRequest(method, content_type,
body, hdrs, flags, cseq);

@ -1,7 +1,8 @@
/*
* $Id: $
*
* Copyright (C) 2007 Sipwise GmbH
* Copyright (C) 2008 iptego GmbH
* Based on the concept of sw_prepaid_sip, Copyright (C) 2007 Sipwise GmbH
* Based on the concept of mycc, Copyright (C) 2002-2003 Fhg Fokus
*
* This file is part of sems, a free SIP media server.

Loading…
Cancel
Save