From b199b782b393d0fc04b5978edd69e36d6ae7ea64 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 13 Jul 2015 20:23:53 +0000 Subject: adding moderately expensive instrumentation to track down invariant violation #3846 in CADET --- src/cadet/gnunet-service-cadet_connection.h | 35 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'src/cadet/gnunet-service-cadet_connection.h') diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h index b72536533..a6d0a7096 100644 --- a/src/cadet/gnunet-service-cadet_connection.h +++ b/src/cadet/gnunet-service-cadet_connection.h @@ -102,10 +102,14 @@ struct CadetConnectionQueue; * @param fwd Was this a FWD going message? * @param size Size of the message. */ -typedef void (*GCC_sent) (void *cls, - struct CadetConnection *c, - struct CadetConnectionQueue *q, - uint16_t type, int fwd, size_t size); +typedef void +(*GCC_sent) (void *cls, + struct CadetConnection *c, + struct CadetConnectionQueue *q, + uint16_t type, + int fwd, + size_t size); + /** * Core handler for connection creation. @@ -113,37 +117,38 @@ typedef void (*GCC_sent) (void *cls, * @param cls Closure (unused). * @param peer Sender (neighbor). * @param message Message. - * - * @return GNUNET_OK to keep the connection open, - * GNUNET_SYSERR to close it (signal serious error) + * @return #GNUNET_OK to keep the connection open, + * #GNUNET_SYSERR to close it (signal serious error) */ int -GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer, +GCC_handle_create (void *cls, + const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message); + /** * Core handler for path confirmations. * * @param cls closure * @param message message * @param peer peer identity this notification is about - * - * @return GNUNET_OK to keep the connection open, - * GNUNET_SYSERR to close it (signal serious error) + * @return #GNUNET_OK to keep the connection open, + * #GNUNET_SYSERR to close it (signal serious error) */ int -GCC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer, +GCC_handle_confirm (void *cls, + const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message); + /** * Core handler for notifications of broken paths * * @param cls Closure (unused). * @param id Peer identity of sending neighbor. * @param message Message. - * - * @return GNUNET_OK to keep the connection open, - * GNUNET_SYSERR to close it (signal serious error) + * @return #GNUNET_OK to keep the connection open, + * #GNUNET_SYSERR to close it (signal serious error) */ int GCC_handle_broken (void* cls, -- cgit v1.2.3