Bug 50207 - Auto-connect for AIM doesn't work properly
Summary: Auto-connect for AIM doesn't work properly
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: ICQ and AIM Plugins (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-05 01:23 UTC by Rob Kaper
Modified: 2003-06-04 20:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Kaper 2002-11-05 01:23:01 UTC
Version:           0.5.8cvs >= 20021020 (using KDE 3.0.9 (KDE 3.1 RC1))
Installed from:    compiled sources
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19

The auto-connect feature of the AIM plugin doesn't always work properly - or at all.

Often at a new startup, it doesn't connect at all. Disconnect all seems to skip AIM as well, at least my contacts still appear online even though the status icon is gray/offline.
Comment 1 automailer 2002-11-08 17:38:55 UTC
Same here. Jabber and ICQ do connect AIM just keeps blinking (read connecting)
forever w/o ever producing results.

Disconnecting and Connecting AIM manually by clicking on the symbol works as a
work around...

Cheers,
Thorsten
Comment 2 Tim Holterhus 2002-11-15 15:26:52 UTC
Same here. Auto-connect for the AIM plugin has never worked here. 
 
Regards, 
 
   -Tim 
Comment 3 Anthony Hauk 2002-12-02 16:01:46 UTC
When looking at the configuration it does not appear there is a valid AOL 
server or port entered.  It just says Not Yet Used.  The box to enter a server 
is grayed over and when I try to connect it gives an error.  Not near my box 
right now but will update with exact error message.

- Anthony
Comment 4 Martijn Klingens 2002-12-31 16:45:29 UTC
Subject: kdenonbeta/kopete/protocols/aim

CVS commit by mklingens: 

Fix autoconnect:

// AIM depends on properly deserialized meta contacts to be able to
// connect, but the deserializing is done after the constructor ends.
// Therefore use a 0-second timer instead, which is enough to make
// it work properly.

Also some small misc cleanups.

CCMAIL: 50207-done@bugs.kde.org


  M +1 -1      Makefile.am   1.16
  M +1 -10     aimcontact.h   1.37
  M +5 -1      aimprotocol.cpp   1.92
  R            aimdeleteevent.cpp   1.3
  R            aimdeleteevent.h   1.3
  R            aimmessage.cpp   1.24
  R            aimmessage.h   1.9


--- kdenonbeta/kopete/protocols/aim/Makefile.am  #1.15:1.16
@@ -13,5 +13,5 @@
 kopete_aim_la_SOURCES = aimprotocol.cpp \
     aimcontact.cpp aimchangestatus.cpp aimuserinfo.cpp \
-    aimpreferences.cpp aimdeleteevent.cpp
+    aimpreferences.cpp
 kopete_aim_la_LDFLAGS = -no-undefined -module $(KDE_PLUGIN) $(all_libraries)
 kopete_aim_la_LIBADD  = ./taim/libkopeteaimengine.la \

--- kdenonbeta/kopete/protocols/aim/aimcontact.h  #1.36:1.37
@@ -22,5 +22,4 @@
 
 #include "aim.h"
-#include "aimmessage.h"
 #include "kopetecontact.h"
 #include "kopetemessagemanager.h"
@@ -33,5 +32,4 @@ class KPopupMenu;
 class KActionCollection;
 
-class AIMMessage;
 class AIMProtocol;
 class KopeteMetaContact;
@@ -80,5 +78,4 @@ private:
         KActionCollection* actionCollection;
 
-        AIMMessage *messageBox;
         KPopupMenu *popup;
         QPtrList<KopeteContact> theContacts;
@@ -99,11 +96,5 @@ signals:
 
 #endif
-/*
- * Local variables:
- * c-indentation-style: k&r
- * c-basic-offset: 8
- * indent-tabs-mode: t
- * End:
- */
+
 // vim: set noet ts=4 sts=4 sw=4:
 

--- kdenonbeta/kopete/protocols/aim/aimprotocol.cpp  #1.91:1.92
@@ -97,7 +97,11 @@ AIMProtocol::AIMProtocol( QObject *paren
 
         // Autoconnect if is selected in config
+        // AIM depends on properly deserialized meta contacts to be able to
+        // connect, but the deserializing is done after the constructor ends.
+        // Therefore use a 0-second timer instead, which is enough to make
+        // it work properly.
         KGlobal::config()->setGroup("AIM");
         if( KGlobal::config()->readBoolEntry("AutoConnect", false ) )
-                connect();
+                QTimer::singleShot( 0, this, SLOT( connect() ) );
 }