Skip to content

Commit

Permalink
Preparing for the release.
Browse files Browse the repository at this point in the history
.: Changed: version check and online help will use HTTPS
.: Changed: Content-DB searches will use HTTPS
.: Fixed: Web Server link in network info dialog adjusted for HTTP/HTTPS
  • Loading branch information
irwir committed Jul 19, 2018
1 parent db47e49 commit e6d9f84
Show file tree
Hide file tree
Showing 196 changed files with 5,381 additions and 7,220 deletions.
4 changes: 1 addition & 3 deletions AddFriend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ BEGIN_MESSAGE_MAP(CAddFriend, CDialog)
END_MESSAGE_MAP()

CAddFriend::CAddFriend()
: CDialog(CAddFriend::IDD)
: CDialog(CAddFriend::IDD), m_pShowFriend(), m_icnWnd()
{
m_pShowFriend = NULL;
m_icnWnd = NULL;
}

CAddFriend::~CAddFriend()
Expand Down
7 changes: 3 additions & 4 deletions AddSourceDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ BEGIN_MESSAGE_MAP(CAddSourceDlg, CResizableDialog)
ON_BN_CLICKED(IDOK, OnBnClickedOk)
END_MESSAGE_MAP()

CAddSourceDlg::CAddSourceDlg(CWnd* pParent /*=NULL*/)
: CResizableDialog(CAddSourceDlg::IDD, pParent)
, m_pFile(NULL), m_nSourceType(0)
CAddSourceDlg::CAddSourceDlg(CWnd *pParent /*= NULL*/)
: CResizableDialog(CAddSourceDlg::IDD, pParent), m_pFile(), m_nSourceType()
{
}

CAddSourceDlg::~CAddSourceDlg()
{
}

void CAddSourceDlg::DoDataExchange(CDataExchange* pDX)
void CAddSourceDlg::DoDataExchange(CDataExchange *pDX)
{
CResizableDialog::DoDataExchange(pDX);
DDX_Radio(pDX, IDC_RSRC, m_nSourceType);
Expand Down
8 changes: 4 additions & 4 deletions AddSourceDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ struct SUnresolvedHostname
nPort = 0;
}
CStringA strHostname;
uint16 nPort;
CString strURL;
uint16 nPort;
};

// CAddSourceDlg dialog
Expand All @@ -40,13 +40,13 @@ class CAddSourceDlg : public CResizableDialog
enum { IDD = IDD_ADDSOURCE };

public:
explicit CAddSourceDlg(CWnd* pParent = NULL); // standard constructor
explicit CAddSourceDlg(CWnd *pParent = NULL); // standard constructor
virtual ~CAddSourceDlg();

void SetFile( CPartFile* pFile );
void SetFile(CPartFile *pFile);

