summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 00:53:10 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 00:53:10 +0000
commitce2af47d41cc790df1b18d9e80295a38747de19f (patch)
treeb9e75709ec7e75dada1c77a3ea70f1304091cae9 /protocols/SkypeClassic
parenta5574d24bc8c0e94c8880c75f0fd27d08d30b98b (diff)
code cleanup, x64 fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11163 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic')
-rw-r--r--protocols/SkypeClassic/src/skype.cpp22
-rw-r--r--protocols/SkypeClassic/src/skypeapi.cpp2
2 files changed, 12 insertions, 12 deletions
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp
index d9f8502980..52d08a6a45 100644
--- a/protocols/SkypeClassic/src/skype.cpp
+++ b/protocols/SkypeClassic/src/skype.cpp
@@ -1689,12 +1689,12 @@ void LaunchSkypeAndSetStatusThread(void *) {
if (bLaunching) return;
bLaunching = TRUE;
LOG(("LaunchSkypeAndSetStatusThread started."));
- InterlockedExchange((long *)&SkypeStatus, (int)ID_STATUS_CONNECTING);
+ InterlockedExchange((long *)&SkypeStatus, ID_STATUS_CONNECTING);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, SkypeStatus);
if (ConnectToSkypeAPI(skype_path, 1) != -1) {
pthread_create((pThreadFunc)SkypeSystemInit, NULL);
- //InterlockedExchange((long *)&SkypeStatus, (int)newStatus);
+ //InterlockedExchange((long *)&SkypeStatus, newStatus);
//ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus);
SetUserStatus();
}
@@ -2251,17 +2251,17 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam)
//if (!SkypeInitialized && !db_get_b(NULL, SKYPE_PROTONAME, "UnloadOnOffline", 0)) return 0;
// Workaround for Skype status-bug
- if ((int)wParam == ID_STATUS_OFFLINE) logoff_contacts(TRUE);
- if (SkypeStatus == (int)wParam) return 0;
+ if (wParam == ID_STATUS_OFFLINE) logoff_contacts(TRUE);
+ if (SkypeStatus == wParam) return 0;
oldStatus = SkypeStatus;
- if ((int)wParam == ID_STATUS_CONNECTING) return 0;
+ if (wParam == ID_STATUS_CONNECTING) return 0;
#ifdef MAPDND
- if ((int)wParam == ID_STATUS_OCCUPIED || (int)wParam == ID_STATUS_ONTHEPHONE) wParam = ID_STATUS_DND;
- if ((int)wParam == ID_STATUS_OUTTOLUNCH) wParam = ID_STATUS_NA;
+ if (wParam == ID_STATUS_OCCUPIED || wParam == ID_STATUS_ONTHEPHONE) wParam = ID_STATUS_DND;
+ if (wParam == ID_STATUS_OUTTOLUNCH) wParam = ID_STATUS_NA;
#endif
#ifdef MAPNA
- if ((int)wParam==ID_STATUS_NA) wParam = ID_STATUS_AWAY;
+ if (wParam==ID_STATUS_NA) wParam = ID_STATUS_AWAY;
#endif
RequestedStatus = MirandaStatusToSkype((int)wParam);
@@ -2269,12 +2269,12 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam)
/*
if (SkypeStatus != ID_STATUS_OFFLINE)
{
- InterlockedExchange((long*)&SkypeStatus, (int)wParam);
+ InterlockedExchange((long*)&SkypeStatus, wParam);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus);
}
*/
- if ((int)wParam == ID_STATUS_OFFLINE && UnloadOnOffline)
+ if (wParam == ID_STATUS_OFFLINE && UnloadOnOffline)
{
if (UseCustomCommand)
{
@@ -2809,7 +2809,7 @@ INT_PTR SkypeAddToListByEvent(WPARAM wParam, LPARAM) {
{
MCONTACT hContact = add_contact(pBlob + sizeof(DWORD) + sizeof(HANDLE), LOWORD(wParam));
free(pBlob);
- if (hContact) return (int)hContact;
+ if (hContact) return (INT_PTR)hContact;
}
return 0;
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp
index 7c560bf510..afbde43ec8 100644
--- a/protocols/SkypeClassic/src/skypeapi.cpp
+++ b/protocols/SkypeClassic/src/skypeapi.cpp
@@ -169,7 +169,7 @@ void sendThread(char *dummy) {
// Go offline
logoff_contacts(FALSE);
oldstatus=SkypeStatus;
- InterlockedExchange((long *)&SkypeStatus, (int)ID_STATUS_OFFLINE);
+ InterlockedExchange((long *)&SkypeStatus, ID_STATUS_OFFLINE);
ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldstatus, SkypeStatus);
}
// Reconnect to Skype