From c970f5a11e85c4efe5a27783c7c8d994c55daf8b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 May 2020 17:08:24 +0300 Subject: fix for old PROTO_INTERFACE::FileResume interface error --- protocols/ICQ-WIM/src/proto.cpp | 6 +++--- protocols/ICQ-WIM/src/proto.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/ICQ-WIM') diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 3aaba62d5c..6523090d04 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -431,14 +431,14 @@ int CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer) return 0; } -int CIcqProto::FileResume(HANDLE hTransfer, int *action, const wchar_t **szFilename) +int CIcqProto::FileResume(HANDLE hTransfer, int, const wchar_t *szFilename) { auto *ft = (IcqFileTransfer *)hTransfer; if (!m_bOnline || ft == nullptr) return 1; - if (*action == FILERESUME_RENAME) { - ft->m_wszFileName = *szFilename; + if (szFilename != nullptr) { + ft->m_wszFileName = szFilename; ft->pfts.szCurrentFile.w = ft->m_wszFileName.GetBuffer(); } return 0; diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h index 34f8ab8321..d48238a9d0 100644 --- a/protocols/ICQ-WIM/src/proto.h +++ b/protocols/ICQ-WIM/src/proto.h @@ -413,7 +413,7 @@ class CIcqProto : public PROTO HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath) override; int FileCancel(MCONTACT hContact, HANDLE hTransfer) override; - int FileResume(HANDLE hTransfer, int *action, const wchar_t **szFilename) override; + int FileResume(HANDLE hTransfer, int action, const wchar_t *szFilename) override; HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override; int SendMsg(MCONTACT hContact, int flags, const char *msg) override; -- cgit v1.2.3