pkgsrc/net/xmule/patches/patch-ad
jmmv 96c03b6f7f 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 <link> instead of xmule <link> 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.
2003-06-28 10:55:46 +00:00

55 lines
1.2 KiB
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 <sys/resource.h>
+#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();