diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-07 19:17:54 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-07 19:17:54 +0000 |
commit | aed337ad90f145991a39b7900b8d42dc18178366 (patch) | |
tree | ca09e611f0f0fd6f6ba8c83364f548d097e3ab2e /plugins/SecureIM/src/svcs_proto.cpp | |
parent | f19019ce1e932f1c773ca00e87fd64aea6e32430 (diff) |
SecureIM:
- Minor Fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12661 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src/svcs_proto.cpp')
-rw-r--r-- | plugins/SecureIM/src/svcs_proto.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index e583506158..0ebc1de9ed 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -487,11 +487,10 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) // pass unhandled messages
if (!ptr || ssig == SiG_GAME || ssig == SiG_PGPM || ssig == SiG_SECU || ssig == SiG_SECP ||
- isChatRoom(pccsd->hContact) || stat == -1 ||
- (ssig == SiG_NONE && ptr->sendQueue) || (ssig == SiG_NONE && ptr->status == STATUS_DISABLED)) {
- return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
-
- Sent_NetLog("onSendMsg: pass unhandled");
+ isChatRoom(pccsd->hContact) || stat == -1 ||
+ (ssig == SiG_NONE && ptr->sendQueue) || (ssig == SiG_NONE && ptr->status == STATUS_DISABLED)) {
+ Sent_NetLog("onSendMsg: pass unhandled");
+ return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
}
//
@@ -840,9 +839,11 @@ int __cdecl onProtoAck(WPARAM wParam, LPARAM lParam) ACKDATA *ack = (ACKDATA*)lParam;
if (ack->type != ACKTYPE_FILE) return 0; //quit if not file transfer event
PROTOFILETRANSFERSTATUS *f = (PROTOFILETRANSFERSTATUS*)ack->lParam;
+ if (!f)
+ return 0;
pUinKey ptr = getUinKey(ack->hContact);
- if (!ptr || (f && (f->flags & PFTS_SENDING) && !bSFT)) return 0;
+ if (!ptr || ((f->flags & PFTS_SENDING) && !bSFT)) return 0;
if (isContactSecured(ack->hContact)&SECURED) {
switch (ack->result) {
@@ -893,7 +894,7 @@ int __cdecl onProtoAck(WPARAM wParam, LPARAM lParam) LPSTR p = strrchr(file_out, '.');
LPSTR x = strrchr(file_out, '\\');
if (p > x) {
- strcpy(buf, p);
+ strncpy(buf, p, sizeof(buf)-1);
pos = p;
}
for (int i = 1; i < 10000; i++) {
|