1. In void CAbstractFile::SetInt64TagValue(uint8 tagname, uint64 uValue)
CTag* pTag = new CTag(tagname, uValue);
should be
CTag* pTag = new CTag(tagname, uValue, true);
2.Improvements in CDownloadListCtrl
Add and remove sources only if partfiles' srcarevisible
In void CDownloadListCtrl::RemoveSource(CUpDownClient* source, CPartFile* owner)
CtrlItem_Struct* delItem = it->second; if(owner == NULL || owner == delItem->owner){ // Remove it from the m_ListItems it = m_ListItems.erase(it); if(owner == NULL || owner->srcarevisible){// this line // Remove it from the CListCtrl LVFINDINFO find; ... } // finally it could be delete delete delItem;
In bool CDownloadListCtrl::RemoveFile(const CPartFile* toremove)
CtrlItem_Struct* delItem = it->second; if(delItem->owner == toremove || delItem->value == (void*)toremove){ // Remove it from the m_ListItems it = m_ListItems.erase(it); if(delItem->owner == NULL || delItem->owner->srcarevisible){// this line // Remove it from the CListCtrl LVFINDINFO find; ... } // finally it could be delete delete delItem; bResult = true;
In void CDownloadListCtrl::UpdateItem(void* toupdate)
CtrlItem_Struct* updateItem = it->second; if (updateItem->owner && !updateItem->owner->srcarevisible)// this line continue; // Find entry in CListCtrl and update object LVFINDINFO find; ...
3. Minimize issue
Sometimes tray icon is not in tray while m_bTrayIconVisible is true. That make eMule can't minimize to tray.
To fix it, remove if (!m_bTrayIconVisible) in CTrayDialog::TrayShow() .
BOOL CTrayDialog::TrayShow() { BOOL bSuccess = FALSE; //if (!m_bTrayIconVisible)
4. UPNP issue - I've posted this fix to miniupnp forum.
After I installed VMWare, eMule's upnp did't work. VMWare add 2 Virtual Ethernet Adapters into my system. I guess upnp would fail when the system had 2 or more adapters.
Here's the fix.
In miniupnpc.c
add
#include <IPHlpApi.h>
for WIN32
In function upnpDiscover
at first
#ifndef WIN32
add else part
#else MIB_IPFORWARDROW ip_forward;
And change
sockudp_w.sin_addr.s_addr = inet_addr(UPNP_MCAST_ADDR);
to
#ifdef WIN32 if ( GetBestRoute(inet_addr("223.255.255.255"), 0, &ip_forward) != NO_ERROR) return NULL; sockudp_w.sin_addr.s_addr = ip_forward.dwForwardNextHop; #else sockudp_w.sin_addr.s_addr = inet_addr(UPNP_MCAST_ADDR); #endif
5. VS2008 Windows 2000 issue
This should be added into SendMail.cpp if VS2008-compiled eMule wanna run on windows 2000(as freeaddrinfo is not available on windows 2000).
#if _MSC_VER >= 1500 #include <Ws2tcpip.h> #include <Wspiapi.h> #endif
6. VS2005 invalid_parameter
Recently my eMule encounters unexpectable crashes, and it can't create .dmp file. This might not happened to eMule compiled with VS2003.
As Ms said,
Quote
Significant enhancements have been made to make the CRT more secure in VS2005.
See Security Enhancements in the CRT
eMule should update its CMiniDumper to avoid something like http://connect.micro...edbackID=101337 (this page is also useful)
I've only implemented invalid_parameter which makes me fix that issue.
In void CMiniDumper::Enable(LPCTSTR pszAppName, bool bShowErrors, LPCTSTR pszDumpDir) @ mdump.cpp
change
if (pfnMiniDumpWriteDump) SetUnhandledExceptionFilter(TopLevelFilter);
to
if (pfnMiniDumpWriteDump){ SetUnhandledExceptionFilter(TopLevelFilter); #if _MSC_VER >= 1400 _set_invalid_parameter_handler(InvalidParameterHandler); #endif }
The InvalidParameterHandler's code is similarly with _invoke_watson @ crt\src\invarg.c(just remove
SetUnhandledExceptionFilter(NULL);)
7. Memory leak after Low ID smart check fail.
I don't know whether it will happen to Official eMule. However, the OfFixed 1.0 apply this fix at a wrong place.
In void CServerSocket::OnReceive(int nErrorCode){
If "Use smart Low ID check on connect" is checked, CEMSocket::OnReceive(nErrorCode); possiblely call CServerConnect::ConnectionFailed in which it is said
// IMPORTANT: mark this socket not to be deleted in StopConnectionTry(), // because it will delete itself after this function!
To fix it, add
if(connectionstate == CS_ERROR){ serverconnect->DestroySocket(this); return; }
after
CEMSocket::OnReceive(nErrorCode);
This post has been edited by dolphinX: 06 December 2009 - 12:16 PM