[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r557 - GNUnet/src/transports
From: |
grothoff |
Subject: |
[GNUnet-SVN] r557 - GNUnet/src/transports |
Date: |
Fri, 1 Apr 2005 16:49:08 -0800 (PST) |
Author: grothoff
Date: 2005-04-01 16:49:06 -0800 (Fri, 01 Apr 2005)
New Revision: 557
Modified:
GNUnet/src/transports/tcp.c
GNUnet/src/transports/tcp6.c
Log:
fix
Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2005-04-02 00:46:00 UTC (rev 556)
+++ GNUnet/src/transports/tcp.c 2005-04-02 00:49:06 UTC (rev 557)
@@ -440,11 +440,11 @@
#endif
welcome = (TCPWelcome*) &tcpSession->rbuff[0];
- if ( (ntohs(welcome->header.version) != 0) ||
+ if ( (ntohs(welcome->header.reserved) != 0) ||
(ntohs(welcome->header.size) != sizeof(TCPWelcome) -
sizeof(TCPMessagePack)) ) {
LOG(LOG_WARNING,
_("Expected welcome message on tcp connection, got garbage (%u,
%u). Closing.\n"),
- ntohs(welcome->header.version),
+ ntohs(welcome->header.reserved),
ntohs(welcome->header.size));
tcpDisconnect(tsession);
return SYSERR;
@@ -1081,7 +1081,7 @@
/* send our node identity to the other side to fully establish the
connection! */
welcome.header.size = htons(sizeof(TCPWelcome) - sizeof(TCPMessagePack));
- welcome.header.version = htons(0);
+ welcome.header.reserved = htons(0);
welcome.clientIdentity = *(coreAPI->myIdentity);
if (SYSERR == tcpDirectSend(tcpSession,
&welcome,
Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c 2005-04-02 00:46:00 UTC (rev 556)
+++ GNUnet/src/transports/tcp6.c 2005-04-02 00:49:06 UTC (rev 557)
@@ -79,17 +79,9 @@
* must match the CS_HEADER since we are using tcp6io.
*/
typedef struct {
- /**
- * size of the handshake message, in nbo, value is 24
- */
- unsigned short size;
+ TCP6MessagePack header;
/**
- * "message type", TCP6 version number, always 0.
- */
- unsigned short version;
-
- /**
* Identity of the node connecting (TCP6 client)
*/
PeerIdentity clientIdentity;
@@ -437,8 +429,8 @@
#endif
welcome = (TCP6Welcome*) &tcp6Session->rbuff[0];
- if ( (ntohs(welcome->version) != 0) ||
- (ntohs(welcome->size) != sizeof(TCP6Welcome)) ) {
+ if ( (ntohs(welcome->header.reserved) != 0) ||
+ (ntohs(welcome->header.size) != sizeof(TCP6Welcome) -
sizeof(TCP6MessagePack)) ) {
LOG(LOG_WARNING,
_("Expected welcome message on tcp connection, got garbage.
Closing.\n"));
tcp6Disconnect(tsession);
@@ -1088,8 +1080,8 @@
/* send our node identity to the other side to fully establish the
connection! */
- welcome.size = htons(sizeof(TCP6Welcome));
- welcome.version = htons(0);
+ welcome.header.size = htons(sizeof(TCP6Welcome) - sizeof(TCP6MessagePack));
+ welcome.header.reserved = htons(0);
memcpy(&welcome.clientIdentity,
coreAPI->myIdentity,
sizeof(PeerIdentity));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r557 - GNUnet/src/transports,
grothoff <=