openbsd-ports/net/amule/patches/patch-src_MuleUDPSocket_cpp
dcoppa 13ea65e71f 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.
2011-12-11 18:31:13 +00:00

26 lines
1.2 KiB
Plaintext

$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) {