aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-communicator-tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-communicator-tcp.c')
-rw-r--r--src/transport/gnunet-communicator-tcp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index 85c3eb422..d8d37bbb7 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -1890,7 +1890,8 @@ try_handle_plaintext (struct Queue *queue)
1890 return 0; /* not even a header */ 1890 return 0; /* not even a header */
1891 } 1891 }
1892 1892
1893 if ((GNUNET_YES != queue->initial_core_kx_done) && (queue->unverified_size > INITIAL_CORE_KX_SIZE)) 1893 if ((GNUNET_YES != queue->initial_core_kx_done) && (queue->unverified_size >
1894 INITIAL_CORE_KX_SIZE))
1894 { 1895 {
1895 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1896 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1896 "Already received data of size %lu bigger than KX size %lu!\n", 1897 "Already received data of size %lu bigger than KX size %lu!\n",
@@ -1905,7 +1906,7 @@ try_handle_plaintext (struct Queue *queue)
1905 switch (type) 1906 switch (type)
1906 { 1907 {
1907 case GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_CONFIRMATION_ACK: 1908 case GNUNET_MESSAGE_TYPE_COMMUNICATOR_TCP_CONFIRMATION_ACK:
1908 tca = (const struct TCPConfirmationAck *) queue->pread_buf; 1909 tca = (const struct TCPConfirmationAck *) queue->pread_buf;
1909 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1910 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1910 "start processing ack\n"); 1911 "start processing ack\n");
1911 if (sizeof(*tca) > queue->pread_off) 1912 if (sizeof(*tca) > queue->pread_off)
@@ -1978,7 +1979,11 @@ try_handle_plaintext (struct Queue *queue)
1978 queue->address->sa_family, NULL); 1979 queue->address->sa_family, NULL);
1979 } 1980 }
1980 1981
1981 queue->unverified_size = -1; 1982 /**
1983 * Once we received this ack, we consider this a verified connection.
1984 * FIXME: I am not sure this logic is sane here.
1985 */
1986 queue->initial_core_kx_done = GNUNET_YES;
1982 1987
1983 char *foreign_addr; 1988 char *foreign_addr;
1984 1989