diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clistcontacts.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/utils.cpp | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/mir_app/src/clistcontacts.cpp b/src/mir_app/src/clistcontacts.cpp index 20ea6e2c59..5caa21315c 100644 --- a/src/mir_app/src/clistcontacts.cpp +++ b/src/mir_app/src/clistcontacts.cpp @@ -271,12 +271,13 @@ MIR_APP_DLL(wchar_t*) Contact::GetInfo(int type, MCONTACT hContact, const char * return nullptr; } -MIR_APP_DLL(int) Contact::GetStatus(MCONTACT hContact) +MIR_APP_DLL(int) Contact::GetStatus(MCONTACT hContact, const char *szProto) { if (hContact == 0) return ID_STATUS_OFFLINE; - const char *szProto = Proto_GetBaseAccountName(hContact); + if (szProto == nullptr) + szProto = Proto_GetBaseAccountName(hContact); if (szProto == nullptr) return ID_STATUS_OFFLINE; diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 0041a0dba8..eba807313d 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -485,7 +485,7 @@ Proto_GetStatus @601 ?IsReadyToExit@PROTO_INTERFACE@@UAE_NXZ @606 NONAME
?OnModulesLoaded@PROTO_INTERFACE@@UAEXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UAEXXZ @608 NONAME
-?GetStatus@Contact@@YGHI@Z @609 NONAME
+?GetStatus@Contact@@YGHIPBD@Z @609 NONAME
?OnContactDeleted@PROTO_INTERFACE@@UAE_NII@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UAEXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UAEXXZ @612 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 5390e1d7fc..aa2b1a2bbb 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -485,7 +485,7 @@ Proto_GetStatus @601 ?IsReadyToExit@PROTO_INTERFACE@@UEAA_NXZ @606 NONAME
?OnModulesLoaded@PROTO_INTERFACE@@UEAAXXZ @607 NONAME
?OnShutdown@PROTO_INTERFACE@@UEAAXXZ @608 NONAME
-?GetStatus@Contact@@YAHI@Z @609 NONAME
+?GetStatus@Contact@@YAHIPEBD@Z @609 NONAME
?OnContactDeleted@PROTO_INTERFACE@@UEAA_NII@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UEAAXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UEAAXXZ @612 NONAME
diff --git a/src/mir_app/src/utils.cpp b/src/mir_app/src/utils.cpp index aed4cd1586..b67ec4f2da 100644 --- a/src/mir_app/src/utils.cpp +++ b/src/mir_app/src/utils.cpp @@ -348,7 +348,7 @@ bool ProcessFileDrop(HDROP hDrop, MCONTACT hContact) if (!(pcaps & PF1_FILESEND))
return false;
- if (Contact::GetStatus(hContact) == ID_STATUS_OFFLINE) {
+ if (Contact::GetStatus(hContact, szProto) == ID_STATUS_OFFLINE) {
pcaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4);
if (!(pcaps & PF4_OFFLINEFILES))
return false;
@@ -393,7 +393,7 @@ void SendHBitmapAsFile(HBITMAP hbmp, MCONTACT hContact) if (!(protoCaps & PF1_FILESEND))
return;
- if ((ID_STATUS_OFFLINE == wMyStatus) || (ID_STATUS_OFFLINE == Contact::GetStatus(hContact) && !(typeCaps & PF4_OFFLINEFILES)))
+ if ((ID_STATUS_OFFLINE == wMyStatus) || (ID_STATUS_OFFLINE == Contact::GetStatus(hContact, szProto) && !(typeCaps & PF4_OFFLINEFILES)))
return;
IMGSRVC_INFO ii;
|