From 99ad29adc195d554aa588f8e4d0cf4edbe655622 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Tue, 20 Jul 2010 10:13:33 -0400 Subject: [PATCH] [#3742] Fix IAX accounts no longer register in the daily builds --- sflphone-common/src/iax/iaxaccount.cpp | 6 +++--- sflphone-common/src/iax/iaxvoiplink.cpp | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sflphone-common/src/iax/iaxaccount.cpp b/sflphone-common/src/iax/iaxaccount.cpp index 73c04ca0e5..b0af885798 100644 --- a/sflphone-common/src/iax/iaxaccount.cpp +++ b/sflphone-common/src/iax/iaxaccount.cpp @@ -202,9 +202,9 @@ int IAXAccount::registerVoIPLink() _link->init(); // Stuff needed for IAX registration - setHostname (Manager::instance().getConfigString (_accountID, HOSTNAME)); - setUsername (Manager::instance().getConfigString (_accountID, USERNAME)); - setPassword (Manager::instance().getConfigString (_accountID, PASSWORD)); + setHostname (_hostname); + setUsername (_username); + setPassword (_password); _link->sendRegister (_accountID); diff --git a/sflphone-common/src/iax/iaxvoiplink.cpp b/sflphone-common/src/iax/iaxvoiplink.cpp index 0649b34df3..415bda1f6e 100644 --- a/sflphone-common/src/iax/iaxvoiplink.cpp +++ b/sflphone-common/src/iax/iaxvoiplink.cpp @@ -413,14 +413,18 @@ IAXVoIPLink::sendRegister (AccountID id) IAXAccount *account; bool result; + _debug("IAX: Sending registration"); + result = false; account = dynamic_cast<IAXAccount *> (getAccountPtr()); if (account->getHostname().empty()) { + _error("IAX: Error: Account hostname is empty"); return false; } if (account->getUsername().empty()) { + _error("IAX: Error: Account username is empty"); return false; } @@ -435,11 +439,11 @@ IAXVoIPLink::sendRegister (AccountID id) _regSession = iax_session_new(); if (!_regSession) { - _debug ("Error when generating new session for register"); + _debug ("IAX: Error when generating new session for register"); } else { - _debug ("IAX Sending registration to %s with user %s", account->getHostname().c_str() , account->getUsername().c_str()); + _debug ("IAX: Sending registration to %s with user %s", account->getHostname().c_str() , account->getUsername().c_str()); int val = iax_register (_regSession, account->getHostname().data(), account->getUsername().data(), account->getPassword().data(), 120); - _debug ("Return value: %d", val); + _debug ("IAX: Return value: %d", val); // set the time-out to 15 seconds, after that, resend a registration request. // until we unregister. _nextRefreshStamp = time (NULL) + 10; -- GitLab