From a835acfb34cd0ccc1a0f77a6e1e2754411140abb Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 10 Dec 2012 20:49:10 +0000 Subject: [PATCH] - warning when trying to read when a read handle is already present --- src/stream/stream_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c index a0be54d43..9c6056c01 100644 --- a/src/stream/stream_api.c +++ b/src/stream/stream_api.c @@ -3581,8 +3581,11 @@ GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket, __func__); /* Return NULL if there is already a read handle; the user has to cancel that first before continuing or has to wait until it is completed */ - if (NULL != socket->read_handle) + if (NULL != socket->read_handle) + { + GNUNET_break (0); return NULL; + } GNUNET_assert (NULL != proc); switch (socket->state) { -- 2.25.1