← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2124: turn on NAT-T by default

 

------------------------------------------------------------
revno: 2124
committer: cologic <ne5@xxxxxxxxxxx>
branch nick: dcplusplus
timestamp: Fri 2010-04-09 04:08:48 -0400
message:
  turn on NAT-T by default
modified:
  dcpp/AdcCommand.h
  dcpp/AdcHub.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dcpp/AdcCommand.h'
--- dcpp/AdcCommand.h	2010-04-04 06:51:11 +0000
+++ dcpp/AdcCommand.h	2010-04-09 08:08:48 +0000
@@ -201,7 +201,7 @@
 				C(SND);
 				C(SID);
 				C(CMD);
-#ifdef ENABLE_NAT_TRAVERSAL
+#ifndef DISABLE_NAT_TRAVERSAL
 				C(NAT);
 				C(RNT);
 #endif

=== modified file 'dcpp/AdcHub.cpp'
--- dcpp/AdcHub.cpp	2010-04-04 06:51:11 +0000
+++ dcpp/AdcHub.cpp	2010-04-09 08:08:48 +0000
@@ -355,7 +355,7 @@
 	if(c.getParameters().size() < 2) {
 		return;
 	}
-#ifndef ENABLE_NAT_TRAVERSAL
+#ifdef DISABLE_NAT_TRAVERSAL
 	if(!ClientManager::getInstance()->isActive())
 		return;
 #endif
@@ -375,7 +375,7 @@
 		unknownProtocol(c.getFrom(), protocol, token);
 		return;
 	}
-#ifdef ENABLE_NAT_TRAVERSAL
+#ifndef DISABLE_NAT_TRAVERSAL
 	if(ClientManager::getInstance()->isActive()) {
 		connect(*u, token, secure);
 		return;
@@ -388,7 +388,7 @@
 	// If they respond with their own, symmetric, RNT command, both
 	// clients call ConnectionManager::adcConnect.
 	send(AdcCommand(AdcCommand::CMD_NAT, u->getIdentity().getSID(), AdcCommand::TYPE_DIRECT).
-		addParam(protocol).addParam(Util::toString(sock->getLocalPort())).addParam(tok));
+		addParam(protocol).addParam(Util::toString(sock->getLocalPort())).addParam(token));
 	return;
 #else
 	connect(*u, token, secure);
@@ -824,7 +824,7 @@
 		su += ADCS_FEATURE + ",";
 	}
 
-#ifdef ENABLE_NAT_TRAVERSAL
+#ifndef DISABLE_NAT_TRAVERSAL
 	// FIXME this was presumably the source of the A/P bug in StrongDC++, examine
 	if(BOOLSETTING(NO_IP_OVERRIDE) && !SETTING(EXTERNAL_IP).empty()) {
 		addParam(lastInfoMap, c, "I4", Socket::resolve(SETTING(EXTERNAL_IP)));