openbsd-ports/net/amule/patches/patch-src_MuleUDPSocket_cpp

26 lines
1.2 KiB
Plaintext
Raw Normal View History

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