diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-17 22:47:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-17 22:47:15 +0000 |
commit | 4b679c038af5dc4ad891ab28fe600b5f67a002b3 (patch) | |
tree | 53b51caf4f0925720baf7c2752fa5461137d07cc /plugins/New_GPG/src/utilities.cpp | |
parent | 070ae988a2704d6bea4733e12f644f3d02e71b7f (diff) |
a few remaining calls of MS_PROTO_BROADCASTACK removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5008 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/utilities.cpp')
-rw-r--r-- | plugins/New_GPG/src/utilities.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index ce78023bdf..b8274da3ec 100644 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -649,7 +649,7 @@ void HistoryLog(HANDLE hContact, db_event evt) Event.timestamp = (DWORD)time(NULL);
else
Event.timestamp = evt.timestamp;
- Event.cbBlob = strlen((char*)evt.pBlob)+1;
+ Event.cbBlob = (DWORD)strlen((char*)evt.pBlob)+1;
Event.pBlob = (PBYTE)_strdup((char*)evt.pBlob);
db_event_add(hContact, &Event);
}
@@ -1193,8 +1193,8 @@ const bool StriStr(const char *str, const char *substr) char *str_up = NEWTSTR_MALLOC(str);
char *substr_up = NEWTSTR_MALLOC(substr);
- CharUpperBuffA(str_up, strlen(str_up));
- CharUpperBuffA(substr_up, strlen(substr_up));
+ CharUpperBuffA(str_up, (DWORD)strlen(str_up));
+ CharUpperBuffA(substr_up, (DWORD)strlen(substr_up));
if(strstr (str_up, substr_up))
i = true;
@@ -1229,21 +1229,11 @@ struct TFakeAckParams { LPCSTR msg;
};
-int SendBroadcast( HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam ) {
- ACKDATA ack;
- memset(&ack,0,sizeof(ack));
- ack.cbSize = sizeof( ACKDATA );
- ack.szModule = GetContactProto(hContact);//szGPGModuleName;
- ack.hContact = hContact;
- ack.type = type;
- ack.result = result;
- ack.hProcess = (HANDLE)777;//hProcess;
- ack.lParam = lParam;
- return CallService( MS_PROTO_BROADCASTACK, 0, ( LPARAM )&ack );
+__forceinline int SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+{
+ return ProtoBroadcastAck( GetContactProto(hContact), hContact, type, result, hProcess, lParam);
}
-
-
unsigned __stdcall sttFakeAck( LPVOID param ) {
TFakeAckParams* tParam = ( TFakeAckParams* )param;
@@ -1312,7 +1302,7 @@ string get_random(int length) string chars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
string data;
boost::random_device rng;
- boost::variate_generator<boost::random_device&, boost::uniform_int<>> gen(rng, boost::uniform_int<>(0, chars.length()-1));
+ boost::variate_generator<boost::random_device&, boost::uniform_int<>> gen(rng, boost::uniform_int<>(0, (int)chars.length()-1));
for(int i = 0; i < length; ++i)
data += chars[gen()];
return data;
|