summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_contacts.h2
-rw-r--r--libs/win32/mir_app.libbin309632 -> 309306 bytes
-rw-r--r--libs/win64/mir_app.libbin309812 -> 309492 bytes
-rw-r--r--plugins/QuickSearch/src/window_row.cpp2
-rw-r--r--protocols/CloudFile/src/utils.cpp2
-rw-r--r--src/mir_app/src/clistcontacts.cpp5
-rw-r--r--src/mir_app/src/mir_app.def2
-rw-r--r--src/mir_app/src/mir_app64.def2
-rw-r--r--src/mir_app/src/utils.cpp4
9 files changed, 10 insertions, 9 deletions
diff --git a/include/m_contacts.h b/include/m_contacts.h
index 44c88e2088..540b620a2c 100644
--- a/include/m_contacts.h
+++ b/include/m_contacts.h
@@ -82,7 +82,7 @@ namespace Contact
MCONTACT hContact, // contact id or NULL for the global data
const char *szProto = nullptr); // protocol for global data. if skipped, grabbed from hContact
- MIR_APP_DLL(int) GetStatus(MCONTACT hContact);
+ MIR_APP_DLL(int) GetStatus(MCONTACT hContact, const char *szProto = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// if contact is a group chat
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index e75db034bf..a6d11d98be 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 83daa19217..bb01d59223 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/QuickSearch/src/window_row.cpp b/plugins/QuickSearch/src/window_row.cpp
index 1745495d51..26466253e6 100644
--- a/plugins/QuickSearch/src/window_row.cpp
+++ b/plugins/QuickSearch/src/window_row.cpp
@@ -39,7 +39,7 @@ CRowItem::CRowItem(MCONTACT _1, QSMainDlg *pDlg) :
if (bAccDel || bAccOff)
status = ID_STATUS_OFFLINE;
else
- status = Contact::GetStatus(hContact);
+ status = Contact::GetStatus(hContact, szProto);
if (int nCount = g_plugin.m_columns.getCount()) {
pValues = new Val[nCount];
diff --git a/protocols/CloudFile/src/utils.cpp b/protocols/CloudFile/src/utils.cpp
index 90832cb861..2e917ce0c9 100644
--- a/protocols/CloudFile/src/utils.cpp
+++ b/protocols/CloudFile/src/utils.cpp
@@ -56,7 +56,7 @@ bool CanSendToContact(MCONTACT hContact)
if (!isProtoOnline)
return false;
- bool isContactOnline = Contact::GetStatus(hContact) > ID_STATUS_OFFLINE;
+ bool isContactOnline = Contact::GetStatus(hContact, proto) > ID_STATUS_OFFLINE;
if (isContactOnline)
return true;
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;