diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-05-14 13:04:48 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-05-14 13:04:48 +0000 |
commit | 5a8c980e27163987553d4754dddb7902bcfd0f92 (patch) | |
tree | 5564dde7eb761240ce09ef395684349c039ae2d7 | |
parent | de04b35683a87227231220d06d89d692a93f9308 (diff) | |
download | gnunet-5a8c980e27163987553d4754dddb7902bcfd0f92.tar.gz gnunet-5a8c980e27163987553d4754dddb7902bcfd0f92.zip |
warnings
-rw-r--r-- | src/stream/stream_api.c | 12 | ||||
-rw-r--r-- | src/stream/test_stream_2peers_halfclose.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index e1fb85190..dadba33c5 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c | |||
@@ -2920,8 +2920,16 @@ GNUNET_STREAM_close (struct GNUNET_STREAM_Socket *socket) | |||
2920 | { | 2920 | { |
2921 | struct MessageQueue *head; | 2921 | struct MessageQueue *head; |
2922 | 2922 | ||
2923 | GNUNET_break (NULL == socket->read_handle); | 2923 | if (NULL != socket->read_handle) |
2924 | GNUNET_break (NULL == socket->write_handle); | 2924 | { |
2925 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
2926 | "Closing STREAM socket when a read handle is pending\n"); | ||
2927 | } | ||
2928 | if (NULL != socket->write_handle) | ||
2929 | { | ||
2930 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
2931 | "Closing STREAM socket when a write handle is pending\n"); | ||
2932 | } | ||
2925 | 2933 | ||
2926 | if (socket->read_task_id != GNUNET_SCHEDULER_NO_TASK) | 2934 | if (socket->read_task_id != GNUNET_SCHEDULER_NO_TASK) |
2927 | { | 2935 | { |
diff --git a/src/stream/test_stream_2peers_halfclose.c b/src/stream/test_stream_2peers_halfclose.c index 227fbd313..f001dddc6 100644 --- a/src/stream/test_stream_2peers_halfclose.c +++ b/src/stream/test_stream_2peers_halfclose.c | |||
@@ -338,6 +338,8 @@ shutdown_completion (void *cls, | |||
338 | case PEER1_WRITE: | 338 | case PEER1_WRITE: |
339 | GNUNET_assert (0); | 339 | GNUNET_assert (0); |
340 | case PEER1_WRITE_SHUTDOWN: | 340 | case PEER1_WRITE_SHUTDOWN: |
341 | GNUNET_assert (cls == &peer1); | ||
342 | GNUNET_assert (SHUT_WR == operation); | ||
341 | peer1.test_ok = GNUNET_YES; | 343 | peer1.test_ok = GNUNET_YES; |
342 | /* Peer2 should read with error */ | 344 | /* Peer2 should read with error */ |
343 | peer2.bytes_read = 0; | 345 | peer2.bytes_read = 0; |