# HG changeset patch
# User Ralf Schlatterbeck <[EMAIL PROTECTED]>
# Date 1219684178 -7200
# Node ID a4948f7babf537d166ae9e30255ec20d06bb3cd0
# Parent  fd46ac98b76f3a4dd9924740af9173f0b5b8f96f
Finally fix the connect after creating an account. Looks like the
imAccount that corresponds to the sip account thinks it is already
connected after being created. For a normal sip account this was even
explicitly set in UserProfile::loginStateChangedEventHandlerThreadSafe
This leads to the real connect routine UserProfile::connectSipAccounts
never being called. I'm now doing an explicit
imAccount.setConnected(false) after creating an imAccount (either for a
Wengo or SIP-Type of account). Hopefully this has no other adverse
effects.

diff -r fd46ac98b76f -r a4948f7babf5 
wengophone/src/model/profile/UserProfile.cpp
--- a/wengophone/src/model/profile/UserProfile.cpp      Mon Aug 25 11:59:39 
2008 +0200
+++ b/wengophone/src/model/profile/UserProfile.cpp      Mon Aug 25 19:09:38 
2008 +0200
@@ -186,6 +186,7 @@ bool UserProfile::connectSipAccounts() {
        // This method is called by the Connect class.
 
        // Connect the SipAccount if not connected
+        LOG_DEBUG ("SIP_ In connectSipAccounts");
        if (_activePhoneLine && !_sipAccount->isConnected()) 
        {
                
loginStateChangedEvent(*_sipAccount,EnumSipLoginState::SipLoginStateProgress );
@@ -510,6 +511,7 @@ void UserProfile::loginStateChangedEvent
                        imAccountList = 
_imAccountManager->getIMAccountsOfProtocol(EnumIMProtocol::IMProtocolWengo);
                        if (imAccountList.size() == 0) {
                                IMAccount imAccount(_sipAccount->getIdentity(), 
_sipAccount->getPassword(), EnumIMProtocol::IMProtocolWengo);
+                               imAccount.setConnected(false);
                                _addIMAccount(imAccount);
                        }
                } else {
@@ -519,7 +521,7 @@ void UserProfile::loginStateChangedEvent
                        imAccountList = 
_imAccountManager->getIMAccountsOfProtocolVector(protocols);
                        if (imAccountList.size() == 0) {
                                IMAccount imAccount(_sipAccount->getIdentity(), 
_sipAccount->getPassword(), EnumIMProtocol::IMProtocolSIP);
-                               imAccount.setConnected(true);
+                               imAccount.setConnected(false);
                                _addIMAccount(imAccount);
                        }
                }
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  Fax:   +43/2243/26465-23
Reichergasse 131                        www:   http://www.runtux.com
A-3411 Weidling                         email: [EMAIL PROTECTED]
osAlliance member                       email: [EMAIL PROTECTED]
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to