gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r3699 - GNUnet/src/transports


From: grothoff
Subject: [GNUnet-SVN] r3699 - GNUnet/src/transports
Date: Sat, 11 Nov 2006 14:03:16 -0800 (PST)

Author: grothoff
Date: 2006-11-11 14:03:14 -0800 (Sat, 11 Nov 2006)
New Revision: 3699

Modified:
   GNUnet/src/transports/tcp.c
   GNUnet/src/transports/tcp_old.c
Log:
allow 0

Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2006-11-11 21:40:23 UTC (rev 3698)
+++ GNUnet/src/transports/tcp.c 2006-11-11 22:03:14 UTC (rev 3699)
@@ -110,7 +110,7 @@
   if (-1 == GC_get_configuration_value_number(cfg,
                                              "TCP",
                                              "PORT",
-                                             1,
+                                             0,
                                              65535,
                                              2086,
                                              &port)) {

Modified: GNUnet/src/transports/tcp_old.c
===================================================================
--- GNUnet/src/transports/tcp_old.c     2006-11-11 21:40:23 UTC (rev 3698)
+++ GNUnet/src/transports/tcp_old.c     2006-11-11 22:03:14 UTC (rev 3699)
@@ -511,7 +511,7 @@
   tcpSession->users = 1; /* us only, core has not seen this tsession! */
   tcpSession->lastUse = get_time();
   tsession = MALLOC(sizeof(TSession));
-  tsession->ttype = TCP_PROTOCOL_NUMBER;
+  tsession->ttype = TCP_OLD_PROTOCOL_NUMBER;
   tsession->internal = tcpSession;
   addTSession(tsession);
 }                                      
@@ -926,7 +926,7 @@
   if ( (ntohs(helo->senderAddressSize) != sizeof(HostAddress)) ||
        (ntohs(helo->header.size) != P2P_hello_MESSAGE_size(helo)) ||
        (ntohs(helo->header.type) != p2p_PROTO_hello) ||
-       (ntohs(helo->protocol) != TCP_PROTOCOL_NUMBER) )
+       (ntohs(helo->protocol) != TCP_OLD_PROTOCOL_NUMBER) )
     return SYSERR; /* obviously invalid */
   else
     return OK;
@@ -964,7 +964,7 @@
   haddr->port = htons(port);
   haddr->reserved = htons(0);
   msg->senderAddressSize = htons(sizeof(HostAddress));
-  msg->protocol = htons(TCP_PROTOCOL_NUMBER);
+  msg->protocol = htons(TCP_OLD_PROTOCOL_NUMBER);
   msg->MTU = htonl(tcpAPI.mtu);
   return msg;
 }
@@ -1245,17 +1245,17 @@
   stats = coreAPI->requestService("stats");
   if (stats != NULL) {
     stat_bytesReceived
-      = stats->create(gettext_noop("# bytes received via TCP"));
+      = stats->create(gettext_noop("# bytes received via TCP-OLD"));
     stat_bytesSent
-      = stats->create(gettext_noop("# bytes sent via TCP"));
+      = stats->create(gettext_noop("# bytes sent via TCP-OLD"));
     stat_bytesDropped
-      = stats->create(gettext_noop("# bytes dropped by TCP (outgoing)"));
+      = stats->create(gettext_noop("# bytes dropped by TCP-OLD (outgoing)"));
   }
-  tcpAPI.protocolNumber       = TCP_PROTOCOL_NUMBER;
+  tcpAPI.protocolNumber       = TCP_OLD_PROTOCOL_NUMBER;
   tcpAPI.mtu                  = 0;
   tcpAPI.cost                 = 20000; /* about equal to udp */
   tcpAPI.verifyHelo           = &verifyHelo;
-  tcpAPI.createhello           = &createhello;
+  tcpAPI.createhello          = &createhello;
   tcpAPI.connect              = &tcpConnect;
   tcpAPI.associate            = &tcpAssociate;
   tcpAPI.send                 = &tcpSend;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]