diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-15 15:25:51 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-06-15 15:25:51 +0000 |
commit | 60131038d16e94f837ab47ad2b0383f35c2af305 (patch) | |
tree | 5f612e064ee30d1dbf019df4defd53985b6161c8 /src/stream | |
parent | e444070fbb20f49bb55afd5d6158a9b42333557f (diff) | |
download | gnunet-60131038d16e94f837ab47ad2b0383f35c2af305.tar.gz gnunet-60131038d16e94f837ab47ad2b0383f35c2af305.zip |
remvod verbose debugging in stream api; fixed warning in stream_big test case
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/stream_api.c | 20 | ||||
-rw-r--r-- | src/stream/test_stream_big.c | 9 |
2 files changed, 4 insertions, 25 deletions
diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index 63e27ea98..1dc1ba80e 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c | |||
@@ -471,22 +471,6 @@ static unsigned int default_timeout = 10; | |||
471 | 471 | ||
472 | 472 | ||
473 | /** | 473 | /** |
474 | * Function to print the contents of an address location. Used only for debugging | ||
475 | * | ||
476 | * @param ptr the address location; Should be more than 5 bytes long | ||
477 | */ | ||
478 | static void | ||
479 | debug_print_contents (const void *ptr) | ||
480 | { | ||
481 | /* const char *c; */ | ||
482 | |||
483 | /* c = ptr; */ | ||
484 | /* LOG (GNUNET_ERROR_TYPE_DEBUG, */ | ||
485 | /* "--- contents: %u %u %u %u %u\n", c[0], c[1], c[2], c[3], c[4]); */ | ||
486 | } | ||
487 | |||
488 | |||
489 | /** | ||
490 | * Callback function for sending queued message | 474 | * Callback function for sending queued message |
491 | * | 475 | * |
492 | * @param cls closure the socket | 476 | * @param cls closure the socket |
@@ -846,7 +830,6 @@ write_data (struct GNUNET_STREAM_Socket *socket) | |||
846 | "%s: Placing DATA message with sequence %u in send queue\n", | 830 | "%s: Placing DATA message with sequence %u in send queue\n", |
847 | GNUNET_i2s (&socket->other_peer), | 831 | GNUNET_i2s (&socket->other_peer), |
848 | ntohl (io_handle->messages[packet]->sequence_number)); | 832 | ntohl (io_handle->messages[packet]->sequence_number)); |
849 | debug_print_contents(&(io_handle->messages[packet][1])); | ||
850 | copy_and_queue_message (socket, | 833 | copy_and_queue_message (socket, |
851 | &io_handle->messages[packet]->header, | 834 | &io_handle->messages[packet]->header, |
852 | NULL, | 835 | NULL, |
@@ -866,7 +849,6 @@ write_data (struct GNUNET_STREAM_Socket *socket) | |||
866 | "%s: Placing DATA message with sequence %u in send queue\n", | 849 | "%s: Placing DATA message with sequence %u in send queue\n", |
867 | GNUNET_i2s (&socket->other_peer), | 850 | GNUNET_i2s (&socket->other_peer), |
868 | ntohl (io_handle->messages[packet]->sequence_number)); | 851 | ntohl (io_handle->messages[packet]->sequence_number)); |
869 | debug_print_contents(&(io_handle->messages[packet][1])); | ||
870 | copy_and_queue_message (socket, | 852 | copy_and_queue_message (socket, |
871 | &io_handle->messages[packet]->header, | 853 | &io_handle->messages[packet]->header, |
872 | NULL, | 854 | NULL, |
@@ -928,7 +910,6 @@ call_read_processor (void *cls, | |||
928 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 910 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
929 | "%s: Calling read processor\n", | 911 | "%s: Calling read processor\n", |
930 | GNUNET_i2s (&socket->other_peer)); | 912 | GNUNET_i2s (&socket->other_peer)); |
931 | debug_print_contents (socket->receive_buffer + socket->copy_offset); | ||
932 | read_size = | 913 | read_size = |
933 | socket->read_handle->proc (socket->read_handle->proc_cls, | 914 | socket->read_handle->proc (socket->read_handle->proc_cls, |
934 | socket->status, | 915 | socket->status, |
@@ -1159,7 +1140,6 @@ handle_data (struct GNUNET_STREAM_Socket *socket, | |||
1159 | 1140 | ||
1160 | /* Copy Data to buffer */ | 1141 | /* Copy Data to buffer */ |
1161 | payload = &msg[1]; | 1142 | payload = &msg[1]; |
1162 | debug_print_contents(payload); | ||
1163 | GNUNET_assert (relative_offset + size <= socket->receive_buffer_size); | 1143 | GNUNET_assert (relative_offset + size <= socket->receive_buffer_size); |
1164 | memcpy (socket->receive_buffer + relative_offset, | 1144 | memcpy (socket->receive_buffer + relative_offset, |
1165 | payload, | 1145 | payload, |
diff --git a/src/stream/test_stream_big.c b/src/stream/test_stream_big.c index 001c4f67e..3fd10a1c3 100644 --- a/src/stream/test_stream_big.c +++ b/src/stream/test_stream_big.c | |||
@@ -164,9 +164,9 @@ write_completion (void *cls, | |||
164 | } | 164 | } |
165 | else | 165 | else |
166 | { | 166 | { |
167 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 167 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Writing successfully finished\n"); |
168 | "Finished writing the data; waiting for the other peer to finish" | 168 | result = GNUNET_OK; |
169 | "reading"); | 169 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | 172 | ||
@@ -271,8 +271,7 @@ input_processor (void *cls, | |||
271 | else | 271 | else |
272 | { | 272 | { |
273 | /* Peer2 has completed reading*/ | 273 | /* Peer2 has completed reading*/ |
274 | result = GNUNET_OK; | 274 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Reading finished successfully\n"); |
275 | GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | ||
276 | } | 275 | } |
277 | return size; | 276 | return size; |
278 | } | 277 | } |