aboutsummaryrefslogtreecommitdiff
path: root/src/stream/test_stream_local.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/test_stream_local.c')
-rw-r--r--src/stream/test_stream_local.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/stream/test_stream_local.c b/src/stream/test_stream_local.c
index 125fc6df8..9a6c13da6 100644
--- a/src/stream/test_stream_local.c
+++ b/src/stream/test_stream_local.c
@@ -204,9 +204,6 @@ write_completion (void *cls,
204 GNUNET_assert (size <= strlen (data)); 204 GNUNET_assert (size <= strlen (data));
205 peer->bytes_wrote += size; 205 peer->bytes_wrote += size;
206 206
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
208 "Writing completed\n");
209
210 if (peer->bytes_wrote < strlen(data)) /* Have more data to send */ 207 if (peer->bytes_wrote < strlen(data)) /* Have more data to send */
211 { 208 {
212 peer->io_write_handle = 209 peer->io_write_handle =
@@ -221,6 +218,9 @@ write_completion (void *cls,
221 } 218 }
222 else 219 else
223 { 220 {
221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
222 "Writing completed\n");
223
224 if (&peer1 == peer) /* Peer1 has finished writing; should read now */ 224 if (&peer1 == peer) /* Peer1 has finished writing; should read now */
225 { 225 {
226 peer->io_read_handle = 226 peer->io_read_handle =
@@ -359,8 +359,8 @@ stream_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
359 */ 359 */
360static int 360static int
361stream_listen_cb (void *cls, 361stream_listen_cb (void *cls,
362 struct GNUNET_STREAM_Socket *socket, 362 struct GNUNET_STREAM_Socket *socket,
363 const struct GNUNET_PeerIdentity *initiator) 363 const struct GNUNET_PeerIdentity *initiator)
364{ 364{
365 GNUNET_assert (NULL != socket); 365 GNUNET_assert (NULL != socket);
366 GNUNET_assert (NULL != initiator); 366 GNUNET_assert (NULL != initiator);
@@ -372,6 +372,7 @@ stream_listen_cb (void *cls,
372 GNUNET_i2s(initiator)); 372 GNUNET_i2s(initiator));
373 373
374 peer2.socket = socket; 374 peer2.socket = socket;
375 /* FIXME: reading should be done right now instead of a scheduled call */
375 read_task = GNUNET_SCHEDULER_add_now (&stream_read, (void *) socket); 376 read_task = GNUNET_SCHEDULER_add_now (&stream_read, (void *) socket);
376 return GNUNET_OK; 377 return GNUNET_OK;
377} 378}