[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20423 - gnunet/src/stream
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20423 - gnunet/src/stream |
Date: |
Sat, 10 Mar 2012 10:13:20 +0100 |
Author: harsha
Date: 2012-03-10 10:13:20 +0100 (Sat, 10 Mar 2012)
New Revision: 20423
Modified:
gnunet/src/stream/stream_api.c
gnunet/src/stream/test_stream_local.c
Log:
fixed retransmission task
Modified: gnunet/src/stream/stream_api.c
===================================================================
--- gnunet/src/stream/stream_api.c 2012-03-09 21:25:10 UTC (rev 20422)
+++ gnunet/src/stream/stream_api.c 2012-03-10 09:13:20 UTC (rev 20423)
@@ -791,10 +791,12 @@
packet++;
}
- GNUNET_SCHEDULER_add_delayed
- (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5),
- &retransmission_timeout_task,
- socket);
+ if (GNUNET_SCHEDULER_NO_TASK == socket->retransmission_timeout_task_id)
+ socket->retransmission_timeout_task_id =
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
+ (GNUNET_TIME_UNIT_SECONDS, 5),
+ &retransmission_timeout_task,
+ socket);
}
@@ -1837,6 +1839,11 @@
}
/* FIXME: include the case when write_handle is cancelled - ignore the
acks */
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%x: Received DATA_ACK from %x\n",
+ socket->our_id,
+ socket->other_peer);
/* Cancel the retransmission task */
if (GNUNET_SCHEDULER_NO_TASK != socket->retransmission_timeout_task_id)
@@ -1845,7 +1852,7 @@
socket->retransmission_timeout_task_id =
GNUNET_SCHEDULER_NO_TASK;
}
-
+
socket->write_handle->ack_bitmap = GNUNET_ntohll (ack->bitmap);
socket->receiver_window_available =
ntohl (ack->receive_window_remaining);
@@ -1868,7 +1875,6 @@
}
else /* We have to call the write continuation callback now */
{
-
/* Free the packets */
for (packet=0; packet < 64; packet++)
{
@@ -1879,6 +1885,9 @@
(socket->write_handle->write_cont_cls,
socket->status,
socket->write_handle->size);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%x: Write completion callback completed\n",
+ socket->our_id);
/* We are done with the write handle - Freeing it */
GNUNET_free (socket->write_handle);
socket->write_handle = NULL;
Modified: gnunet/src/stream/test_stream_local.c
===================================================================
--- gnunet/src/stream/test_stream_local.c 2012-03-09 21:25:10 UTC (rev
20422)
+++ gnunet/src/stream/test_stream_local.c 2012-03-10 09:13:20 UTC (rev
20423)
@@ -204,6 +204,9 @@
GNUNET_assert (size <= strlen (data));
peer->bytes_wrote += size;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Writing completed\n");
+
if (peer->bytes_wrote < strlen(data)) /* Have more data to send */
{
peer->io_write_handle =
@@ -319,7 +322,7 @@
{
GNUNET_SCHEDULER_add_now (&do_shutdown, NULL);
}
- }
+ }
return size;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20423 - gnunet/src/stream,
gnunet <=