diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-01-29 04:24:27 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-01-29 04:24:27 +0000 |
commit | 2f958f64f8cb93f22bf757437e462019cbe78231 (patch) | |
tree | 56844a7506e0d6b4bf4c500464176c0ddb50b75d | |
parent | 072c5422b843d5dc66f6aa36450dfe9759ac4330 (diff) |
fix broken set status to online behaviour
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@87 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | metacontacts/meta_services.c | 7 | ||||
-rw-r--r-- | metacontacts/version.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/metacontacts/meta_services.c b/metacontacts/meta_services.c index 0b7a15f..d051937 100644 --- a/metacontacts/meta_services.c +++ b/metacontacts/meta_services.c @@ -67,6 +67,7 @@ char proto_names[MAX_PROTOCOLS * 128]; HANDLE hProtoIcons[MAX_PROTOCOLS * 2]; // online and offline icons
UINT_PTR setStatusTimerId = 0;
+BOOL firstSetOnline = TRUE; // see Meta_SetStatus function
/** Get the capabilities of the "MetaContacts" protocol.
*
@@ -167,7 +168,7 @@ void CALLBACK SetStatusThread(HWND hWnd, UINT msg, UINT_PTR id, DWORD dw) //Sleep(options.set_status_from_offline_delay);
- mcStatus = (int)ID_STATUS_OFFLINE;
+ mcStatus = (int)ID_STATUS_ONLINE;
ProtoBroadcastAck(META_PROTO,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS, (HANDLE)previousMode, mcStatus);
//return 0;
@@ -180,10 +181,12 @@ void CALLBACK SetStatusThread(HWND hWnd, UINT msg, UINT_PTR id, DWORD dw) */
int Meta_SetStatus(WPARAM wParam,LPARAM lParam)
{
- if(mcStatus == ID_STATUS_OFFLINE) {
+ // firstSetOnline starts out true - used to delay metacontact's 'onlineness' to prevent double status notifications on startup
+ if(mcStatus == ID_STATUS_OFFLINE && firstSetOnline) {
// causes crash on exit if miranda is closed in under options.set_status_from_offline milliseconds!
//CloseHandle( CreateThread( NULL, 0, SetStatusThread, (void *)wParam, 0, 0 ));
setStatusTimerId = SetTimer(0, 0, options.set_status_from_offline_delay, SetStatusThread);
+ firstSetOnline = FALSE;
} else {
previousMode = mcStatus;
mcStatus = (int)wParam;
diff --git a/metacontacts/version.h b/metacontacts/version.h index e68a2ca..bc63713 100644 --- a/metacontacts/version.h +++ b/metacontacts/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 12
#define __RELEASE_NUM 2
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|