protected:
CPartFile* m_pFile;
CPartFile *m_pFile;
int m_nSourceType;

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
Expand Down
8 changes: 4 additions & 4 deletions ArchiveRecovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ bool CArchiveRecovery::processZipEntry(CFile *zipInput, CFile *zipOutput, uint32
entry.filename = new BYTE[entry.lenFilename];
if (zipInput->Read(entry.filename, entry.lenFilename) != entry.lenFilename)
{
delete [] entry.filename;
delete[] entry.filename;
return false;
}

Expand Down Expand Up @@ -595,9 +595,9 @@ bool CArchiveRecovery::processZipEntry(CFile *zipInput, CFile *zipOutput, uint32
}
else
{
delete [] entry.filename;
delete[] entry.filename;
if (entry.lenExtraField > 0)
delete [] entry.extraField;
delete[] entry.extraField;
}
retVal = true;

Expand Down Expand Up @@ -795,7 +795,7 @@ bool CArchiveRecovery::recoverRar(CFile *rarInput, CFile *rarOutput, archiveScan
rarInput->Seek(block->offsetData + block->dataLength, CFile::begin);
}
if (aitp==NULL) {
delete [] block->FILE_NAME;
delete[] block->FILE_NAME;
delete block;
}
if (rarInput->GetPosition() >=fill->end)
Expand Down
2 changes: 1 addition & 1 deletion ArchiveRecovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct ACE_BlockFile
uint64 data_offset;

ACE_BlockFile()
: FNAME_SIZE(0), COMM_SIZE(0), FNAME(NULL), COMMENT(NULL)
: FNAME_SIZE(), COMM_SIZE(), FNAME(), COMMENT()
{
}
~ACE_BlockFile()
Expand Down
2 changes: 1 addition & 1 deletion ChatSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ BEGIN_MESSAGE_MAP(CChatSelector, CClosableTabCtrl)
END_MESSAGE_MAP()

CChatSelector::CChatSelector()
: m_pParent(NULL), m_iContextIndex(-1)
: m_pParent(), m_iContextIndex(-1)
{
m_lastemptyicon = false;
m_blinkstate = false;
Expand Down
2 changes: 1 addition & 1 deletion Collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ CCollection::CCollection()
}

CCollection::CCollection(const CCollection *pCollection)
: m_sCollectionName(pCollection->m_sCollectionName)
{
m_sCollectionName = pCollection->m_sCollectionName;
if (pCollection->m_pabyCollectionAuthorKey != NULL) {
m_nKeySize = pCollection->m_nKeySize;
m_pabyCollectionAuthorKey = new BYTE[m_nKeySize];
Expand Down
2 changes: 1 addition & 1 deletion ColourPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const ColourTableEntry CColourPopup::m_crColours[] =
// CColourPopup

CColourPopup::CColourPopup()
: colourArrayPassed(NULL)
: colourArrayPassed()
{
Initialise();
}
Expand Down
21 changes: 11 additions & 10 deletions CreditsThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ BEGIN_MESSAGE_MAP(CCreditsThread, CGDIThread)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

CCreditsThread::CCreditsThread(CWnd* pWnd, HDC hDC, CRect rectScreen)
: CGDIThread(pWnd, hDC), m_rectScreen(rectScreen)
CCreditsThread::CCreditsThread(CWnd *pWnd, HDC hDC, CRect rectScreen)
: CGDIThread(pWnd, hDC)
, m_rectScreen(rectScreen)
, m_nScrollPos()
, m_pbmpOldBk()
, m_pbmpOldCredits()
, m_pbmpOldScreen()
, m_pbmpOldMask()
, m_nCreditsBmpWidth()
, m_nCreditsBmpHeight()
{
m_rgnScreen.CreateRectRgnIndirect(m_rectScreen);
m_nScrollPos = 0;
m_pbmpOldBk = NULL;
m_pbmpOldCredits = NULL;
m_pbmpOldScreen = NULL;
m_pbmpOldMask = NULL;
m_nCreditsBmpWidth = 0;
m_nCreditsBmpHeight = 0;
}

CCreditsThread::~CCreditsThread()
Expand Down Expand Up @@ -431,7 +432,7 @@ void CCreditsThread::InitText()

m_arCredits.Add(_T("03:00:eMule"));
m_arCredits.Add(_T("02:01:Version ") + theApp.m_strCurVersionLong);
m_arCredits.Add(_T("01:06:Copyright (C) 2002-2015 Merkur"));
m_arCredits.Add(_T("01:06:Copyright (C) 2002-2018 Merkur"));
m_arCredits.Add(_T("S:50"));
m_arCredits.Add(_T("02:04:Developers"));
m_arCredits.Add(_T("S:5"));
Expand Down
2 changes: 1 addition & 1 deletion DownloadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ void CUpDownClient::ProcessBlockPacket(const uchar *packet, uint32 size, bool pa
cur_block->fZStreamError = 1;
cur_block->totalUnzipped = 0;
}
delete [] unzipped;
delete[] unzipped;
}

// These checks only need to be done if any data was written
Expand Down
2 changes: 1 addition & 1 deletion DownloadQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ bool CDownloadQueue::SendNextUDPPacket()
else
{
POSITION pos = filelist.Find(lastfile);
if (pos == 0) // the last file is no longer in the DL-list (may have been finished or canceld)
if (pos == 0) // the last file is no longer in the DL-list (may have been finished or cancelled)
{
// get first file to search sources for
nextfile = filelist.GetHead();
Expand Down
2 changes: 1 addition & 1 deletion EMSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace
IMPLEMENT_DYNAMIC(CEMSocket, CEncryptedStreamSocket)

CEMSocket::CEMSocket()
: pendingHeader(), m_OverlappedCleaning(0), lastFinishedStandard(0)
: pendingHeader(), m_OverlappedCleaning(), lastFinishedStandard()
{
byConnected = ES_NOTCONNECTED;
m_uTimeOut = CONNECTION_TIMEOUT; // default timeout for ed2k sockets
Expand Down
4 changes: 2 additions & 2 deletions EnBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ BOOL CEnBitmap::LoadImage(LPCTSTR lpszResourceName, LPCTSTR szResourceType, HMOD
}
}

delete [] pBuff;
delete[] pBuff;
}
}

Expand Down Expand Up @@ -122,7 +122,7 @@ BOOL CEnBitmap::LoadImage(LPCTSTR szImagePath, COLORREF crBack)
pPicture->Release();
}
}
delete [] pBuff;
delete[] pBuff;
}

