aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Gillmann <ng0@n0.is>2018-05-22 08:57:06 +0000
committerNils Gillmann <ng0@n0.is>2018-05-22 08:57:06 +0000
commita497772f2d5f2b0a878247bfaa5ba585039b471e (patch)
tree4a3c7fb425003f78012b302f7ca708a821001dbc /src
parent3c9d70c60631aeb26e4adab6d37aeb953dcd6dfa (diff)
parent114def25b1d825b78521554730754dc1acf3bb60 (diff)
Merge branch 'master' of gnunet.org:gnunet
Diffstat (limited to 'src')
-rw-r--r--src/cadet/cadet_api.c25
-rw-r--r--src/cadet/gnunet-service-cadet.c1
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c8
-rw-r--r--src/cadet/gnunet-service-cadet_core.c4
-rw-r--r--src/dht/plugin_block_dht.c15
-rw-r--r--src/rps/test_rps.conf4
6 files changed, 33 insertions, 24 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index 3c142a95c6..59f0bfe85d 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -464,6 +464,10 @@ cadet_mq_send_now (void *cls)
}
ch->allow_send--;
ch->pending_env = NULL;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending message on channel %s to CADET, new window size is %u\n",
+ GNUNET_i2s (&ch->peer),
+ ch->allow_send);
GNUNET_MQ_send (ch->cadet->mq,
env);
GNUNET_MQ_impl_send_continue (ch->mq);
@@ -781,6 +785,11 @@ handle_local_ack (void *cls,
return;
}
ch->allow_send++;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Got an ACK on mq channel %X (peer %s); new window size is %u!\n",
+ ntohl (ch->ccn.channel_of_client),
+ GNUNET_i2s (&ch->peer),
+ ch->allow_send);
if (NULL == ch->pending_env)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -792,9 +801,6 @@ handle_local_ack (void *cls,
}
if (NULL != ch->mq_cont)
return; /* already working on it! */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Got an ACK on mq channel %X, sending pending message!\n",
- ntohl (ch->ccn.channel_of_client));
ch->mq_cont
= GNUNET_SCHEDULER_add_now (&cadet_mq_send_now,
ch);
@@ -992,6 +998,7 @@ check_get_tunnels (void *cls,
{
size_t esize;
+ (void) cls;
esize = ntohs (message->size);
if (sizeof (struct GNUNET_CADET_LocalInfoTunnel) == esize)
return GNUNET_OK;
@@ -1051,6 +1058,7 @@ check_get_tunnel (void *cls,
size_t esize;
size_t msize;
+ (void) cls;
/* Verify message sanity */
msize = ntohs (msg->header.size);
esize = sizeof (struct GNUNET_CADET_LocalInfoTunnel);
@@ -1096,7 +1104,6 @@ handle_get_tunnel (void *cls,
if (NULL == h->info_cb.tunnel_cb)
return;
-
ch_n = ntohl (msg->channels);
c_n = ntohl (msg->connections);
@@ -1191,13 +1198,8 @@ destroy_channel_cb (void *cls,
/* struct GNUNET_CADET_Handle *handle = cls; */
struct GNUNET_CADET_Channel *ch = value;
- if (ntohl (ch->ccn.channel_of_client) >= GNUNET_CADET_LOCAL_CHANNEL_ID_CLI)
- {
- GNUNET_break (0);
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "channel %X not destroyed\n",
- ntohl (ch->ccn.channel_of_client));
- }
+ (void) cls;
+ (void) cid;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Destroying channel due to GNUNET_CADET_disconnect()\n");
destroy_channel (ch);
@@ -1222,6 +1224,7 @@ destroy_port_cb (void *cls,
/* struct GNUNET_CADET_Handle *handle = cls; */
struct GNUNET_CADET_Port *port = value;
+ (void) cls;
/* This is a warning, the app should have cleanly closed all open ports */
GNUNET_break (0);
GNUNET_CADET_close_port (port);
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index 20e4c363ef..23a4bc2476 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -763,6 +763,7 @@ handle_local_data (void *cls,
buf,
payload_size))
{
+ GNUNET_break (0);
GNUNET_SERVICE_client_drop (c->client);
return;
}
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 7a7942dea8..2d8d36c6c8 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1279,8 +1279,7 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
uint32_t delta;
GNUNET_assert (GNUNET_NO == ch->is_loopback);
- if ( (GNUNET_YES == ch->destroy) &&
- (NULL == ch->owner) &&
+ if ( (NULL == ch->owner) &&
(NULL == ch->dest) )
{
/* This client is gone, but we still have messages to send to
@@ -1290,8 +1289,9 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
"Dropping incoming payload on %s as this end is already closed\n",
GCCH_2s (ch));
/* send back DESTROY notification to stop further retransmissions! */
- GCT_send_channel_destroy (ch->t,
- ch->ctn);
+ if (GNUNET_YES == ch->destroy)
+ GCT_send_channel_destroy (ch->t,
+ ch->ctn);
return;
}
payload_size = ntohs (msg->header.size) - sizeof (*msg);
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c
index 06d1fe3cc1..65738504ed 100644
--- a/src/cadet/gnunet-service-cadet_core.c
+++ b/src/cadet/gnunet-service-cadet_core.c
@@ -653,7 +653,7 @@ timeout_cb (void *cls)
NULL);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Sending BROKEN due to timeout (%s was last use, %s linger)\n",
GNUNET_STRINGS_absolute_time_to_string (r->last_use),
GNUNET_STRINGS_relative_time_to_string (linger,
@@ -715,7 +715,7 @@ dir_ready_cb (void *cls,
return;
}
odir = (dir == &route->next) ? &route->prev : &route->next;
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending BROKEN due to MQ going down\n");
send_broken (&route->next,
&route->cid,
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
index 24f8b21b25..9f2861b50c 100644
--- a/src/dht/plugin_block_dht.c
+++ b/src/dht/plugin_block_dht.c
@@ -66,7 +66,8 @@ block_plugin_dht_create_group (void *cls,
guard = va_arg (va, const char *);
if (0 == strcmp (guard,
"seen-set-size"))
- bf_size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va, unsigned int),
+ bf_size = GNUNET_BLOCK_GROUP_compute_bloomfilter_size (va_arg (va,
+ unsigned int),
BLOOMFILTER_K);
else if (0 == strcmp (guard,
"filter-size"))
@@ -183,14 +184,17 @@ block_plugin_dht_get_key (void *cls,
return GNUNET_SYSERR;
if (block_size < sizeof (struct GNUNET_MessageHeader))
{
- GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht",
- _("Block not of type %u\n"), GNUNET_BLOCK_TYPE_DHT_HELLO);
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "block-dht",
+ _("Block not of type %u\n"),
+ GNUNET_BLOCK_TYPE_DHT_HELLO);
return GNUNET_NO;
}
msg = block;
if (block_size != ntohs (msg->size))
{
- GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht",
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "block-dht",
_("Size mismatch for block\n"),
GNUNET_BLOCK_TYPE_DHT_HELLO);
return GNUNET_NO;
@@ -200,7 +204,8 @@ block_plugin_dht_get_key (void *cls,
pid = (struct GNUNET_PeerIdentity *) key;
if (GNUNET_OK != GNUNET_HELLO_get_id (hello, pid))
{
- GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "block-dht",
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "block-dht",
_("Block of type %u is malformed\n"),
GNUNET_BLOCK_TYPE_DHT_HELLO);
return GNUNET_NO;
diff --git a/src/rps/test_rps.conf b/src/rps/test_rps.conf
index f171335d6d..cf6b3150c1 100644
--- a/src/rps/test_rps.conf
+++ b/src/rps/test_rps.conf
@@ -29,7 +29,7 @@ HOSTNAME = localhost
# MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 100
OVERLAY_TOPOLOGY = CLIQUE
#OVERLAY_TOPOLOGY = SMALL_WORLD
-#SCALE_FREE_TOPOLOGY_CAP =
+#SCALE_FREE_TOPOLOGY_CAP =
# OVERLAY_RANDOM_LINKS = 25
@@ -74,6 +74,7 @@ DISABLE_TRY_CONNECT = YES
[cadet]
DISABLE_TRY_CONNECT = YES
#OPTIONS=-l /tmp/rps_profiler_logs/cadet-[]-%Y-%m-%d.log
+#PREFIX = valgrind
#[arm]
#GLOBAL_POSTFIX=-l /tmp/rps_profiler_logs/other-[]-%Y-%m-%d.log
@@ -120,4 +121,3 @@ AUTOSTART = NO
[fs]
FORCESTART = NO
AUTOSTART = NO
-