From 7a2c6126cd995cfdbd5f3167609cd7e09ffacf35 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 May 2012 23:20:51 +0000 Subject: useless junk removed git-svn-id: http://svn.miranda-ng.org/main/trunk@66 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/srfile/file.cpp | 20 -------------------- src/modules/srfile/filexferdlg.cpp | 15 +++------------ 2 files changed, 3 insertions(+), 32 deletions(-) (limited to 'src/modules/srfile') diff --git a/src/modules/srfile/file.cpp b/src/modules/srfile/file.cpp index 85eb99a7bc..37f7d15a1f 100644 --- a/src/modules/srfile/file.cpp +++ b/src/modules/srfile/file.cpp @@ -208,26 +208,6 @@ void CopyProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANSFE void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANSFERSTATUS *src) { - if (src->cbSize == sizeof(PROTOFILETRANSFERSTATUS_V1)) - { - PROTOFILETRANSFERSTATUS_V1 *src1 = (PROTOFILETRANSFERSTATUS_V1*)src; - src = (PROTOFILETRANSFERSTATUS*)alloca(sizeof(PROTOFILETRANSFERSTATUS)); - - src->cbSize = sizeof(PROTOFILETRANSFERSTATUS); - src->hContact = src1->hContact; - src->flags = src1->sending ? PFTS_SENDING : 0; - src->pszFiles = src1->files; - src->totalFiles = src1->totalFiles; - src->currentFileNumber = src1->currentFileNumber; - src->totalBytes = src1->totalBytes; - src->totalProgress = src1->totalProgress; - src->szWorkingDir = src1->workingDir; - src->szCurrentFile = src1->currentFile; - src->currentFileSize = src1->currentFileSize; - src->currentFileProgress = src1->currentFileProgress; - src->currentFileTime = src1->currentFileTime; - } - dest->hContact = src->hContact; dest->flags = src->flags; if ( dest->totalFiles != src->totalFiles ) { diff --git a/src/modules/srfile/filexferdlg.cpp b/src/modules/srfile/filexferdlg.cpp index 0a6246dea0..4a6f40436b 100644 --- a/src/modules/srfile/filexferdlg.cpp +++ b/src/modules/srfile/filexferdlg.cpp @@ -598,24 +598,15 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR TCHAR str[64], str2[64], szSizeDone[32], szSizeTotal[32];//,*contactName; int units; - if ( dat->fileVirusScanned==NULL ) + if ( dat->fileVirusScanned == NULL ) dat->fileVirusScanned=(int*)mir_calloc(sizeof(int) * fts->totalFiles); // This needs to be here - otherwise we get holes in the files array - if (!dat->send) - { + if (!dat->send) { if (dat->files == NULL) dat->files = (TCHAR**)mir_calloc((fts->totalFiles + 1) * sizeof(TCHAR*)); if (fts->currentFileNumber < fts->totalFiles && dat->files[fts->currentFileNumber] == NULL) - { - if (fts->cbSize == sizeof(PROTOFILETRANSFERSTATUS_V1)) - { - PROTOFILETRANSFERSTATUS_V1 *fts1 = (PROTOFILETRANSFERSTATUS_V1*)fts; - dat->files[fts->currentFileNumber] = PFTS_StringToTchar(0, (PROTOCHAR*)fts1->currentFile); - } - else - dat->files[fts->currentFileNumber] = PFTS_StringToTchar(fts->flags, fts->tszCurrentFile); - } + dat->files[fts->currentFileNumber] = PFTS_StringToTchar(fts->flags, fts->tszCurrentFile); } /* HACK: for 0.3.3, limit updates to around 1.1 ack per second */ -- cgit v1.2.3