Apply some bugfixing patches from upstream:

Fix: first check our bool variable, then make some calculations if
it's false. Not the other way around
(upstream git commit 41090dfe3756396a8b4496f732ab8493aa51fe6c)

Fix: disabling protocol obfuscation broke Kad and triggered assertions
(upstream git commit ec2e66216738f92724a37fa030a79734e0e8b1ba)

Fix: disable the partfile importer's 'Add' button on the remote gui
unless using a localhost connection
(upstream git commit 004f3929d91e4b81f47235060d86686fff13e2d3)

Fix: "Prompt on exit" preference
(upstream git commit aea8d002b6446dcaf38db4d4ab222fcebce60948)

Fix: require restart when protocol obfuscation setting gets changed
(upstream git commit ec2e66216738f92724a37fa030a79734e0e8b1ba)

And fix libX11 '-lX11' linkage.
This commit is contained in:
dcoppa 2011-12-11 18:31:13 +00:00
parent 0d07fa7dd9
commit 13ea65e71f
6 changed files with 116 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.26 2011/11/28 15:28:49 dcoppa Exp $
# $OpenBSD: Makefile,v 1.27 2011/12/11 18:31:13 dcoppa Exp $
COMMENT-main = another eDonkey P2P file sharing client
COMMENT-web = webserver interface to amuled
@ -6,6 +6,7 @@ COMMENT-daemon =stand-alone daemon/cmdline for amule
V = 2.3.1
DISTNAME = aMule-$V
REVISION = 0
CATEGORIES = net
HOMEPAGE = http://www.amule.org/

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-configure_in,v 1.2 2011/11/28 15:28:49 dcoppa Exp $
$OpenBSD: patch-configure_in,v 1.3 2011/12/11 18:31:13 dcoppa Exp $
--- configure.in.orig Fri Nov 11 21:59:14 2011
+++ configure.in Mon Nov 28 10:23:02 2011
+++ configure.in Fri Dec 9 20:14:19 2011
@@ -172,7 +172,7 @@ MULE_IF_ENABLED_ANY([monolithic, amule-daemon, amule-g
WX_DETECT_STANDARD_OPTION_VALUES
# We also need wxBase
- WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs adv,core,net`
+ WX_LIBS="`$WX_CONFIG_WITH_ARGS --libs adv,core,net` -lX11"
WXBASE_LIBS=`$WX_CONFIG_WITH_ARGS --libs net`
WXBASE_CPPFLAGS="$WX_CPPFLAGS -DwxUSE_GUI=0"
@@ -236,7 +236,7 @@ AC_LANG_POP([C++])
])

View File

@ -1,10 +1,14 @@
$OpenBSD: patch-src_ListenSocket_cpp,v 1.1 2011/11/28 15:28:49 dcoppa Exp $
$OpenBSD: patch-src_ListenSocket_cpp,v 1.2 2011/12/11 18:31:13 dcoppa Exp $
Ok() is just an undocumented alias for IsOk()
(upstream git commit 740c0298147a614806f1676f77a89908074b5574)
--- src/ListenSocket.cpp.orig Mon Nov 28 10:34:06 2011
+++ src/ListenSocket.cpp Mon Nov 28 10:34:30 2011
Fix: first check our bool variable, then make some calculations if
it's false. Not the other way around
(upstream git commit 41090dfe3756396a8b4496f732ab8493aa51fe6c)
--- src/ListenSocket.cpp.orig Mon Jun 13 10:50:25 2011
+++ src/ListenSocket.cpp Fri Dec 9 16:37:45 2011
@@ -57,7 +57,7 @@ CSocketServerProxy(addr, wxSOCKET_NOWAIT|wxSOCKET_REUS
totalconnectionchecks = 0;
averageconnections = 0.0;
@ -14,3 +18,13 @@ Ok() is just an undocumented alias for IsOk()
SetEventHandler(*theApp, ID_LISTENSOCKET_EVENT);
SetNotify(wxSOCKET_CONNECTION_FLAG);
Notify(true);
@@ -228,7 +228,8 @@ void CListenSocket::KillAllSockets()
bool CListenSocket::TooManySockets(bool bIgnoreInterval)
{
- if (GetOpenSockets() > thePrefs::GetMaxConnections() || (m_OpenSocketsInterval > (thePrefs::GetMaxConperFive()*GetMaxConperFiveModifier()) && !bIgnoreInterval)) {
+ if (GetOpenSockets() > thePrefs::GetMaxConnections()
+ || (!bIgnoreInterval && m_OpenSocketsInterval > (thePrefs::GetMaxConperFive() * GetMaxConperFiveModifier()))) {
return true;
} else {
return false;

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-src_MuleUDPSocket_cpp,v 1.1 2011/12/11 18:31:13 dcoppa Exp $
Fix: disabling protocol obfuscation broke Kad and triggered assertions
(upstream git commit ec2e66216738f92724a37fa030a79734e0e8b1ba)
--- src/MuleUDPSocket.cpp.orig Fri Dec 9 15:08:25 2011
+++ src/MuleUDPSocket.cpp Fri Dec 9 15:11:15 2011
@@ -40,6 +40,7 @@
#include "OtherFunctions.h"
#include "kademlia/kademlia/Prefs.h"
#include "ClientList.h"
+#include "Preferences.h"
CMuleUDPSocket::CMuleUDPSocket(const wxString& name, int id, const amuleIPV4Address& address, const CProxyData* ProxyData)
@@ -232,7 +233,8 @@ void CMuleUDPSocket::SendPacket(CPacket* packet, uint3
newpending.port = port;
newpending.packet = packet;
newpending.time = GetTickCount();
- newpending.bEncrypt = bEncrypt && (pachTargetClientHashORKadID != NULL || (bKad && nReceiverVerifyKey != 0));
+ newpending.bEncrypt = bEncrypt && (pachTargetClientHashORKadID != NULL || (bKad && nReceiverVerifyKey != 0))
+ && thePrefs::IsClientCryptLayerSupported();
newpending.bKad = bKad;
newpending.nReceiverVerifyKey = nReceiverVerifyKey;
if (newpending.bEncrypt && pachTargetClientHashORKadID != NULL) {

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_PartFileConvertDlg_cpp,v 1.1 2011/12/11 18:31:13 dcoppa Exp $
Fix: disable the partfile importer's 'Add' button on the remote gui
unless using a localhost connection
(upstream git commit 004f3929d91e4b81f47235060d86686fff13e2d3)
--- src/PartFileConvertDlg.cpp.orig Fri Dec 9 16:38:14 2011
+++ src/PartFileConvertDlg.cpp Fri Dec 9 16:40:17 2011
@@ -94,6 +94,14 @@ CPartFileConvertDlg::CPartFileConvertDlg(wxWindow* par
m_joblist->InsertColumn(3, _("Filehash"), wxLIST_FORMAT_LEFT, 100);
SetIcon(wxICON(convert));
+
+#ifdef CLIENT_GUI
+ // There's no remote directory browser (yet), thus disable the
+ // directory selector unless we're using a localhost connection
+ if (!theApp->m_connect->IsConnectedToLocalHost()) {
+ CastChild(IDC_ADDITEM, wxButton)->Enable(false);
+ }
+#endif
}
// Static methods

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-src_PrefsUnifiedDlg_cpp,v 1.1 2011/12/11 18:31:13 dcoppa Exp $
Fix "Prompt on exit" preference
(upstream git commit aea8d002b6446dcaf38db4d4ab222fcebce60948)
Fix: require restart when protocol obfuscation setting gets changed
(upstream git commit ec2e66216738f92724a37fa030a79734e0e8b1ba)
--- src/PrefsUnifiedDlg.cpp.orig Sun Oct 9 02:19:08 2011
+++ src/PrefsUnifiedDlg.cpp Fri Dec 9 16:35:56 2011
@@ -252,6 +252,7 @@ wxDialog(parent, -1, _("Preferences"),
FindWindow(IDC_MINTRAY)->Show(false);
#else
FindWindow(IDC_MACHIDEONCLOSE)->Show(false);
+ thePrefs::SetHideOnClose(false);
#endif
} else if (pages[i].m_function == PreferencesEventsTab) {
@@ -438,7 +439,7 @@ bool PrefsUnifiedDlg::TransferToWindow()
FindWindow(IDC_MACHIDEONCLOSE)->Enable(true);
FindWindow(IDC_EXIT)->Enable(!thePrefs::HideOnClose());
- if (!thePrefs::HideOnClose()) {
+ if (thePrefs::HideOnClose()) {
CastChild(IDC_EXIT, wxCheckBox)->SetValue(false);
}
@@ -612,6 +613,10 @@ void PrefsUnifiedDlg::OnOk(wxCommandEvent& WXUNUSED(ev
if (CfgChanged(IDC_EXT_CONN_IP)) {
restart_needed = true;
restart_needed_msg += _("- External connect interface changed.\n");
+ }
+ if (CfgChanged(IDC_SUPPORT_PO)) {
+ restart_needed = true;
+ restart_needed_msg += _("- Protocol obfuscation support changed.\n");
}
// Force port checking