From 9e7bea7606d6fed31cb71a9e1682757be47a8b8f Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Mon, 28 Jan 2013 15:37:26 +0200 Subject: old miranda compatibility fixes --- utilities.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'utilities.cpp') 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}; -- cgit v1.2.3