return bResult;
Expand Down
2 changes: 1 addition & 1 deletion FileIdentifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////
// CFileIdentifierBase
CFileIdentifierBase::CFileIdentifierBase()
: m_abyMD4Hash(), m_bHasValidAICHHash(false)
: m_abyMD4Hash(), m_bHasValidAICHHash()
{
}

Expand Down
2 changes: 1 addition & 1 deletion Friend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void CFriend::init()
}

CFriend::CFriend()
: m_abyUserhash(), m_dwLastSeen(0), m_dwLastUsedIP(0), m_nLastUsedPort(0), m_dwLastChatted(0), m_strName()
: m_abyUserhash(), m_dwLastSeen(), m_dwLastUsedIP(), m_nLastUsedPort(), m_dwLastChatted(), m_strName()
{
init();
}
Expand Down
2 changes: 1 addition & 1 deletion FriendList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static char THIS_FILE[] = __FILE__;
#define EMFRIENDS_MET_FILENAME _T("emfriends.met")

CFriendList::CFriendList()
: m_wndOutput(NULL)
: m_wndOutput()
{
LoadList();
m_nLastSaved = ::GetTickCount();
Expand Down
2 changes: 1 addition & 1 deletion HttpDownloadDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ class CHttpDownloadDlg : public CDialog
volatile BOOL m_bAbort;
BOOL m_bSafeToClose;
CFile m_FileToWrite;
CWinThread* m_pThread;
CWinThread *m_pThread;
static ULONGLONG sm_ullWinInetVer;
};
3 changes: 1 addition & 2 deletions IPFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ INT_PTR CIPFilter::AddFromFile(LPCTSTR pszFilePath, bool bShowResponse)

// Reserve a byte array (its used as a boolean array actually) as large as the current
// IP-filter list, so we can set a 'to delete' flag for each entry in the current IP-filter list.
char* pcToDelete = new char[m_iplist.GetCount()];
memset(pcToDelete, 0, m_iplist.GetCount());
char *pcToDelete = new char[m_iplist.GetCount()]();
int iNumToDelete = 0;

SIPFilter* pPrv = m_iplist[0];
Expand Down
19 changes: 7 additions & 12 deletions KnownFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,31 +358,26 @@ void Dump(const Kademlia::WordList& wordlist)

void CKnownFile::SetFileName(LPCTSTR pszFileName, bool bReplaceInvalidFileSystemChars, bool bRemoveControlChars)
{
CKnownFile* pFile = NULL;

// If this is called within the sharedfiles object during startup,
// we cannot reference it yet..

if(theApp.sharedfiles)
pFile = theApp.sharedfiles->GetFileByID(GetFileHash());
CKnownFile *pFile = theApp.sharedfiles ? theApp.sharedfiles->GetFileByID(GetFileHash()) : NULL;

if (pFile && pFile == this)
if (pFile == this)
theApp.sharedfiles->RemoveKeywords(this);

CAbstractFile::SetFileName(pszFileName, bReplaceInvalidFileSystemChars, true, bRemoveControlChars);
m_verifiedFileType = FILETYPE_UNKNOWN;

wordlist.clear();
if(m_pCollection)
{
if (m_pCollection) {
CStringW sKeyWords;
sKeyWords.Format(_T("%s %s"), (LPCTSTR)m_pCollection->GetCollectionAuthorKeyString(), (LPCTSTR)(CString)GetFileName()); //cast to CStringT
sKeyWords.Format(_T("%s %s"), (LPCTSTR)m_pCollection->GetCollectionAuthorKeyString(), (LPCTSTR)GetFileName());
Kademlia::CSearchManager::GetWords(sKeyWords, &wordlist);
}
else
Kademlia::CSearchManager::GetWords((CStringW)GetFileName(), &wordlist); //make sure it is CStringW
} else
Kademlia::CSearchManager::GetWords((CStringW)GetFileName(), &wordlist); //make sure that it is a CStringW

if (pFile && pFile == this)
if (pFile == this)
theApp.sharedfiles->AddKeywords(this);
}

