summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2013-01-28 15:37:26 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2013-01-28 15:37:26 +0200
commit9e7bea7606d6fed31cb71a9e1682757be47a8b8f (patch)
tree4032ff5c7d7b73b68c25cc30e8f0417d5b22e545 /utilities.cpp
parent11fb01577835fbe3dbc309c690ae646080762742 (diff)
old miranda compatibility fixes
Diffstat (limited to 'utilities.cpp')
-rwxr-xr-xutilities.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/utilities.cpp b/utilities.cpp
index 0a996e1..dd94ac9 100755
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -630,7 +630,7 @@ int onSendFile(WPARAM w, LPARAM l)
CCSDATA *ccs=(CCSDATA*)l;
if(isContactSecured(ccs->hContact))
{
- LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
DWORD uin = DBGetContactSettingDword(ccs->hContact, proto, "UIN", 0);
bool cap_found = false, supported_proto = false;
if(uin)
@@ -1538,7 +1538,7 @@ void ExportGpGKeysFunc(int type)
return; //TODO: handle error
if(!type || type == 2)
{
- for(HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, (LPARAM)0))
{
char *k = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", "");
if(!k[0])
@@ -1548,8 +1548,7 @@ void ExportGpGKeysFunc(int type)
}
std::string key = k;
mir_free(k);
-
- const char* proto = (const char*)GetContactProto(hContact);
+ char *proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
std::string id = "Comment: login ";
const char * uid = (const char*)CallProtoService(proto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0);
DBVARIANT dbv = {0};