summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/POTFILES.in114
-rw-r--r--src/transport/Makefile.am2
-rw-r--r--src/transport/gnunet-service-tng.c97
-rw-r--r--src/transport/test_transport_api2_tcp_peer1.conf1
-rw-r--r--src/transport/test_transport_api2_tcp_peer2.conf1
-rw-r--r--src/transport/test_transport_api_tcp_peer1.conf2
-rw-r--r--src/transport/test_transport_api_tcp_peer2.conf2
-rw-r--r--src/transport/transport-testing2.c2
-rw-r--r--src/util/time.c4
9 files changed, 138 insertions, 87 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 51ada43b3..9dcfb81cf 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,21 +10,13 @@ src/arm/arm_monitor_api.c
src/arm/gnunet-arm.c
src/arm/gnunet-service-arm.c
src/arm/mockup-service.c
-src/ats-tests/ats-testing-experiment.c
-src/ats-tests/ats-testing-log.c
-src/ats-tests/ats-testing-preferences.c
-src/ats-tests/ats-testing-traffic.c
-src/ats-tests/ats-testing.c
-src/ats-tests/gnunet-ats-sim.c
-src/ats-tests/gnunet-solver-eval.c
-src/ats-tool/gnunet-ats.c
src/ats/ats_api_connectivity.c
src/ats/ats_api_performance.c
src/ats/ats_api_scanner.c
src/ats/ats_api_scheduling.c
src/ats/gnunet-ats-solver-eval.c
-src/ats/gnunet-service-ats.c
src/ats/gnunet-service-ats_addresses.c
+src/ats/gnunet-service-ats.c
src/ats/gnunet-service-ats_connectivity.c
src/ats/gnunet-service-ats_normalization.c
src/ats/gnunet-service-ats_performance.c
@@ -33,6 +25,14 @@ src/ats/gnunet-service-ats_preferences.c
src/ats/gnunet-service-ats_reservations.c
src/ats/gnunet-service-ats_scheduling.c
src/ats/plugin_ats_proportional.c
+src/ats-tests/ats-testing.c
+src/ats-tests/ats-testing-experiment.c
+src/ats-tests/ats-testing-log.c
+src/ats-tests/ats-testing-preferences.c
+src/ats-tests/ats-testing-traffic.c
+src/ats-tests/gnunet-ats-sim.c
+src/ats-tests/gnunet-solver-eval.c
+src/ats-tool/gnunet-ats.c
src/auction/gnunet-auction-create.c
src/auction/gnunet-auction-info.c
src/auction/gnunet-auction-join.c
@@ -50,8 +50,8 @@ src/cadet/cadet_api_list_peers.c
src/cadet/cadet_api_list_tunnels.c
src/cadet/cadet_test_lib.c
src/cadet/desirability_table.c
-src/cadet/gnunet-cadet-profiler.c
src/cadet/gnunet-cadet.c
+src/cadet/gnunet-cadet-profiler.c
src/cadet/gnunet-service-cadet.c
src/cadet/gnunet-service-cadet_channel.c
src/cadet/gnunet-service-cadet_connection.c
@@ -67,15 +67,15 @@ src/consensus/gnunet-service-consensus.c
src/consensus/plugin_block_consensus.c
src/conversation/conversation_api.c
src/conversation/conversation_api_call.c
-src/conversation/gnunet-conversation-test.c
src/conversation/gnunet-conversation.c
-src/conversation/gnunet-helper-audio-playback-gst.c
+src/conversation/gnunet-conversation-test.c
+src/conversation/gnunet_gst.c
+src/conversation/gnunet_gst_test.c
src/conversation/gnunet-helper-audio-playback.c
-src/conversation/gnunet-helper-audio-record-gst.c
+src/conversation/gnunet-helper-audio-playback-gst.c
src/conversation/gnunet-helper-audio-record.c
+src/conversation/gnunet-helper-audio-record-gst.c
src/conversation/gnunet-service-conversation.c
-src/conversation/gnunet_gst.c
-src/conversation/gnunet_gst_test.c
src/conversation/microphone.c
src/conversation/plugin_gnsrecord_conversation.c
src/conversation/speaker.c
@@ -105,6 +105,7 @@ src/dht/dht_api.c
src/dht/dht_test_lib.c
src/dht/gnunet-dht-get.c
src/dht/gnunet-dht-monitor.c
+src/dht/gnunet_dht_profiler.c
src/dht/gnunet-dht-put.c
src/dht/gnunet-service-dht.c
src/dht/gnunet-service-dht_clients.c
@@ -113,7 +114,6 @@ src/dht/gnunet-service-dht_hello.c
src/dht/gnunet-service-dht_neighbours.c
src/dht/gnunet-service-dht_nse.c
src/dht/gnunet-service-dht_routing.c
-src/dht/gnunet_dht_profiler.c
src/dht/plugin_block_dht.c
src/dns/dns_api.c
src/dns/gnunet-dns-monitor.c
@@ -148,8 +148,8 @@ src/fs/gnunet-auto-share.c
src/fs/gnunet-daemon-fsprofiler.c
src/fs/gnunet-directory.c
src/fs/gnunet-download.c
-src/fs/gnunet-fs-profiler.c
src/fs/gnunet-fs.c
+src/fs/gnunet-fs-profiler.c
src/fs/gnunet-helper-fs-publish.c
src/fs/gnunet-publish.c
src/fs/gnunet-search.c
@@ -169,9 +169,9 @@ src/gns/gns_tld_api.c
src/gns/gnunet-bcd.c
src/gns/gnunet-dns2gns.c
src/gns/gnunet-gns-benchmark.c
+src/gns/gnunet-gns.c
src/gns/gnunet-gns-import.c
src/gns/gnunet-gns-proxy.c
-src/gns/gnunet-gns.c
src/gns/gnunet-service-gns.c
src/gns/gnunet-service-gns_interceptor.c
src/gns/gnunet-service-gns_resolver.c
@@ -189,8 +189,8 @@ src/gnsrecord/json_gnsrecord.c
src/gnsrecord/plugin_gnsrecord_dns.c
src/hello/address.c
src/hello/gnunet-hello.c
-src/hello/hello-ng.c
src/hello/hello.c
+src/hello/hello-ng.c
src/hostlist/gnunet-daemon-hostlist.c
src/hostlist/gnunet-daemon-hostlist_client.c
src/hostlist/gnunet-daemon-hostlist_server.c
@@ -205,8 +205,8 @@ src/json/json_generator.c
src/json/json_helper.c
src/json/json_mhd.c
src/messenger/gnunet-messenger.c
-src/messenger/gnunet-service-messenger.c
src/messenger/gnunet-service-messenger_basement.c
+src/messenger/gnunet-service-messenger.c
src/messenger/gnunet-service-messenger_contact.c
src/messenger/gnunet-service-messenger_handle.c
src/messenger/gnunet-service-messenger_list_handles.c
@@ -236,8 +236,8 @@ src/namecache/namecache_api.c
src/namecache/plugin_namecache_flat.c
src/namecache/plugin_namecache_postgres.c
src/namecache/plugin_namecache_sqlite.c
-src/namestore/gnunet-namestore-fcfsd.c
src/namestore/gnunet-namestore.c
+src/namestore/gnunet-namestore-fcfsd.c
src/namestore/gnunet-service-namestore.c
src/namestore/gnunet-zoneimport.c
src/namestore/namestore_api.c
@@ -263,17 +263,17 @@ src/nat/gnunet-service-nat_mini.c
src/nat/gnunet-service-nat_stun.c
src/nat/nat_api.c
src/nat/nat_api_stun.c
-src/nse/gnunet-nse-profiler.c
src/nse/gnunet-nse.c
+src/nse/gnunet-nse-profiler.c
src/nse/gnunet-service-nse.c
src/nse/nse_api.c
src/nt/nt.c
-src/peerinfo-tool/gnunet-peerinfo.c
-src/peerinfo-tool/gnunet-peerinfo_plugins.c
-src/peerinfo-tool/plugin_rest_peerinfo.c
src/peerinfo/gnunet-service-peerinfo.c
src/peerinfo/peerinfo_api.c
src/peerinfo/peerinfo_api_notify.c
+src/peerinfo-tool/gnunet-peerinfo.c
+src/peerinfo-tool/gnunet-peerinfo_plugins.c
+src/peerinfo-tool/plugin_rest_peerinfo.c
src/peerstore/gnunet-peerstore.c
src/peerstore/gnunet-service-peerstore.c
src/peerstore/peerstore_api.c
@@ -319,27 +319,27 @@ src/rest/gnunet-rest-server.c
src/rest/plugin_rest_config.c
src/rest/plugin_rest_copying.c
src/rest/rest.c
-src/revocation/gnunet-revocation-tvg.c
src/revocation/gnunet-revocation.c
+src/revocation/gnunet-revocation-tvg.c
src/revocation/gnunet-service-revocation.c
src/revocation/plugin_block_revocation.c
src/revocation/revocation_api.c
-src/rps/gnunet-rps-profiler.c
src/rps/gnunet-rps.c
+src/rps/gnunet-rps-profiler.c
src/rps/gnunet-service-rps.c
src/rps/gnunet-service-rps_custommap.c
src/rps/gnunet-service-rps_sampler.c
src/rps/gnunet-service-rps_sampler_elem.c
src/rps/gnunet-service-rps_view.c
+src/rps/rps_api.c
src/rps/rps-sampler_client.c
src/rps/rps-sampler_common.c
src/rps/rps-test_util.c
-src/rps/rps_api.c
src/scalarproduct/gnunet-scalarproduct.c
-src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
-src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
src/scalarproduct/gnunet-service-scalarproduct_alice.c
src/scalarproduct/gnunet-service-scalarproduct_bob.c
+src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
src/scalarproduct/scalarproduct_api.c
src/secretsharing/gnunet-secretsharing-profiler.c
src/secretsharing/gnunet-service-secretsharing.c
@@ -353,12 +353,12 @@ src/set/gnunet-set-ibf-profiler.c
src/set/gnunet-set-profiler.c
src/set/ibf.c
src/set/ibf_sim.c
-src/set/plugin_block_set_test.c
-src/set/set_api.c
src/seti/gnunet-service-seti.c
src/seti/gnunet-seti-profiler.c
src/seti/plugin_block_seti_test.c
src/seti/seti_api.c
+src/set/plugin_block_set_test.c
+src/set/set_api.c
src/setu/gnunet-service-setu.c
src/setu/gnunet-service-setu_strata_estimator.c
src/setu/gnunet-setu-ibf-profiler.c
@@ -377,16 +377,15 @@ src/statistics/gnunet-statistics.c
src/statistics/statistics_api.c
src/template/gnunet-service-template.c
src/template/gnunet-template.c
-src/testbed-logger/gnunet-service-testbed-logger.c
-src/testbed-logger/testbed_logger_api.c
src/testbed/generate-underlay-topology.c
src/testbed/gnunet-daemon-latency-logger.c
src/testbed/gnunet-daemon-testbed-blacklist.c
src/testbed/gnunet-daemon-testbed-underlay.c
src/testbed/gnunet-helper-testbed.c
+src/testbed/gnunet_mpi_test.c
src/testbed/gnunet-service-test-barriers.c
-src/testbed/gnunet-service-testbed.c
src/testbed/gnunet-service-testbed_barriers.c
+src/testbed/gnunet-service-testbed.c
src/testbed/gnunet-service-testbed_cache.c
src/testbed/gnunet-service-testbed_connectionpool.c
src/testbed/gnunet-service-testbed_cpustatus.c
@@ -394,19 +393,20 @@ src/testbed/gnunet-service-testbed_links.c
src/testbed/gnunet-service-testbed_meminfo.c
src/testbed/gnunet-service-testbed_oc.c
src/testbed/gnunet-service-testbed_peers.c
-src/testbed/gnunet-testbed-profiler.c
-src/testbed/gnunet_mpi_test.c
src/testbed/gnunet_testbed_mpi_spawn.c
-src/testbed/testbed_api.c
+src/testbed/gnunet-testbed-profiler.c
+src/testbed-logger/gnunet-service-testbed-logger.c
+src/testbed-logger/testbed_logger_api.c
src/testbed/testbed_api_barriers.c
+src/testbed/testbed_api.c
src/testbed/testbed_api_hosts.c
src/testbed/testbed_api_operations.c
src/testbed/testbed_api_peers.c
src/testbed/testbed_api_sd.c
src/testbed/testbed_api_services.c
src/testbed/testbed_api_statistics.c
-src/testbed/testbed_api_test.c
src/testbed/testbed_api_testbed.c
+src/testbed/testbed_api_test.c
src/testbed/testbed_api_topology.c
src/testbed/testbed_api_underlay.c
src/testing/gnunet-testing.c
@@ -418,45 +418,34 @@ src/transport/gnunet-communicator-tcp.c
src/transport/gnunet-communicator-udp.c
src/transport/gnunet-communicator-unix.c
src/transport/gnunet-helper-transport-bluetooth.c
-src/transport/gnunet-helper-transport-wlan-dummy.c
src/transport/gnunet-helper-transport-wlan.c
+src/transport/gnunet-helper-transport-wlan-dummy.c
src/transport/gnunet-service-tng.c
-src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_ats.c
+src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_hello.c
src/transport/gnunet-service-transport_manipulation.c
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_plugins.c
src/transport/gnunet-service-transport_validation.c
+src/transport/gnunet-transport.c
src/transport/gnunet-transport-profiler.c
src/transport/gnunet-transport-wlan-receiver.c
src/transport/gnunet-transport-wlan-sender.c
-src/transport/gnunet-transport.c
src/transport/plugin_transport_http_client.c
src/transport/plugin_transport_http_common.c
src/transport/plugin_transport_http_server.c
src/transport/plugin_transport_smtp.c
src/transport/plugin_transport_tcp.c
src/transport/plugin_transport_template.c
-src/transport/plugin_transport_udp.c
src/transport/plugin_transport_udp_broadcasting.c
+src/transport/plugin_transport_udp.c
src/transport/plugin_transport_unix.c
src/transport/plugin_transport_wlan.c
src/transport/tcp_connection_legacy.c
src/transport/tcp_server_legacy.c
src/transport/tcp_server_mst_legacy.c
src/transport/tcp_service_legacy.c
-src/transport/transport-testing-communicator.c
-src/transport/transport-testing-filenames.c
-src/transport/transport-testing-filenames2.c
-src/transport/transport-testing-loggers.c
-src/transport/transport-testing-loggers2.c
-src/transport/transport-testing-main.c
-src/transport/transport-testing-main2.c
-src/transport/transport-testing-send.c
-src/transport/transport-testing-send2.c
-src/transport/transport-testing.c
-src/transport/transport-testing2.c
src/transport/transport_api2_application.c
src/transport/transport_api2_communication.c
src/transport/transport_api2_core.c
@@ -469,6 +458,17 @@ src/transport/transport_api_manipulation.c
src/transport/transport_api_monitor_peers.c
src/transport/transport_api_monitor_plugins.c
src/transport/transport_api_offer_hello.c
+src/transport/transport-testing2.c
+src/transport/transport-testing.c
+src/transport/transport-testing-communicator.c
+src/transport/transport-testing-filenames2.c
+src/transport/transport-testing-filenames.c
+src/transport/transport-testing-loggers2.c
+src/transport/transport-testing-loggers.c
+src/transport/transport-testing-main2.c
+src/transport/transport-testing-main.c
+src/transport/transport-testing-send2.c
+src/transport/transport-testing-send.c
src/util/bandwidth.c
src/util/benchmark.c
src/util/bio.c
@@ -483,8 +483,8 @@ src/util/consttime_memcmp.c
src/util/container_bloomfilter.c
src/util/container_heap.c
src/util/container_meta_data.c
-src/util/container_multihashmap.c
src/util/container_multihashmap32.c
+src/util/container_multihashmap.c
src/util/container_multipeermap.c
src/util/container_multishortmap.c
src/util/container_multiuuidmap.c
@@ -508,8 +508,8 @@ src/util/dnsparser.c
src/util/dnsstub.c
src/util/getopt.c
src/util/getopt_helpers.c
-src/util/gnunet-config-diff.c
src/util/gnunet-config.c
+src/util/gnunet-config-diff.c
src/util/gnunet-crypto-tvg.c
src/util/gnunet-ecc.c
src/util/gnunet-qr.c
@@ -547,8 +547,8 @@ src/vpn/gnunet-helper-vpn.c
src/vpn/gnunet-service-vpn.c
src/vpn/gnunet-vpn.c
src/vpn/vpn_api.c
-src/zonemaster/gnunet-service-zonemaster-monitor.c
src/zonemaster/gnunet-service-zonemaster.c
+src/zonemaster/gnunet-service-zonemaster-monitor.c
src/fs/fs_api.h
src/testbed/testbed_api.h
src/testbed/testbed_api_operations.h
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 67b35365d..a1ffbdb5c 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -954,7 +954,7 @@ test_transport_api_tcp_LDADD = \
libgnunettransporttesting.la
test_transport_api2_tcp_SOURCES = \
- test_transport_api.c
+ test_transport_api2.c
test_transport_api2_tcp_LDADD = \
libgnunettransport.la \
$(top_builddir)/src/hello/libgnunethello.la \
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 9c37f15e2..7e1953663 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -2693,12 +2693,12 @@ static struct GNUNET_CONTAINER_MultiShortmap *dvlearn_map;
/**
* Head of a DLL sorted by launch time.
*/
-static struct LearnLaunchEntry *lle_head;
+static struct LearnLaunchEntry *lle_head = NULL;
/**
* Tail of a DLL sorted by launch time.
*/
-static struct LearnLaunchEntry *lle_tail;
+static struct LearnLaunchEntry *lle_tail = NULL;
/**
* MIN Heap sorted by "next_challenge" to `struct ValidationState` entries
@@ -3497,13 +3497,17 @@ check_link_down (void *cls)
vl->visibility_task = NULL;
dvh_timeout = GNUNET_TIME_UNIT_ZERO_ABS;
- for (struct DistanceVectorHop *pos = dv->dv_head; NULL != pos;
- pos = pos->next_dv)
- dvh_timeout = GNUNET_TIME_absolute_max (dvh_timeout, pos->path_valid_until);
- if (0 == GNUNET_TIME_absolute_get_remaining (dvh_timeout).rel_value_us)
+ if (NULL != dv)
{
- vl->dv->vl = NULL;
- vl->dv = NULL;
+ for (struct DistanceVectorHop *pos = dv->dv_head; NULL != pos;
+ pos = pos->next_dv)
+ dvh_timeout = GNUNET_TIME_absolute_max (dvh_timeout,
+ pos->path_valid_until);
+ if (0 == GNUNET_TIME_absolute_get_remaining (dvh_timeout).rel_value_us)
+ {
+ vl->dv->vl = NULL;
+ vl->dv = NULL;
+ }
}
q_timeout = GNUNET_TIME_UNIT_ZERO_ABS;
for (struct Queue *q = n->queue_head; NULL != q; q = q->next_neighbour)
@@ -4702,6 +4706,24 @@ route_control_message_without_fc (const struct GNUNET_PeerIdentity *target,
}
+static void
+consider_sending_fc (void *cls);
+
+/**
+ * Something changed on the virtual link with respect to flow
+ * control. Consider retransmitting the FC window size.
+ *
+ * @param cls a `struct VirtualLink` to work with
+ */
+static void
+task_consider_sending_fc (void *cls)
+{
+ struct VirtualLink *vl = cls;
+ vl->fc_retransmit_task = NULL;
+ consider_sending_fc (cls);
+}
+
+
/**
* Something changed on the virtual link with respect to flow
* control. Consider retransmitting the FC window size.
@@ -4759,7 +4781,7 @@ consider_sending_fc (void *cls)
if (NULL != vl->fc_retransmit_task)
GNUNET_SCHEDULER_cancel (vl->fc_retransmit_task);
vl->fc_retransmit_task =
- GNUNET_SCHEDULER_add_delayed (rtt, &consider_sending_fc, vl);
+ GNUNET_SCHEDULER_add_delayed (rtt, &task_consider_sending_fc, vl);
}
@@ -7637,7 +7659,7 @@ start_address_validation (const struct GNUNET_PeerIdentity *pid,
validation_map,
&vs->pid,
vs,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
update_next_challenge_time (vs, now);
}
@@ -7674,6 +7696,8 @@ handle_hello_for_incoming (void *cls,
}
+
+
/**
* Communicator gave us a transport address validation challenge. Process the
* request.
@@ -7730,13 +7754,23 @@ handle_validation_challenge (
&tvp,
&tvr.signature);
}
- route_control_message_without_fc (&cmc->im.sender,
- &tvr.header,
- RMO_ANYTHING_GOES | RMO_REDUNDANT);
sender = cmc->im.sender;
- finish_cmc_handling (cmc);
vl = lookup_virtual_link (&sender);
if (NULL != vl)
+ {
+ route_control_message_without_fc (&cmc->im.sender,
+ &tvr.header,
+ RMO_ANYTHING_GOES | RMO_REDUNDANT);
+ } else {
+ /* Use route via neighbour */
+ n = lookup_neighbour (&sender);
+ if (NULL != n)
+ for (struct Queue *q = n->queue_head; NULL != q; q = q->next_neighbour)
+ queue_send_msg (q, NULL, &tvr, sizeof(tvr));
+ }
+
+ finish_cmc_handling (cmc);
+ if (NULL != vl)
return;
/* For us, the link is still down, but we need bi-directional
@@ -8149,41 +8183,41 @@ demultiplex_with_cmc (struct CommunicatorMessageContext *cmc,
{ GNUNET_MQ_hd_var_size (fragment_box,
GNUNET_MESSAGE_TYPE_TRANSPORT_FRAGMENT,
struct TransportFragmentBoxMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_var_size (reliability_box,
GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_BOX,
struct TransportReliabilityBoxMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_var_size (reliability_ack,
GNUNET_MESSAGE_TYPE_TRANSPORT_RELIABILITY_ACK,
struct TransportReliabilityAckMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_var_size (backchannel_encapsulation,
GNUNET_MESSAGE_TYPE_TRANSPORT_BACKCHANNEL_ENCAPSULATION,
struct TransportBackchannelEncapsulationMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_var_size (dv_learn,
GNUNET_MESSAGE_TYPE_TRANSPORT_DV_LEARN,
struct TransportDVLearnMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_var_size (dv_box,
GNUNET_MESSAGE_TYPE_TRANSPORT_DV_BOX,
struct TransportDVBoxMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_fixed_size (
validation_challenge,
GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_CHALLENGE,
struct TransportValidationChallengeMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_fixed_size (flow_control,
GNUNET_MESSAGE_TYPE_TRANSPORT_FLOW_CONTROL,
struct TransportFlowControlMessage,
- &cmc),
+ cmc),
GNUNET_MQ_hd_fixed_size (
validation_response,
GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_VALIDATION_RESPONSE,
struct TransportValidationResponseMessage,
- &cmc),
+ cmc),
GNUNET_MQ_handler_end () };
int ret;
@@ -8202,7 +8236,7 @@ demultiplex_with_cmc (struct CommunicatorMessageContext *cmc,
if (GNUNET_NO == ret)
{
/* unencapsulated 'raw' message */
- handle_raw_message (&cmc, msg);
+ handle_raw_message (cmc, msg);
}
}
@@ -8949,20 +8983,30 @@ handle_send_message_ack (void *cls,
/* find our queue entry matching the ACK */
qe = NULL;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Looking for queue for PID %s\n",
+ GNUNET_i2s (&sma->receiver));
for (struct Queue *queue = tc->details.communicator.queue_head; NULL != queue;
queue = queue->next_client)
{
if (0 != GNUNET_memcmp (&queue->neighbour->pid, &sma->receiver))
continue;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Found PID %s\n",
+ GNUNET_i2s (&queue->neighbour->pid));
+
+
for (struct QueueEntry *qep = queue->queue_head; NULL != qep;
qep = qep->next)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "QueueEntry MID: %lu, Ack MID: %lu\n",
+ qep->mid, sma->mid);
if (qep->mid != sma->mid)
continue;
qe = qep;
break;
}
- break;
}
if (NULL == qe)
{
@@ -9333,6 +9377,7 @@ start_dv_learn (void *cls)
return; /* lost all connectivity, cannot do learning */
qqc.quality_count = 0;
qqc.num_queues = 0;
+ qqc.k = GNUNET_CONTAINER_multipeermap_size (neighbours);
GNUNET_CONTAINER_multipeermap_iterate (neighbours,
&check_connection_quality,
&qqc);
@@ -9352,7 +9397,7 @@ start_dv_learn (void *cls)
return;
}
/* remove old entries in #dvlearn_map if it has grown too big */
- while (MAX_DV_LEARN_PENDING >=
+ while (MAX_DV_LEARN_PENDING <=
GNUNET_CONTAINER_multishortmap_size (dvlearn_map))
{
lle = lle_tail;
diff --git a/src/transport/test_transport_api2_tcp_peer1.conf b/src/transport/test_transport_api2_tcp_peer1.conf
index 5b5fcb55b..36e00c00f 100644
--- a/src/transport/test_transport_api2_tcp_peer1.conf
+++ b/src/transport/test_transport_api2_tcp_peer1.conf
@@ -5,6 +5,7 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/
[transport]
BINARY = gnunet-service-tng
PLUGINS = tcp
+PREFIX = valgrind --log-file=/tmp/vg_peer1-%p
[communicator-tcp]
BINARY = gnunet-communicator-tcp
diff --git a/src/transport/test_transport_api2_tcp_peer2.conf b/src/transport/test_transport_api2_tcp_peer2.conf
index 42d7c7b7e..f4de8df8b 100644
--- a/src/transport/test_transport_api2_tcp_peer2.conf
+++ b/src/transport/test_transport_api2_tcp_peer2.conf
@@ -4,6 +4,7 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
[transport]
BINARY = gnunet-service-tng
+PREFIX = valgrind --log-file=/tmp/vg_peer2-%p
[communicator-tcp]
BINARY = gnunet-communicator-tcp
diff --git a/src/transport/test_transport_api_tcp_peer1.conf b/src/transport/test_transport_api_tcp_peer1.conf
index eabd6b701..1a46cf227 100644
--- a/src/transport/test_transport_api_tcp_peer1.conf
+++ b/src/transport/test_transport_api_tcp_peer1.conf
@@ -4,6 +4,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p1/
[transport]
PLUGINS = tcp
+PREFIX = valgrind --log-file=/tmp/vg_peer1
+START_ON_DEMAND = NO
#[transport]
#PREFIX = valgrind
diff --git a/src/transport/test_transport_api_tcp_peer2.conf b/src/transport/test_transport_api_tcp_peer2.conf
index 58ce0777f..934fe460f 100644
--- a/src/transport/test_transport_api_tcp_peer2.conf
+++ b/src/transport/test_transport_api_tcp_peer2.conf
@@ -4,6 +4,8 @@ GNUNET_TEST_HOME = $GNUNET_TMP/test-transport/api-tcp-p2/
[transport]
PLUGINS = tcp
+PREFIX = valgrind --log-file=/tmp/vg_peer2
+START_ON_DEMAND = NO
#[transport]
#PREFIX = valgrind
diff --git a/src/transport/transport-testing2.c b/src/transport/transport-testing2.c
index d9f1d5e56..23173e763 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -536,7 +536,7 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
p->ah = GNUNET_TRANSPORT_application_init (p->cfg);
GNUNET_assert (NULL != p->ah);
// FIXME Error handleing
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
retrieve_hello,
p);
//GNUNET_assert (NULL != p->pic);
diff --git a/src/util/time.c b/src/util/time.c
index 9e41305f1..c1ad5e618 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -779,7 +779,7 @@ GNUNET_TIME_year_to_time (unsigned int year)
/**
* Randomized exponential back-off, starting at 1 ms
- * and going up by a factor of 2+r, where 0 <= r <= 0.5, up
+ * and going up by a factor of 2+r, where 0 <= r < 0.5, up
* to a maximum of the given threshold.
*
* @param r current backoff time, initially zero
@@ -809,7 +809,7 @@ GNUNET_TIME_randomized_backoff (struct GNUNET_TIME_Relative rt,
struct GNUNET_TIME_Relative
GNUNET_TIME_randomize (struct GNUNET_TIME_Relative r)
{
- double d = ((rand () % 1001) - 500) / 1000.0;
+ double d = ((rand () % 1001) + 500) / 1000.0;
return relative_multiply_double (r, d);
}