soc.2009.transport: 39a68c8a: Prevent User::connect to be called twice

hanzz at soc.pidgin.im hanzz at soc.pidgin.im
Tue Jun 23 14:30:23 EDT 2009


-----------------------------------------------------------------
Revision: 39a68c8a24f4e5ba656613ef6f3128de3fa50cd7
Ancestor: 82a8d3865bdac47237f4b7bc24513be164f3db8d
Author: hanzz at soc.pidgin.im
Date: 2009-06-23T18:27:25
Branch: im.pidgin.soc.2009.transport
URL: http://d.pidgin.im/viewmtn/revision/info/39a68c8a24f4e5ba656613ef6f3128de3fa50cd7

Modified files:
        user.cpp

ChangeLog: 

Prevent User::connect to be called twice

-------------- next part --------------
============================================================
--- user.cpp	7a9c685e4bcddd72b051ebf63391a1d7e32d83d6
+++ user.cpp	7e03e45e071edc8601fdf79221605ebd2c9a2ca2
@@ -806,6 +806,10 @@ void User::connect(){
 		Log().Get(m_jid) << "We are not ready for connect";
 		return;
 	}
+	if (m_account) {
+		Log().Get(m_jid) << "connect() has been called before";
+		return;
+	}
 	Log().Get(m_jid) << "Connecting with caps: " << m_capsVersion;
 	if (purple_accounts_find(m_username.c_str(), this->p->protocol()->protocol().c_str()) != NULL){
 		Log().Get(m_jid) << "this account already exists";


More information about the Commits mailing list