[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/05: bitch and continue if we do not have a hand
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/05: bitch and continue if we do not have a handler for a message |
Date: |
Tue, 24 Jan 2017 21:59:36 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 2a4ba82b872fb7957093c450990854afa261d55c
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Jan 24 21:56:42 2017 +0100
bitch and continue if we do not have a handler for a message
---
src/cadet/cadet_api.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index a3b23d913..72b7b692d 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -489,7 +489,9 @@ static void
add_to_queue (struct GNUNET_CADET_Handle *h,
struct GNUNET_CADET_TransmitHandle *th)
{
- GNUNET_CONTAINER_DLL_insert_tail (h->th_head, h->th_tail, th);
+ GNUNET_CONTAINER_DLL_insert_tail (h->th_head,
+ h->th_tail,
+ th);
}
@@ -554,6 +556,7 @@ request_data (void *cls)
th->size,
&msg[1]);
GNUNET_assert (osize == th->size);
+
GNUNET_MQ_send (th->channel->cadet->mq,
env);
GNUNET_free (th);
@@ -706,7 +709,6 @@ handle_local_data (void *cls,
const struct GNUNET_MessageHeader *payload;
const struct GNUNET_CADET_MessageHandler *handler;
struct GNUNET_CADET_Channel *ch;
- unsigned int i;
uint16_t type;
ch = retrieve_channel (h,
@@ -723,8 +725,7 @@ handle_local_data (void *cls,
ntohl (message->ccn.channel_of_client),
GC_m2s (type),
type);
-
- for (i = 0; i < h->n_handlers; i++)
+ for (unsigned i=0;i<h->n_handlers;i++)
{
handler = &h->message_handlers[i];
if (handler->type == type)
@@ -738,11 +739,14 @@ handle_local_data (void *cls,
LOG (GNUNET_ERROR_TYPE_DEBUG,
"callback caused disconnection\n");
GNUNET_CADET_channel_destroy (ch);
- break;
+ return;
}
- break;
+ return;
}
}
+ /* Other peer sent message we do not comprehend. */
+ GNUNET_break_op (0);
+ GNUNET_CADET_receive_done (ch);
}
--
To stop receiving notification emails like this one, please contact
address@hidden