summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Twitter/src/connection.cpp2
-rw-r--r--protocols/Twitter/src/proto.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index cb54b8b00e..938f9350ff 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -115,9 +115,9 @@ bool TwitterProto::NegotiateConnection()
if (!dbName) {
screenName = dbv.pszVal;
db_set_s(0,m_szModuleName,TWITTER_KEY_NICK,dbv.pszVal);
+ db_free(&dbv);
//debugLogW("**NegotiateConnection - we have a username already in the db - %s", screenName);
}
- db_free(&dbv);
}
// twitter changed the base URL in v1.1 of the API, I don't think users will need to modify it, so
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 35ca3af92f..d034fe6772 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -63,8 +63,6 @@ TwitterProto::TwitterProto(const char *proto_name,const TCHAR *username) :
avatar_lock_ = CreateMutex(0,false,0);
twitter_lock_ = CreateMutex(0,false,0);
- SetAllContactStatuses(ID_STATUS_OFFLINE); // In case we crashed last time
-
// set Tokens and stuff
//mirandas keys
@@ -386,6 +384,8 @@ int TwitterProto::OnModulesLoaded(WPARAM,LPARAM)
evt.descr = "Tweet";
evt.flags = DETF_HISTORY | DETF_MSGWINDOW;
CallService(MS_DB_EVENT_REGISTERTYPE,0,reinterpret_cast<LPARAM>(&evt));
+
+ SetAllContactStatuses(ID_STATUS_OFFLINE); // In case we crashed last time
return 0;
}