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/IRCG/src/ircproto.cpp | 11 +++++------ protocols/IRCG/src/ircproto.h | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'protocols/IRCG/src') diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 1b4fbb5a31..97c81d76b6 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -381,21 +381,20 @@ int CIrcProto::FileDeny(MCONTACT, HANDLE hTransfer, const wchar_t*) //////////////////////////////////////////////////////////////////////////////////////// // FileResume - processes file renaming etc -int CIrcProto::FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename) +int CIrcProto::FileResume(HANDLE hTransfer, int action, const wchar_t *szFilename) { DCCINFO* di = (DCCINFO*)hTransfer; - long i = (long)*action; - + long i = action; CDccSession *dcc = FindDCCSession(di); if (dcc) { InterlockedExchange(&dcc->dwWhatNeedsDoing, i); - if (*action == FILERESUME_RENAME) { - wchar_t* szTemp = wcsdup(*szFilename); + if (action == FILERESUME_RENAME) { + wchar_t* szTemp = wcsdup(szFilename); InterlockedExchangePointer((PVOID*)&dcc->NewFileName, szTemp); } - if (*action == FILERESUME_RESUME) { + if (action == FILERESUME_RESUME) { unsigned __int64 dwPos = 0; struct _stati64 statbuf; diff --git a/protocols/IRCG/src/ircproto.h b/protocols/IRCG/src/ircproto.h index fb8839d056..6c344ef45d 100644 --- a/protocols/IRCG/src/ircproto.h +++ b/protocols/IRCG/src/ircproto.h @@ -55,7 +55,7 @@ struct CIrcProto : public PROTO HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath) override; int FileCancel(MCONTACT hContact, HANDLE hTransfer) override; int FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szReason) override; - int FileResume(HANDLE hTransfer, int *action, const wchar_t **szFilename) override; + int FileResume(HANDLE hTransfer, int action, const wchar_t *szFilename) override; INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override; -- cgit v1.2.3