From: Bart Polot Date: Tue, 17 Jun 2014 12:13:29 +0000 (+0000) Subject: - test and log for bug #0003423 X-Git-Tag: initial-import-from-subversion-38251~3730 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cd25d6c6f132a704d8ba8f6360bcbdc9fb0ad839;p=oweals%2Fgnunet.git - test and log for bug #0003423 --- diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 6d2402631..a110c8ebd 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -967,7 +967,7 @@ queue_send (void *cls, size_t size, void *buf) case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: LOG (GNUNET_ERROR_TYPE_DEBUG, " path create\n"); if (GCC_is_origin (c, GNUNET_YES)) - data_size = send_core_connection_create (queue->c, size, buf); + data_size = send_core_connection_create (c, size, buf); else data_size = send_core_data_raw (queue->cls, size, buf); break; @@ -975,7 +975,7 @@ queue_send (void *cls, size_t size, void *buf) LOG (GNUNET_ERROR_TYPE_DEBUG, " path ack\n"); if (GCC_is_origin (c, GNUNET_NO) || GCC_is_origin (c, GNUNET_YES)) - data_size = send_core_connection_ack (queue->c, size, buf); + data_size = send_core_connection_ack (c, size, buf); else data_size = send_core_data_raw (queue->cls, size, buf); break; @@ -1143,14 +1143,21 @@ GCP_queue_add (struct CadetPeer *peer, void *cls, uint16_t type, GCP_sent cont, void *cont_cls) { struct CadetPeerQueue *queue; + int error_level; int priority; int call_core; - LOG (GNUNET_ERROR_TYPE_INFO, + if (NULL == c && GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN != type) + error_level = GNUNET_ERROR_TYPE_ERROR; + else + error_level = GNUNET_ERROR_TYPE_INFO; + LOG (error_level, "que %s (%s %u) on connection %s (%p) %s towards %s (size %u)\n", GC_m2s (type), GC_m2s (payload_type), payload_id, GCC_2s (c), c, GC_f2s (fwd), GCP_2s (peer), size); + if (error_level == GNUNET_ERROR_TYPE_ERROR) + GNUNET_abort (); if (NULL == peer->connections) { /* We are not connected to this peer, ignore request. */