diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2013-07-04 05:00:03 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2013-07-04 05:00:03 +0000 |
commit | 2f6035a86d42b71950b2090559d0eb29c593137c (patch) | |
tree | 8d791f18ca8373e470c1cb71c2b3dea648bc2cac /protocols/Skype/src/skype_proto.cpp | |
parent | 2726a957371d1f40ebf5a83c1434f70311a0f678 (diff) |
Skype: some fix in file transfer and blocked list dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@5226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_proto.cpp')
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index e8eadfd162..b5b60e35f7 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -155,13 +155,18 @@ HANDLE __cdecl CSkypeProto::FileAllow( HANDLE hContact, HANDLE hTransfer, const wchar_t fullPath[MAX_PATH] = {0};
SEString data;
- TransferRef transfer(oid);
- transfer->GetPropFilename(data);
- ptrW name(::mir_utf8decodeW(data));
- ::mir_sntprintf(fullPath, MAX_PATH, L"%s%s", szPath, name);
+ MessageRef msgRef(oid);
+ TransferRefs transfers;
+ msgRef->GetTransfers(transfers);
+ for (uint i = 0; i < transfers.size(); i++)
+ {
+ transfers[i]->GetPropFilename(data);
+ ptrW name(::mir_utf8decodeW(data));
+ ::mir_sntprintf(fullPath, MAX_PATH, L"%s%s", szPath, name);
- if (!transfer->Accept((char *)ptrA(::mir_utf8encodeW(fullPath)), success) || !success)
- return 0;
+ if ( !transfers[i]->Accept((char *)ptrA(::mir_utf8encodeW(fullPath)), success) || !success)
+ return 0;
+ }
return hTransfer;
}
@@ -170,10 +175,13 @@ int __cdecl CSkypeProto::FileCancel( HANDLE hContact, HANDLE hTransfer ) {
uint oid = (uint)hTransfer;
- TransferRef transfer(oid);
-
- if (!transfer->Cancel())
- return 0;
+ SEString data;
+ MessageRef msgRef(oid);
+ TransferRefs transfers;
+ msgRef->GetTransfers(transfers);
+ for (uint i = 0; i < transfers.size(); i++)
+ if ( !transfers[i]->Cancel())
+ return 0;
this->Log(L"Incoming file transfer is cancelled");
@@ -184,11 +192,15 @@ int __cdecl CSkypeProto::FileDeny( HANDLE hContact, HANDLE hTransfer, const T {
uint oid = (uint)hTransfer;
- TransferRef transfer(oid);
- if (!transfer->Cancel())
- return 0;
+ SEString data;
+ MessageRef msgRef(oid);
+ TransferRefs transfers;
+ msgRef->GetTransfers(transfers);
+ for (uint i = 0; i < transfers.size(); i++)
+ if ( !transfers[i]->Cancel())
+ return 0;
- this->Log(L"Incoming file transfer is denied");
+ this->Log(L"Incoming file transfer is denied");
return 1;
}
|