head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.54 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.52 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.50 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.48 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.46 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.44 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.42 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.40 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.38 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2003.08.26.09.53.39; author jmmv; state dead; branches; next 1.2; 1.2 date 2003.06.28.10.55.47; author jmmv; state Exp; branches; next 1.1; 1.1 date 2003.06.03.09.17.21; author jmmv; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2003.06.03.09.17.21; author jmmv; state Exp; branches; next ; desc @@ 1.3 log @Update to 1.4.3: malware's contributions: * SECURITY: Removed possible format string exploits. * FIXED: statistics color saving/loading. * FIXED: a possibly exploitable bug as noticed by S. Esser from e-matters. * FIXED: exception handling for CString/wxString. * FIXED: endless loop in CClientUDPSocket::OnSend(). * FIXED: fatal exception handler not to fail in early stages. * FIXED: endless loop in CListenSocket::KillAllSockets(). * FIXED: Lagloose's Shift+Doubleclick to show really only transfering sources. Update still does not work. * Decode %-escaped characters in URL within the ed2k application as suggested by __JusSx__. NetBSD team's contributions: * Work-around not to unlock mutexes not locked. * Try to increase some resource limits to the permitted maximum. * FIXED: bug with the mutex protecting calls to gethostbyname. Un-Thesis' contributions: * Added support for adding multiple ED2K links. * Added ED2K link support for GTK2. FooMan's contributions: * FIXED: for failing file access during download completion. @ text @$NetBSD: patch-ad,v 1.2 2003/06/28 10:55:47 jmmv Exp $ --- src/xmule.cpp.orig 2003-06-19 12:04:38.000000000 +0200 +++ src/xmule.cpp @@@@ -93,8 +93,10 @@@@ int CxmuleApp::OnExit() { delete clientlist; #endif - hashing_mut.Unlock(); - pendingMutex.Unlock(); + if (hashing_mut.TryLock() == wxMUTEX_NO_ERROR) + hashing_mut.Unlock(); + if (pendingMutex.TryLock() == wxMUTEX_NO_ERROR) + pendingMutex.Unlock(); printf("xMule shutdown completed.\n"); } @@@@ -197,6 +199,28 @@@@ public: extern void InitXmlResource(); +#ifdef HAVE_SYS_RESOURCE_H +#include +#endif + +static void UnlimitResource(int resType) +{ +#if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT) + struct rlimit rl; + getrlimit(resType, &rl); + rl.rlim_cur = rl.rlim_max; + setrlimit(resType, &rl); +#endif +} + +static void SetResourceLimits() +{ + UnlimitResource(RLIMIT_DATA); + UnlimitResource(RLIMIT_FSIZE); + UnlimitResource(RLIMIT_NOFILE); + UnlimitResource(RLIMIT_RSS); +} + bool CxmuleApp::OnInit() { // catch fatal exceptions @@@@ -204,6 +228,8 @@@@ bool CxmuleApp::OnInit() //putenv("LANG=en_US"); + SetResourceLimits(); + // for resources wxFileSystem::AddHandler(new wxZipFSHandler); wxXmlResource::Get()->InitAllHandlers(); @ 1.2 log @Update to 1.4.1a: Version 1.4.1a -------------- Madcat's contributions: * FIXED: Crash on GetPeer() call during socket failure. * FIXED: Crash when trying to send hash of nonexistent knownfile. Version 1.4.1 ------------- Madcat's contributions: * FIXED: Various crashes regarding Shared Files Reloading. * FIXED: Several Search Tab Closing/Global Search related crashes. * FIXED: Several eMule/xMule typos. * FIXED: Endless loop if UDP packet sending failed. * FIXED: Endless loop/memleak at ProcessMuleInfoPacket(). * FIXED: Endless loop at CPartFile::FlushBuffer(). * FIXED: CPU leak in ProcessHelloPacket(). * FIXED: gsocket.c compilation problems with older compilers. * FIXED: Crash when search results were added to nonexistent search tab. * FIXED: Endless loop in case UDP packet sending fails. * FIXED: Sockets are also closed on crash now. * Revised Search Result packet handling, shouldn't crash/memleak there anymore. * Removed annoying MAX_RESULTS check from search tab. * Added log line when ipfilter is loaded. * All log messages are also written into file ($HOME/.xMule/logfile). * Shared files list is now resorted after reloading. * Implemented external ED2K links handling. Use ed2k instead of xmule from now on. * Changed popup window to log message when shared file is not found. Kry's contributions: * FIXED: --version commandline argument. * FIXED: Bogus 2.1.0.1 servers on serverlist. * FIXED: Shared folders not shared in some systems. * FIXED: Shared files not being shared in non-english languages. * FIXED: Download limit being higher than capacity. * Made ./xmule statistics more readable. * Added a notification message in case second xMule is started. Un-Thesis' contributions: * FIXED: GTK-only XPM compatibillity problems. * FIXED: GetTickCount compilation errors. * FIXED: LOWID problems (AGAIN!). * Removed pure GTK code from GetColour. * Added eMule's LOWID icon to main status bar on LOWID connection. MikaelB's contributions: * FIXED: Toolbar sizing with i18n Seneca's contributions: * FIXED: Clipboard handling (ctrl+v instead of middleclick for pasting). Closes PR pkg/21940. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.1.1.1 2003/06/03 09:17:21 jmmv Exp $ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 3 --- src/xmule.cpp.orig 2003-06-01 19:33:55.000000000 +0000 +++ src/xmule.cpp 2003-06-01 19:34:19.000000000 +0000 @@@@ -103,8 +103,13 @@@@ d11 1 a11 1 + if (hashing_mut.TryLock() == wxMUTEX_NO_ERROR) { d13 1 a13 3 + } + + if (pendingMutex.TryLock() == wxMUTEX_NO_ERROR) { a14 1 + } d18 1 a18 1 @@@@ -207,6 +212,28 @@@@ d47 1 a47 1 @@@@ -214,6 +241,8 @@@@ a55 23 @@@@ -641,11 +670,13 @@@@ } //End Added By Bouc7 - +#if defined(linux) #include +#endif void CxmuleApp::OnFatalException() { +#if defined(linux) // (stkn) create backtrace void * bt_array[100]; // 100 should be enough ?!? char ** bt_strings; @@@@ -666,6 +697,7 @@@@ fprintf(stderr, "[%d] %s\n", i, bt_strings[i]); free(bt_strings); +#endif } #define wxGTK_WINDOW 1 @ 1.1.1.1 log @Initial import of xmule, version 1.4.0: xMule is an easy to use multi-platform client for the ED2K Peer-to-Peer Network. It was originally based on eMule, the popular windows-only client for the same network. It uses the wxWindows class library. Some of its features include Movie Preview, GTK2 Compatibility, Multi-Selection in all lists, Tray-icon, Statistics, Source Exchange, File Commenting any many more. Based on the package provided in pkgsrc-wip by Marc Recht and one provided by Pablo Méndez in private mail. Obsoletes lmule. @ text @@