Expand Down
12 changes: 6 additions & 6 deletions Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ class CLogFile
void StartNewLogFile();

protected:
FILE* m_fp;
time_t m_tStarted;
CString m_strFilePath;
size_t m_uBytesWritten;
size_t m_uMaxFileSize;
bool m_bInOpenCall;
FILE *m_fp;
time_t m_tStarted;
CString m_strFilePath;
size_t m_uBytesWritten;
size_t m_uMaxFileSize;
bool m_bInOpenCall;
ELogFileFormat m_eFileFormat;
};

Expand Down
3 changes: 2 additions & 1 deletion MediaInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ static BOOL ParseStreamHeader(int hAviFile, DWORD dwLengthLeft, STREAMHEADER* pS
if (dwLength > 4096) // expect corrupt data
return FALSE;
try {
pStrmHdr->fmt.dat = new BYTE[pStrmHdr->dwFormatLen = dwLength];
pStrmHdr->dwFormatLen = dwLength;
pStrmHdr->fmt.dat = new BYTE[dwLength];
} catch (...) {
errno = ENOMEM;
return FALSE;
Expand Down
13 changes: 7 additions & 6 deletions NetworkInfoDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,17 @@ void CreateNetworkInfo(CRichEditCtrlX& rCtrl, CHARFORMAT& rcfDef, CHARFORMAT& rc
rCtrl << GetResString(IDS_WEBSRV) << _T("\r\n");
rCtrl.SetSelectionCharFormat(rcfDef);
rCtrl << GetResString(IDS_STATUS) << _T(":\t");
rCtrl << (thePrefs.GetWSIsEnabled() ? GetResString(IDS_ENABLED) : GetResString(IDS_DISABLED)) << _T("\r\n");
rCtrl << GetResString(thePrefs.GetWSIsEnabled() ? IDS_ENABLED : IDS_DISABLED) << _T("\r\n");
if (thePrefs.GetWSIsEnabled()){
CString count;
count.Format(_T("%d %s"), static_cast<int>(theApp.webserver->GetSessionCount()), (LPCTSTR)GetResString(IDS_ACTSESSIONS));
rCtrl << _T("\t") << count << _T("\r\n");
CString strHostname;
if (!thePrefs.GetYourHostname().IsEmpty() && thePrefs.GetYourHostname().Find(_T('.')) != -1)
strHostname = thePrefs.GetYourHostname();
else
if (thePrefs.GetYourHostname().IsEmpty() || thePrefs.GetYourHostname().Find(_T('.')) < 0)
strHostname = ipstr(theApp.serverconnect->GetLocalIP());
rCtrl << _T("URL:\t") << _T("http://") << strHostname << _T(":") << thePrefs.GetWSPort() << _T("/\r\n");
else
strHostname = thePrefs.GetYourHostname();
rCtrl << _T("URL:\t") << (thePrefs.GetWebUseHttps() ? _T("https://") : _T("http://"));
rCtrl << strHostname << _T(":") << thePrefs.GetWSPort() << _T("/\r\n");
}
}
}
2 changes: 1 addition & 1 deletion OScopeCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BEGIN_MESSAGE_MAP(COScopeCtrl, CWnd)
END_MESSAGE_MAP()

COScopeCtrl::COScopeCtrl(int NTrends)
: m_nClientHeight(0), m_nClientWidth(0), m_nPlotHeight(0), m_nPlotWidth(0)
: m_nClientHeight(), m_nClientWidth(), m_nPlotHeight(), m_nPlotWidth()
{
static const COLORREF PresetColor[16] =
{
Expand Down
3 changes: 1 addition & 2 deletions PPgFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ BEGIN_MESSAGE_MAP(CPPgFiles, CPropertyPage)
END_MESSAGE_MAP()

CPPgFiles::CPPgFiles()
: CPropertyPage(CPPgFiles::IDD)
: CPropertyPage(CPPgFiles::IDD), m_icoBrowse()
{
m_icoBrowse = NULL;
}

CPPgFiles::~CPPgFiles()
Expand Down
Loading

0 comments on commit e6d9f84

Please sign in to comment.