aboutsummaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-29 12:32:57 +0100
committerChristian Grothoff <christian@grothoff.org>2017-10-29 12:32:57 +0100
commit17f5db6f7c8d60930367738b3d872fbf891486ee (patch)
tree52e6362a319a417c813876f36733b4bdc567593a /src/util/client.c
parentd10108c802b56535b03597e9fbb7603b0eeef9c0 (diff)
downloadgnunet-17f5db6f7c8d60930367738b3d872fbf891486ee.tar.gz
gnunet-17f5db6f7c8d60930367738b3d872fbf891486ee.zip
allow MST callback to distinguish between disconnect and parse error situations, and only log for the hard errors
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 90bc837d7..138b1cfdd 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -306,7 +306,9 @@ transmit_ready (void *cls)
306 * 306 *
307 * @param cls the `struct ClientState` 307 * @param cls the `struct ClientState`
308 * @param msg message we received. 308 * @param msg message we received.
309 * @return #GNUNET_OK on success, #GNUNET_SYSERR to stop further processing 309 * @return #GNUNET_OK on success,
310 * #GNUNET_NO to stop further processing due to disconnect (no error)
311 * #GNUNET_SYSERR to stop further processing due to error
310 */ 312 */
311static int 313static int
312recv_message (void *cls, 314recv_message (void *cls,
@@ -315,7 +317,7 @@ recv_message (void *cls,
315 struct ClientState *cstate = cls; 317 struct ClientState *cstate = cls;
316 318
317 if (GNUNET_YES == cstate->in_destroy) 319 if (GNUNET_YES == cstate->in_destroy)
318 return GNUNET_SYSERR; 320 return GNUNET_NO;
319 LOG (GNUNET_ERROR_TYPE_DEBUG, 321 LOG (GNUNET_ERROR_TYPE_DEBUG,
320 "Received message of type %u and size %u from %s\n", 322 "Received message of type %u and size %u from %s\n",
321 ntohs (msg->type), 323 ntohs (msg->type),
@@ -324,7 +326,7 @@ recv_message (void *cls,
324 GNUNET_MQ_inject_message (cstate->mq, 326 GNUNET_MQ_inject_message (cstate->mq,
325 msg); 327 msg);
326 if (GNUNET_YES == cstate->in_destroy) 328 if (GNUNET_YES == cstate->in_destroy)
327 return GNUNET_SYSERR; 329 return GNUNET_NO;
328 return GNUNET_OK; 330 return GNUNET_OK;
329} 331}
330 332