summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-21 09:48:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-21 09:48:22 +0000
commit8d5ba8b33cad9eb86066fefc29102d2734f4a292 (patch)
tree8ba73b8a9f72c76b7803249dba47bdec3b421987 /plugins/New_GPG/src
parent14581eb25783e0ffadb2af430b97074f6f1ec652 (diff)
improperly named helper renamed
git-svn-id: http://svn.miranda-ng.org/main/trunk@17110 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp38
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp4
2 files changed, 21 insertions, 21 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 61db0a7d0e..e04ccc6e7f 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -170,7 +170,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
return;
@@ -208,7 +208,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
if (_terminate) {
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
break;
@@ -249,7 +249,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
return;
@@ -278,7 +278,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
return;
@@ -311,7 +311,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
return;
@@ -354,7 +354,7 @@ void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD, DWOR
HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags));
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"Unable to decrypt PGP encrypted message");
HistoryLog(hContact, db_event("Error message sent", 0, 0, DBEF_SENT));
db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc);
return;
@@ -588,7 +588,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
string str1 = "-----PGP KEY RESPONSE-----";
str1.append(tmp);
- CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)str1.c_str());
+ ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)str1.c_str());
if (enc_state)
db_set_b(ccs->hContact, szGPGModuleName, "GPGEncryption", 1);
}
@@ -606,7 +606,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
if (CallProtoService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap))
{
- CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
+ ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
return 0;
}
}
@@ -634,7 +634,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
mir_free(caps);
if (str1.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos)
{
- CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
+ ProtoChainSend(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
return 0;
}
}
@@ -672,7 +672,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
if (!tmp[0]) {
mir_free(tmp);
HistoryLog(hContact, db_event("Failed to encrypt message with GPG (not found key for encryption in db)", 0, 0, DBEF_SENT));
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
if (!bJabberAPI || !bIsMiranda09) //force jabber to handle encrypted message by itself
@@ -734,12 +734,12 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
params.result = &result;
if (!gpg_launcher(params)) {
//mir_free(msg);
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
if (result == pxNotFound) {
//mir_free(msg);
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
}
@@ -757,11 +757,11 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
params.code = &code;
params.result = &result;
if (!gpg_launcher(params)) {
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
if (result == pxNotFound) {
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
//TODO: check gpg output for errors
@@ -781,7 +781,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
if (out.find("usage: ") != string::npos) {
MessageBox(0, TranslateT("Something is wrong, GPG does not understand us, aborting encryption."), TranslateT("Warning"), MB_OK);
//mir_free(msg);
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
if(!bDebugLog)
{
boost::system::error_code e;
@@ -830,7 +830,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
HistoryLog(hContact, db_event("Failed to encrypt message with GPG", 0, 0, DBEF_SENT));
if (bDebugLog)
debuglog << std::string(time_str() + ": info: Failed to encrypt message with GPG");
- CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
+ ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
string str_event = msg;
@@ -843,7 +843,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
debuglog << std::string(time_str() + ": adding event to contact: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)) + " on send message.");
fix_line_term(str);
- sent_msgs.push_back((HANDLE)CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str()));
+ sent_msgs.push_back((HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)toUTF8(str).c_str()));
}
INT_PTR SendMsgSvc(WPARAM w, LPARAM l)
@@ -925,7 +925,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if (CallProtoService(proto2, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) {
if (bDebugLog)
debuglog << std::string(time_str() + ": info(autoexchange, icq): sending key requiest, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
return 0;
@@ -953,7 +953,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if (str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) {
if (bDebugLog)
debuglog << std::string(time_str() + ": info(autoexchange, jabber): autoexchange capability found, sending key request, name: " + toUTF8(pcli->pfnGetContactDisplayName(hContact, 0)));
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
hcontact_data[hContact].msgs_to_send.push_back((char*)dbei->pBlob);
new boost::thread(boost::bind(send_encrypted_msgs_thread, (void*)hContact));
return 0;
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index 0ac2d3bec1..97c5999500 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -168,7 +168,7 @@ INT_PTR SendKey(WPARAM w, LPARAM)
if (szMessage[0]) {
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
db_set_b(hContact, szGPGModuleName, "GPGEncryption", 0);
- CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)szMessage);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)szMessage);
std::string msg = "Public key ";
char *keyid = UniGetContactSettingUtf(NULL, szGPGModuleName, key_id_str.c_str(), "");
if (!keyid[0]) {
@@ -1204,7 +1204,7 @@ void send_encrypted_msgs_thread(void *param)
list<string>::iterator end = hcontact_data[hContact].msgs_to_send.end();
extern std::list<HANDLE> sent_msgs;
for (list<string>::iterator p = hcontact_data[hContact].msgs_to_send.begin(); p != end; ++p) {
- sent_msgs.push_back((HANDLE)CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)p->c_str()));
+ sent_msgs.push_back((HANDLE)ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)p->c_str()));
HistoryLog(hContact, db_event((char*)p->c_str(), 0, 0, DBEF_SENT));
boost::this_thread::sleep(boost::posix_time::seconds(1));
}