summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/uncrustify.cfg17
-rw-r--r--src/abd/abd.h2
-rw-r--r--src/abd/abd_api.c90
-rw-r--r--src/abd/abd_serialization.c40
-rw-r--r--src/abd/abd_serialization.h14
-rw-r--r--src/abd/delegate_misc.c2
-rw-r--r--src/abd/delegate_misc.h2
-rw-r--r--src/abd/gnunet-abd.c268
-rw-r--r--src/abd/gnunet-service-abd.c170
-rw-r--r--src/abd/plugin_gnsrecord_abd.c1
-rw-r--r--src/abe/abe.c14
-rw-r--r--src/abe/test_cpabe.c1
-rw-r--r--src/arm/arm_api.c9
-rw-r--r--src/arm/gnunet-arm.c1
-rw-r--r--src/arm/gnunet-service-arm.c6
-rw-r--r--src/arm/mockup-service.c3
-rw-r--r--src/arm/test_arm_api.c4
-rw-r--r--src/arm/test_exponential_backoff.c1
-rw-r--r--src/arm/test_gnunet_service_arm.c1
-rw-r--r--src/ats-tests/ats-testing-experiment.c9
-rw-r--r--src/ats-tests/ats-testing-log.c6
-rw-r--r--src/ats-tests/ats-testing-preferences.c1
-rw-r--r--src/ats-tests/ats-testing-traffic.c1
-rw-r--r--src/ats-tests/ats-testing.c1
-rw-r--r--src/ats-tests/gnunet-ats-sim.c11
-rw-r--r--src/ats-tests/gnunet-solver-eval.c25
-rw-r--r--src/ats-tests/perf_ats.c3
-rw-r--r--src/ats-tests/perf_ats_logging.c5
-rw-r--r--src/ats-tool/gnunet-ats.c1
-rw-r--r--src/ats/ats.h2
-rw-r--r--src/ats/ats_api_performance.c1
-rw-r--r--src/ats/gnunet-ats-solver-eval.c40
-rw-r--r--src/ats/gnunet-service-ats.c1
-rw-r--r--src/ats/gnunet-service-ats_addresses.c1
-rw-r--r--src/ats/gnunet-service-ats_performance.c1
-rw-r--r--src/ats/gnunet-service-ats_reservations.c1
-rw-r--r--src/ats/perf_ats_solver.c4
-rw-r--r--src/ats/plugin_ats_proportional.c3
-rw-r--r--src/ats/test_ats_api.c50
-rw-r--r--src/ats/test_ats_lib.c2
-rw-r--r--src/ats/test_ats_reservation_api.c22
-rw-r--r--src/auction/gnunet-auction-info.c1
-rw-r--r--src/auction/gnunet-auction-join.c1
-rw-r--r--src/auction/test_auction_api.c2
-rw-r--r--src/block/block.c1
-rw-r--r--src/block/plugin_block_template.c1
-rw-r--r--src/block/plugin_block_test.c1
-rw-r--r--src/cadet/cadet_api.c1
-rw-r--r--src/cadet/cadet_api_get_channel.c1
-rw-r--r--src/cadet/cadet_api_list_peers.c1
-rw-r--r--src/cadet/cadet_test_lib.c1
-rw-r--r--src/cadet/gnunet-cadet-profiler.c11
-rw-r--r--src/cadet/gnunet-cadet.c4
-rw-r--r--src/cadet/gnunet-service-cadet.c4
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c6
-rw-r--r--src/cadet/gnunet-service-cadet_channel.h1
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c1
-rw-r--r--src/cadet/gnunet-service-cadet_core.c1
-rw-r--r--src/cadet/gnunet-service-cadet_dht.c1
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c1
-rw-r--r--src/cadet/gnunet-service-cadet_paths.c1
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c3
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.c8
-rw-r--r--src/cadet/test_cadet.c37
-rw-r--r--src/cadet/test_cadet_flow.c15
-rw-r--r--src/cadet/test_cadet_local_mq.c3
-rw-r--r--src/consensus/consensus_api.c2
-rw-r--r--src/consensus/gnunet-service-consensus.c27
-rw-r--r--src/consensus/plugin_block_consensus.c1
-rw-r--r--src/consensus/test_consensus_api.c2
-rw-r--r--src/conversation/conversation_api.c2
-rw-r--r--src/conversation/gnunet-conversation-test.c1
-rw-r--r--src/conversation/gnunet-conversation.c4
-rw-r--r--src/conversation/gnunet-helper-audio-playback.c21
-rw-r--r--src/conversation/gnunet-helper-audio-record-gst.c3
-rw-r--r--src/conversation/gnunet-helper-audio-record.c1
-rw-r--r--src/conversation/gnunet_gst.c35
-rw-r--r--src/conversation/gnunet_gst_def.h3
-rw-r--r--src/conversation/gnunet_gst_test.c8
-rw-r--r--src/conversation/microphone.c1
-rw-r--r--src/conversation/plugin_gnsrecord_conversation.c1
-rw-r--r--src/conversation/speaker.c1
-rw-r--r--src/conversation/test_conversation_api.c1
-rw-r--r--src/conversation/test_conversation_api_reject.c1
-rw-r--r--src/conversation/test_conversation_api_twocalls.c1
-rw-r--r--src/core/gnunet-core.c1
-rw-r--r--src/core/gnunet-service-core.c6
-rw-r--r--src/core/gnunet-service-core_sessions.c1
-rw-r--r--src/core/gnunet-service-core_typemap.c1
-rw-r--r--src/core/test_core_api.c1
-rw-r--r--src/core/test_core_api_reliability.c1
-rw-r--r--src/core/test_core_api_send_to_self.c1
-rw-r--r--src/core/test_core_api_start_only.c1
-rw-r--r--src/core/test_core_quota_compliance.c1
-rw-r--r--src/curl/curl.c4
-rw-r--r--src/curl/curl_reschedule.c1
-rw-r--r--src/datacache/perf_datacache.c1
-rw-r--r--src/datacache/plugin_datacache_heap.c2
-rw-r--r--src/datacache/plugin_datacache_postgres.c1
-rw-r--r--src/datacache/plugin_datacache_template.c1
-rw-r--r--src/datacache/test_datacache.c1
-rw-r--r--src/datacache/test_datacache_quota.c1
-rw-r--r--src/datastore/datastore.h1
-rw-r--r--src/datastore/datastore_api.c1
-rw-r--r--src/datastore/gnunet-datastore.c3
-rw-r--r--src/datastore/gnunet-service-datastore.c3
-rw-r--r--src/datastore/perf_datastore_api.c1
-rw-r--r--src/datastore/perf_plugin_datastore.c2
-rw-r--r--src/datastore/plugin_datastore_heap.c2
-rw-r--r--src/datastore/plugin_datastore_mysql.c2
-rw-r--r--src/datastore/plugin_datastore_postgres.c4
-rw-r--r--src/datastore/plugin_datastore_sqlite.c4
-rw-r--r--src/datastore/plugin_datastore_template.c2
-rw-r--r--src/datastore/test_datastore_api.c1
-rw-r--r--src/datastore/test_datastore_api_management.c1
-rw-r--r--src/datastore/test_plugin_datastore.c6
-rw-r--r--src/dht/dht.h1
-rw-r--r--src/dht/dht_test_lib.c1
-rw-r--r--src/dht/gnunet-dht-get.c1
-rw-r--r--src/dht/gnunet-dht-monitor.c2
-rw-r--r--src/dht/gnunet-dht-put.c2
-rw-r--r--src/dht/gnunet-service-dht.c2
-rw-r--r--src/dht/gnunet-service-dht.h1
-rw-r--r--src/dht/gnunet-service-dht_clients.c5
-rw-r--r--src/dht/gnunet-service-dht_hello.c1
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c7
-rw-r--r--src/dht/gnunet-service-dht_neighbours.h1
-rw-r--r--src/dht/gnunet-service-dht_nse.c1
-rw-r--r--src/dht/gnunet-service-dht_routing.c1
-rw-r--r--src/dht/plugin_block_dht.c1
-rw-r--r--src/dht/test_dht_api.c1
-rw-r--r--src/dht/test_dht_topo.c1
-rw-r--r--src/dns/dns_api.c2
-rw-r--r--src/dns/gnunet-helper-dns.c1
-rw-r--r--src/dns/gnunet-service-dns.c2
-rw-r--r--src/dns/plugin_block_dns.c1
-rw-r--r--src/exit/gnunet-daemon-exit.c7
-rw-r--r--src/exit/gnunet-helper-exit.c1
-rw-r--r--src/fragmentation/defragmentation.c1
-rw-r--r--src/fs/fs_api.h3
-rw-r--r--src/fs/fs_directory.c1
-rw-r--r--src/fs/fs_download.c5
-rw-r--r--src/fs/fs_file_information.c1
-rw-r--r--src/fs/fs_getopt.c3
-rw-r--r--src/fs/fs_publish_ublock.c1
-rw-r--r--src/fs/fs_search.c1
-rw-r--r--src/fs/fs_sharetree.c1
-rw-r--r--src/fs/fs_test_lib.h1
-rw-r--r--src/fs/fs_tree.c1
-rw-r--r--src/fs/fs_unindex.c1
-rw-r--r--src/fs/fs_uri.c8
-rw-r--r--src/fs/gnunet-auto-share.c1
-rw-r--r--src/fs/gnunet-daemon-fsprofiler.c1
-rw-r--r--src/fs/gnunet-directory.c2
-rw-r--r--src/fs/gnunet-download.c1
-rw-r--r--src/fs/gnunet-fs-profiler.c1
-rw-r--r--src/fs/gnunet-fs.c2
-rw-r--r--src/fs/gnunet-helper-fs-publish.c3
-rw-r--r--src/fs/gnunet-publish.c1
-rw-r--r--src/fs/gnunet-search.c1
-rw-r--r--src/fs/gnunet-service-fs.c4
-rw-r--r--src/fs/gnunet-service-fs_cadet_server.c5
-rw-r--r--src/fs/gnunet-service-fs_cp.h1
-rw-r--r--src/fs/gnunet-service-fs_indexing.c1
-rw-r--r--src/fs/gnunet-service-fs_pe.c4
-rw-r--r--src/fs/gnunet-service-fs_pr.c1
-rw-r--r--src/fs/gnunet-service-fs_pr.h1
-rw-r--r--src/fs/gnunet-service-fs_push.c1
-rw-r--r--src/fs/gnunet-service-fs_put.c1
-rw-r--r--src/fs/gnunet-unindex.c2
-rw-r--r--src/fs/perf_gnunet_service_fs_p2p.c1
-rw-r--r--src/fs/perf_gnunet_service_fs_p2p_respect.c2
-rw-r--r--src/fs/plugin_block_fs.c1
-rw-r--r--src/fs/test_fs.c3
-rw-r--r--src/fs/test_fs_directory.c2
-rw-r--r--src/fs/test_fs_download.c1
-rw-r--r--src/fs/test_fs_download_persistence.c1
-rw-r--r--src/fs/test_fs_file_information.c1
-rw-r--r--src/fs/test_fs_list_indexed.c1
-rw-r--r--src/fs/test_fs_publish.c1
-rw-r--r--src/fs/test_fs_publish_persistence.c1
-rw-r--r--src/fs/test_fs_search.c1
-rw-r--r--src/fs/test_fs_search_persistence.c1
-rw-r--r--src/fs/test_fs_search_probes.c1
-rw-r--r--src/fs/test_fs_search_with_and.c1
-rw-r--r--src/fs/test_fs_start_stop.c1
-rw-r--r--src/fs/test_fs_test_lib.c1
-rw-r--r--src/fs/test_fs_unindex.c1
-rw-r--r--src/fs/test_fs_unindex_persistence.c1
-rw-r--r--src/fs/test_fs_uri.c1
-rw-r--r--src/fs/test_gnunet_service_fs_migration.c1
-rw-r--r--src/fs/test_gnunet_service_fs_p2p.c1
-rw-r--r--src/fs/test_plugin_block_fs.c1
-rw-r--r--src/gns/gns_tld_api.c1
-rw-r--r--src/gns/gnunet-dns2gns.c2
-rw-r--r--src/gns/gnunet-gns-benchmark.c1
-rw-r--r--src/gns/gnunet-gns-import.c13
-rw-r--r--src/gns/gnunet-gns-proxy.c9
-rw-r--r--src/gns/gnunet-gns.c3
-rw-r--r--src/gns/gnunet-service-gns_interceptor.c1
-rw-r--r--src/gns/gnunet-service-gns_resolver.c1
-rw-r--r--src/gns/nss/nss_gns_query.c1
-rw-r--r--src/gns/plugin_block_gns.c1
-rw-r--r--src/gns/plugin_gnsrecord_gns.c1
-rw-r--r--src/gns/plugin_rest_gns.c1
-rw-r--r--src/gns/test_gns_proxy.c5
-rw-r--r--src/gnsrecord/gnsrecord.c1
-rw-r--r--src/gnsrecord/gnsrecord_crypto.c1
-rw-r--r--src/gnsrecord/gnsrecord_serialization.c3
-rw-r--r--src/gnsrecord/perf_gnsrecord_crypto.c1
-rw-r--r--src/gnsrecord/plugin_gnsrecord_dns.c1
-rw-r--r--src/gnsrecord/test_gnsrecord_block_expiration.c2
-rw-r--r--src/gnsrecord/test_gnsrecord_crypto.c2
-rw-r--r--src/gnsrecord/test_gnsrecord_serialization.c1
-rw-r--r--src/hello/gnunet-hello.c1
-rw-r--r--src/hello/hello.c1
-rw-r--r--src/hello/test_hello.c1
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c1
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_client.c1
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_server.c1
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c1
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_learning.c1
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c1
-rw-r--r--src/identity/gnunet-identity.c1
-rw-r--r--src/identity/gnunet-service-identity.c8
-rw-r--r--src/identity/identity_api.c1
-rw-r--r--src/identity/plugin_rest_identity.c16
-rw-r--r--src/include/block_fs.h1
-rw-r--r--src/include/compat.h1
-rw-r--r--src/include/gnunet_abd_service.h125
-rw-r--r--src/include/gnunet_abe_lib.h1
-rw-r--r--src/include/gnunet_ats_service.h3
-rw-r--r--src/include/gnunet_bio_lib.h3
-rw-r--r--src/include/gnunet_block_plugin.h1
-rw-r--r--src/include/gnunet_common.h1
-rw-r--r--src/include/gnunet_configuration_lib.h1
-rw-r--r--src/include/gnunet_consensus_service.h2
-rw-r--r--src/include/gnunet_constants.h3
-rw-r--r--src/include/gnunet_datastore_service.h1
-rw-r--r--src/include/gnunet_dht_service.h2
-rw-r--r--src/include/gnunet_dns_service.h1
-rw-r--r--src/include/gnunet_dnsparser_lib.h1
-rw-r--r--src/include/gnunet_fragmentation_lib.h1
-rw-r--r--src/include/gnunet_fs_service.h4
-rw-r--r--src/include/gnunet_my_lib.h2
-rw-r--r--src/include/gnunet_namecache_service.h1
-rw-r--r--src/include/gnunet_nat_service.h2
-rw-r--r--src/include/gnunet_os_lib.h1
-rw-r--r--src/include/gnunet_rps_service.h1
-rw-r--r--src/include/gnunet_scheduler_lib.h4
-rw-r--r--src/include/gnunet_secretsharing_service.h1
-rw-r--r--src/include/gnunet_service_lib.h1
-rw-r--r--src/include/gnunet_set_service.h2
-rw-r--r--src/include/gnunet_sq_lib.h4
-rw-r--r--src/include/gnunet_statistics_service.h1
-rw-r--r--src/include/gnunet_strings_lib.h1
-rw-r--r--src/include/gnunet_testbed_service.h3
-rw-r--r--src/include/gnunet_testing_lib.h1
-rw-r--r--src/include/gnunet_time_lib.h2
-rw-r--r--src/include/platform.h1
-rw-r--r--src/json/json_generator.c1
-rw-r--r--src/json/json_mhd.c1
-rw-r--r--src/json/test_json.c1
-rw-r--r--src/json/test_json_mhd.c1
-rw-r--r--src/namecache/gnunet-namecache.c1
-rw-r--r--src/namecache/plugin_namecache_flat.c5
-rw-r--r--src/namecache/plugin_namecache_postgres.c1
-rw-r--r--src/namecache/plugin_namecache_sqlite.c1
-rw-r--r--src/namecache/test_namecache_api_cache_block.c1
-rw-r--r--src/namecache/test_plugin_namecache.c1
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c3
-rw-r--r--src/namestore/gnunet-namestore.c1
-rw-r--r--src/namestore/gnunet-zoneimport.c1
-rw-r--r--src/namestore/namestore.h2
-rw-r--r--src/namestore/namestore_api_monitor.c1
-rw-r--r--src/namestore/plugin_namestore_flat.c1
-rw-r--r--src/namestore/plugin_namestore_postgres.c1
-rw-r--r--src/namestore/plugin_namestore_sqlite.c1
-rw-r--r--src/namestore/plugin_rest_namestore.c1
-rw-r--r--src/namestore/test_namestore_api_lookup_nick.c1
-rw-r--r--src/namestore/test_namestore_api_monitoring.c1
-rw-r--r--src/namestore/test_namestore_api_remove.c1
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c1
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c1
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c1
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c1
-rw-r--r--src/namestore/test_plugin_namestore.c1
-rw-r--r--src/nat-auto/gnunet-nat-auto_legacy.c1
-rw-r--r--src/nat-auto/gnunet-nat-server.c3
-rw-r--r--src/nat-auto/gnunet-service-nat-auto.c2
-rw-r--r--src/nat-auto/nat-auto.h1
-rw-r--r--src/nat-auto/nat_auto_api.c2
-rw-r--r--src/nat-auto/nat_auto_api_test.c1
-rw-r--r--src/nat/gnunet-helper-nat-client.c1
-rw-r--r--src/nat/gnunet-service-nat.c5
-rw-r--r--src/nat/gnunet-service-nat_externalip.c1
-rw-r--r--src/nat/gnunet-service-nat_mini.c6
-rw-r--r--src/nat/gnunet-service-nat_stun.c1
-rw-r--r--src/nat/nat.h1
-rw-r--r--src/nat/test_nat.c1
-rw-r--r--src/nat/test_nat_mini.c2
-rw-r--r--src/nat/test_nat_test.c1
-rw-r--r--src/nat/test_stun.c2
-rw-r--r--src/nse/gnunet-nse-profiler.c1
-rw-r--r--src/nse/gnunet-service-nse.c11
-rw-r--r--src/nse/nse_api.c1
-rw-r--r--src/nse/perf_kdf.c2
-rw-r--r--src/nse/test_nse_api.c2
-rw-r--r--src/nse/test_nse_multipeer.c1
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c2
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo_plugins.c1
-rw-r--r--src/peerinfo-tool/plugin_rest_peerinfo.c3
-rw-r--r--src/peerinfo/peerinfo.h1
-rw-r--r--src/peerinfo/peerinfo_api.c1
-rw-r--r--src/peerinfo/peerinfo_api_notify.c1
-rw-r--r--src/peerinfo/perf_peerinfo_api.c1
-rw-r--r--src/peerinfo/test_peerinfo_api.c2
-rw-r--r--src/peerinfo/test_peerinfo_api_friend_only.c1
-rw-r--r--src/peerinfo/test_peerinfo_api_notify_friend_only.c3
-rw-r--r--src/peerinfo/test_peerinfo_shipped_hellos.c1
-rw-r--r--src/peerstore/gnunet-peerstore.c1
-rw-r--r--src/peerstore/peerstore_api.c1
-rw-r--r--src/peerstore/perf_peerstore_store.c1
-rw-r--r--src/peerstore/plugin_peerstore_flat.c6
-rw-r--r--src/peerstore/plugin_peerstore_sqlite.c1
-rw-r--r--src/peerstore/test_peerstore_api_iterate.c1
-rw-r--r--src/peerstore/test_peerstore_api_store.c1
-rw-r--r--src/peerstore/test_peerstore_api_sync.c7
-rw-r--r--src/peerstore/test_peerstore_api_watch.c1
-rw-r--r--src/peerstore/test_plugin_peerstore.c1
-rw-r--r--src/pq/pq_connect.c1
-rw-r--r--src/pt/gnunet-daemon-pt.c4
-rw-r--r--src/pt/test_gns_vpn.c3
-rw-r--r--src/pt/test_gnunet_vpn.c1
-rw-r--r--src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c1
-rw-r--r--src/reclaim-attribute/reclaim_attribute.c1
-rw-r--r--src/reclaim/gnunet-reclaim.c12
-rw-r--r--src/reclaim/gnunet-service-reclaim.c4
-rw-r--r--src/reclaim/gnunet-service-reclaim_tickets.c4
-rw-r--r--src/reclaim/json_reclaim.c6
-rw-r--r--src/reclaim/oidc_helper.c11
-rw-r--r--src/reclaim/oidc_helper.h1
-rw-r--r--src/reclaim/plugin_gnsrecord_reclaim.c1
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c20
-rw-r--r--src/reclaim/plugin_rest_reclaim.c10
-rw-r--r--src/reclaim/reclaim_api.c2
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c10
-rw-r--r--src/regex/gnunet-regex-profiler.c7
-rw-r--r--src/regex/gnunet-regex-simulation-profiler.c7
-rw-r--r--src/regex/perf-regex.c1
-rw-r--r--src/regex/plugin_block_regex.c1
-rw-r--r--src/regex/regex_api_announce.c2
-rw-r--r--src/regex/regex_block_lib.c2
-rw-r--r--src/regex/regex_internal.c62
-rw-r--r--src/regex/regex_internal.h1
-rw-r--r--src/regex/regex_internal_lib.h1
-rw-r--r--src/regex/regex_test_graph.c2
-rw-r--r--src/regex/regex_test_lib.c15
-rw-r--r--src/regex/regex_test_lib.h1
-rw-r--r--src/regex/regex_test_random.c4
-rw-r--r--src/regex/test_regex_api.c1
-rw-r--r--src/regex/test_regex_eval_api.c18
-rw-r--r--src/regex/test_regex_integration.c1
-rw-r--r--src/rest/gnunet-rest-server.c6
-rw-r--r--src/rest/plugin_rest_config.c6
-rw-r--r--src/rest/plugin_rest_copying.c2
-rw-r--r--src/rest/rest.c3
-rw-r--r--src/revocation/gnunet-revocation.c1
-rw-r--r--src/revocation/gnunet-service-revocation.c1
-rw-r--r--src/revocation/plugin_block_revocation.c1
-rw-r--r--src/revocation/revocation.h1
-rw-r--r--src/revocation/test_revocation.c1
-rw-r--r--src/rps/gnunet-rps-profiler.c122
-rw-r--r--src/rps/gnunet-rps.c3
-rw-r--r--src/rps/gnunet-service-rps.c36
-rw-r--r--src/rps/gnunet-service-rps_custommap.c10
-rw-r--r--src/rps/gnunet-service-rps_sampler.c1
-rw-r--r--src/rps/gnunet-service-rps_sampler_elem.c2
-rw-r--r--src/rps/gnunet-service-rps_view.c1
-rw-r--r--src/rps/rps-sampler_common.c2
-rw-r--r--src/rps/rps-test_util.c16
-rw-r--r--src/rps/rps.h1
-rw-r--r--src/rps/rps_api.c6
-rw-r--r--src/rps/test_rps.c157
-rw-r--r--src/rps/test_rps_api.c1
-rw-r--r--src/rps/test_service_rps_custommap.c1
-rw-r--r--src/rps/test_service_rps_sampler_elem.c1
-rw-r--r--src/rps/test_service_rps_view.c1
-rw-r--r--src/scalarproduct/gnunet-scalarproduct.c1
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct.h1
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_alice.c1
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_bob.c3
-rw-r--r--src/scalarproduct/test_ecc_scalarproduct.c1
-rw-r--r--src/secretsharing/gnunet-secretsharing-profiler.c7
-rw-r--r--src/secretsharing/gnunet-service-secretsharing.c2
-rw-r--r--src/secretsharing/secretsharing.h1
-rw-r--r--src/secretsharing/secretsharing_api.c1
-rw-r--r--src/set/gnunet-service-set.c3
-rw-r--r--src/set/gnunet-service-set.h1
-rw-r--r--src/set/gnunet-service-set_union.c7
-rw-r--r--src/set/gnunet-service-set_union.h2
-rw-r--r--src/set/gnunet-set-profiler.c2
-rw-r--r--src/set/ibf.c1
-rw-r--r--src/set/ibf_sim.c4
-rw-r--r--src/set/plugin_block_set_test.c1
-rw-r--r--src/set/set_api.c1
-rw-r--r--src/sq/sq_exec.c2
-rw-r--r--src/sq/sq_prepare.c2
-rw-r--r--src/sq/sq_query_helper.c2
-rw-r--r--src/statistics/gnunet-service-statistics.c5
-rw-r--r--src/statistics/gnunet-statistics.c13
-rw-r--r--src/statistics/statistics_api.c4
-rw-r--r--src/statistics/test_statistics_api.c1
-rw-r--r--src/statistics/test_statistics_api_loop.c1
-rw-r--r--src/statistics/test_statistics_api_watch_zero_value.c1
-rw-r--r--src/template/gnunet-template.c1
-rw-r--r--src/template/test_template_api.c2
-rw-r--r--src/testbed-logger/testbed_logger_api.c1
-rw-r--r--src/testbed/gnunet-daemon-latency-logger.c1
-rw-r--r--src/testbed/gnunet-helper-testbed.c1
-rw-r--r--src/testbed/gnunet-service-test-barriers.c1
-rw-r--r--src/testbed/gnunet-service-testbed.c3
-rw-r--r--src/testbed/gnunet-service-testbed.h2
-rw-r--r--src/testbed/gnunet-service-testbed_barriers.c2
-rw-r--r--src/testbed/gnunet-service-testbed_cache.c1
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c7
-rw-r--r--src/testbed/gnunet-service-testbed_meminfo.c7
-rw-r--r--src/testbed/gnunet-service-testbed_oc.c3
-rw-r--r--src/testbed/gnunet-service-testbed_peers.c1
-rw-r--r--src/testbed/test_gnunet_helper_testbed.c1
-rw-r--r--src/testbed/test_testbed_api.c3
-rw-r--r--src/testbed/test_testbed_api_2peers_1controller.c2
-rw-r--r--src/testbed/test_testbed_api_3peers_3controllers.c1
-rw-r--r--src/testbed/test_testbed_api_controllerlink.c2
-rw-r--r--src/testbed/test_testbed_api_hosts.c1
-rw-r--r--src/testbed/test_testbed_api_operations.c1
-rw-r--r--src/testbed/test_testbed_api_sd.c1
-rw-r--r--src/testbed/test_testbed_api_test.c2
-rw-r--r--src/testbed/test_testbed_api_test_timeout.c1
-rw-r--r--src/testbed/test_testbed_api_testbed_run.c1
-rw-r--r--src/testbed/test_testbed_api_topology.c2
-rw-r--r--src/testbed/test_testbed_api_topology_clique.c2
-rw-r--r--src/testbed/test_testbed_underlay.c1
-rw-r--r--src/testbed/testbed_api.c3
-rw-r--r--src/testbed/testbed_api.h4
-rw-r--r--src/testbed/testbed_api_barriers.c2
-rw-r--r--src/testbed/testbed_api_hosts.c1
-rw-r--r--src/testbed/testbed_api_operations.c3
-rw-r--r--src/testbed/testbed_api_peers.c2
-rw-r--r--src/testbed/testbed_api_sd.c1
-rw-r--r--src/testbed/testbed_api_services.c1
-rw-r--r--src/testbed/testbed_api_test.c1
-rw-r--r--src/testbed/testbed_api_testbed.c1
-rw-r--r--src/testbed/testbed_api_topology.c2
-rw-r--r--src/testing/gnunet-testing.c1
-rw-r--r--src/testing/test_testing_peerstartup.c4
-rw-r--r--src/testing/test_testing_peerstartup2.c4
-rw-r--r--src/testing/test_testing_portreservation.c4
-rw-r--r--src/testing/test_testing_servicestartup.c4
-rw-r--r--src/testing/test_testing_sharedservices.c4
-rw-r--r--src/testing/testing.c3
-rw-r--r--src/topology/gnunet-daemon-topology.c8
-rw-r--r--src/topology/test_gnunet_daemon_topology.c8
-rw-r--r--src/transport/gnunet-communicator-tcp.c3
-rw-r--r--src/transport/gnunet-communicator-udp.c3
-rw-r--r--src/transport/gnunet-communicator-unix.c5
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c32
-rw-r--r--src/transport/gnunet-helper-transport-wlan.c30
-rw-r--r--src/transport/gnunet-service-tng.c15
-rw-r--r--src/transport/gnunet-service-transport.c4
-rw-r--r--src/transport/gnunet-service-transport.h3
-rw-r--r--src/transport/gnunet-service-transport_ats.c12
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c1
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c7
-rw-r--r--src/transport/gnunet-service-transport_validation.c6
-rw-r--r--src/transport/gnunet-transport-profiler.c1
-rw-r--r--src/transport/gnunet-transport-wlan-sender.c1
-rw-r--r--src/transport/gnunet-transport.c1
-rw-r--r--src/transport/ieee80211_radiotap.h1
-rw-r--r--src/transport/plugin_transport_http_client.c5
-rw-r--r--src/transport/plugin_transport_http_common.c3
-rw-r--r--src/transport/plugin_transport_http_server.c8
-rw-r--r--src/transport/plugin_transport_smtp.c14
-rw-r--r--src/transport/plugin_transport_tcp.c10
-rw-r--r--src/transport/plugin_transport_template.c6
-rw-r--r--src/transport/plugin_transport_udp.c7
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c12
-rw-r--r--src/transport/plugin_transport_unix.c1
-rw-r--r--src/transport/plugin_transport_wlan.c3
-rw-r--r--src/transport/plugin_transport_wlan.h1
-rw-r--r--src/transport/tcp_server_legacy.c1
-rw-r--r--src/transport/tcp_server_mst_legacy.c2
-rw-r--r--src/transport/test_communicator_unix.c1
-rw-r--r--src/transport/test_http_common.c1
-rw-r--r--src/transport/test_plugin_transport.c6
-rw-r--r--src/transport/test_transport_address_switch.c2
-rw-r--r--src/transport/test_transport_api.c1
-rw-r--r--src/transport/test_transport_api_disconnect.c1
-rw-r--r--src/transport/test_transport_api_limited_sockets.c2
-rw-r--r--src/transport/test_transport_api_manipulation_recv_tcp.c1
-rw-r--r--src/transport/test_transport_api_manipulation_send_tcp.c1
-rw-r--r--src/transport/test_transport_api_monitor_peers.c1
-rw-r--r--src/transport/test_transport_api_restart_reconnect.c1
-rw-r--r--src/transport/test_transport_api_timeout.c1
-rw-r--r--src/transport/test_transport_blacklisting.c4
-rw-r--r--src/transport/test_transport_testing_restart.c1
-rw-r--r--src/transport/test_transport_testing_startstop.c1
-rw-r--r--src/transport/transport-testing-loggers.c2
-rw-r--r--src/transport/transport-testing-main.c1
-rw-r--r--src/transport/transport-testing-send.c1
-rw-r--r--src/transport/transport-testing.c1
-rw-r--r--src/transport/transport_api2_monitor.c1
-rw-r--r--src/transport/transport_api_blacklist.c1
-rw-r--r--src/transport/transport_api_monitor_peers.c1
-rw-r--r--src/transport/transport_api_monitor_plugins.c1
-rw-r--r--src/util/client.c2
-rw-r--r--src/util/common_allocation.c2
-rw-r--r--src/util/common_logging.c16
-rw-r--r--src/util/configuration_loader.c1
-rw-r--r--src/util/container_bloomfilter.c10
-rw-r--r--src/util/container_meta_data.c1
-rw-r--r--src/util/crypto_abe.c14
-rw-r--r--src/util/crypto_crc.c1
-rw-r--r--src/util/crypto_ecc.c6
-rw-r--r--src/util/crypto_ecc_setup.c1
-rw-r--r--src/util/crypto_hash_file.c1
-rw-r--r--src/util/crypto_hkdf.c5
-rw-r--r--src/util/crypto_kdf.c5
-rw-r--r--src/util/crypto_mpi.c1
-rw-r--r--src/util/crypto_paillier.c4
-rw-r--r--src/util/crypto_random.c8
-rw-r--r--src/util/crypto_rsa.c3
-rw-r--r--src/util/crypto_symmetric.c1
-rw-r--r--src/util/disk.c10
-rw-r--r--src/util/getopt.c28
-rw-r--r--src/util/gnunet-config.c1
-rw-r--r--src/util/gnunet-ecc.c4
-rw-r--r--src/util/gnunet-resolver.c1
-rw-r--r--src/util/gnunet-scrypt.c1
-rw-r--r--src/util/gnunet-service-resolver.c7
-rw-r--r--src/util/gnunet-timeout.c1
-rw-r--r--src/util/gnunet-uri.c1
-rw-r--r--src/util/helper.c1
-rw-r--r--src/util/load.c4
-rw-r--r--src/util/mst.c1
-rw-r--r--src/util/nc.c1
-rw-r--r--src/util/network.c3
-rw-r--r--src/util/os_installation.c4
-rw-r--r--src/util/os_network.c4
-rw-r--r--src/util/os_priority.c1
-rw-r--r--src/util/peer.c1
-rw-r--r--src/util/perf_crypto_asymmetric.c1
-rw-r--r--src/util/perf_crypto_ecc_dlog.c1
-rw-r--r--src/util/perf_crypto_hash.c1
-rw-r--r--src/util/perf_crypto_paillier.c1
-rw-r--r--src/util/perf_crypto_rsa.c3
-rw-r--r--src/util/perf_crypto_symmetric.c1
-rw-r--r--src/util/perf_malloc.c1
-rw-r--r--src/util/program.c3
-rw-r--r--src/util/scheduler.c9
-rw-r--r--src/util/signal.c1
-rw-r--r--src/util/socks.c6
-rw-r--r--src/util/speedup.c1
-rw-r--r--src/util/strings.c11
-rw-r--r--src/util/test_bio.c14
-rw-r--r--src/util/test_client.c1
-rw-r--r--src/util/test_common_allocation.c1
-rw-r--r--src/util/test_common_endian.c1
-rw-r--r--src/util/test_common_logging.c2
-rw-r--r--src/util/test_common_logging_dummy.c3
-rw-r--r--src/util/test_common_logging_runtime_loglevels.c11
-rw-r--r--src/util/test_configuration.c5
-rw-r--r--src/util/test_container_bloomfilter.c2
-rw-r--r--src/util/test_container_dll.c1
-rw-r--r--src/util/test_container_heap.c3
-rw-r--r--src/util/test_container_multihashmap.c2
-rw-r--r--src/util/test_container_multihashmap32.c2
-rw-r--r--src/util/test_container_multipeermap.c2
-rw-r--r--src/util/test_crypto_ecc_dlog.c2
-rw-r--r--src/util/test_crypto_ecdhe.c1
-rw-r--r--src/util/test_crypto_ecdsa.c3
-rw-r--r--src/util/test_crypto_eddsa.c3
-rw-r--r--src/util/test_crypto_hash.c4
-rw-r--r--src/util/test_crypto_hash_context.c3
-rw-r--r--src/util/test_crypto_hkdf.c8
-rw-r--r--src/util/test_crypto_paillier.c1
-rw-r--r--src/util/test_crypto_random.c1
-rw-r--r--src/util/test_crypto_symmetric.c1
-rw-r--r--src/util/test_disk.c1
-rw-r--r--src/util/test_os_network.c1
-rw-r--r--src/util/test_os_start_process.c1
-rw-r--r--src/util/test_peer.c4
-rw-r--r--src/util/test_plugin.c1
-rw-r--r--src/util/test_plugin_plug.c2
-rw-r--r--src/util/test_program.c1
-rw-r--r--src/util/test_scheduler.c1
-rw-r--r--src/util/test_scheduler_delay.c1
-rw-r--r--src/util/test_service.c1
-rw-r--r--src/util/test_socks.c1
-rw-r--r--src/util/test_speedup.c1
-rw-r--r--src/util/test_tun.c6
-rw-r--r--src/util/time.c6
-rw-r--r--src/vpn/gnunet-service-vpn.c6
-rw-r--r--src/vpn/vpn_api.c1
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c3
605 files changed, 1921 insertions, 1049 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
index f56c8e732..8c9df2c43 100644
--- a/contrib/uncrustify.cfg
+++ b/contrib/uncrustify.cfg
@@ -49,8 +49,12 @@ nl_assign_brace=remove
# No extra newlines that cause noisy diffs
nl_start_of_file=remove
+nl_after_func_proto = 2
+nl_after_func_body = 3
# If there's no new line, it's not a text file!
nl_end_of_file=add
+nl_max_blank_in_func = 3
+nl_max = 3
sp_inside_paren = remove
@@ -69,6 +73,7 @@ sp_between_ptr_star = remove
sp_before_sparen = add
sp_inside_fparen = remove
+sp_inside_sparen = remove
# add space before function call and decl: "foo (x)"
sp_func_call_paren = add
@@ -76,3 +81,15 @@ sp_func_proto_paren = add
sp_func_proto_paren_empty = add
sp_func_def_paren = add
sp_func_def_paren_empty = add
+
+# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
+# so as uncrustify doesn't give exactly what we want => ignore
+sp_paren_paren = ignore
+sp_inside_paren = remove
+sp_bool = force
+
+nl_func_type_name = force
+#nl_branch_else = add
+nl_else_brace = add
+nl_elseif_brace = add
+nl_for_brace = add
diff --git a/src/abd/abd.h b/src/abd/abd.h
index 854814832..1e9d6bcea 100644
--- a/src/abd/abd.h
+++ b/src/abd/abd.h
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/abd/abd_api.c b/src/abd/abd_api.c
index cdc52df91..cc25d06da 100644
--- a/src/abd/abd_api.c
+++ b/src/abd/abd_api.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -192,6 +192,7 @@ mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
force_reconnect (handle);
}
+
/**
* Check validity of message received from the ABD service
*
@@ -201,7 +202,7 @@ mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
static int
check_result (void *cls, const struct DelegationChainResultMessage *vr_msg)
{
- //TODO
+ // TODO
return GNUNET_OK;
}
@@ -241,11 +242,11 @@ handle_result (void *cls, const struct DelegationChainResultMessage *vr_msg)
GNUNET_assert (
GNUNET_OK ==
GNUNET_ABD_delegation_chain_deserialize (mlen,
- (const char *) &vr_msg[1],
- d_count,
- d_chain,
- c_count,
- dels));
+ (const char *) &vr_msg[1],
+ d_count,
+ d_chain,
+ c_count,
+ dels));
if (GNUNET_NO == ntohl (vr_msg->del_found))
{
proc (proc_cls, 0, NULL, 0,
@@ -257,51 +258,55 @@ handle_result (void *cls, const struct DelegationChainResultMessage *vr_msg)
}
}
+
static int
-check_intermediate (void *cls, const struct DelegationChainIntermediateMessage *vr_msg)
+check_intermediate (void *cls, const struct
+ DelegationChainIntermediateMessage *vr_msg)
{
- //TODO
+ // TODO
return GNUNET_OK;
}
+
static void
-handle_intermediate (void *cls, const struct DelegationChainIntermediateMessage *vr_msg)
+handle_intermediate (void *cls, const struct
+ DelegationChainIntermediateMessage *vr_msg)
{
struct GNUNET_ABD_Handle *handle = cls;
uint32_t r_id = ntohl (vr_msg->id);
uint32_t size = ntohl (vr_msg->size);
- bool is_bw = ntohs(vr_msg->is_bw);
+ bool is_bw = ntohs (vr_msg->is_bw);
struct GNUNET_ABD_Request *vr;
GNUNET_ABD_IntermediateResultProcessor proc;
void *proc_cls;
struct GNUNET_ABD_Delegation *dd;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Received intermediate reply from ABD service\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Received intermediate reply from ABD service\n");
for (vr = handle->request_head; NULL != vr; vr = vr->next)
if (vr->r_id == r_id)
break;
if (NULL == vr)
return;
-
+
proc = vr->int_proc;
proc_cls = vr->proc2_cls;
-
+
dd = GNUNET_new (struct GNUNET_ABD_Delegation);
GNUNET_assert (
GNUNET_OK ==
GNUNET_ABD_delegation_chain_deserialize (size,
- (const char *) &vr_msg[1],
- 1,
- dd,
- 0,
- NULL));
+ (const char *) &vr_msg[1],
+ 1,
+ dd,
+ 0,
+ NULL));
proc (proc_cls, dd, is_bw);
}
-
/**
* Reconnect to ABD service.
*
@@ -311,19 +316,19 @@ static void
reconnect (struct GNUNET_ABD_Handle *handle)
{
struct GNUNET_MQ_MessageHandler handlers[] =
- {GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_ABD_VERIFY_RESULT,
- struct DelegationChainResultMessage,
- handle),
- GNUNET_MQ_hd_var_size (result,
- GNUNET_MESSAGE_TYPE_ABD_COLLECT_RESULT,
- struct DelegationChainResultMessage,
- handle),
- GNUNET_MQ_hd_var_size (intermediate,
- GNUNET_MESSAGE_TYPE_ABD_INTERMEDIATE_RESULT,
- struct DelegationChainIntermediateMessage,
- handle),
- GNUNET_MQ_handler_end ()};
+ {GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_ABD_VERIFY_RESULT,
+ struct DelegationChainResultMessage,
+ handle),
+ GNUNET_MQ_hd_var_size (result,
+ GNUNET_MESSAGE_TYPE_ABD_COLLECT_RESULT,
+ struct DelegationChainResultMessage,
+ handle),
+ GNUNET_MQ_hd_var_size (intermediate,
+ GNUNET_MESSAGE_TYPE_ABD_INTERMEDIATE_RESULT,
+ struct DelegationChainIntermediateMessage,
+ handle),
+ GNUNET_MQ_handler_end ()};
struct GNUNET_ABD_Request *vr;
GNUNET_assert (NULL == handle->mq);
@@ -404,7 +409,7 @@ GNUNET_ABD_request_cancel (struct GNUNET_ABD_Request *lr)
/**
* Performs attribute collection.
- * Collects all abds of subject to fulfill the
+ * Collects all abds of subject to fulfill the
* attribute, if possible
*
* @param handle handle to the Credential service
@@ -438,7 +443,7 @@ GNUNET_ABD_collect (
return NULL;
}
- //DEBUG LOG
+ // DEBUG LOG
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Trying to collect `%s' in ABD\n",
issuer_attribute);
@@ -469,6 +474,8 @@ GNUNET_ABD_collect (
GNUNET_MQ_send_copy (handle->mq, vr->env);
return vr;
}
+
+
/**
* Performs attribute verification.
* Checks if there is a delegation chain from
@@ -507,7 +514,7 @@ GNUNET_ABD_verify (
size_t nlen;
size_t clen;
- if (NULL == issuer_attribute || NULL == delegates)
+ if ((NULL == issuer_attribute) || (NULL == delegates))
{
GNUNET_break (0);
return NULL;
@@ -515,7 +522,7 @@ GNUNET_ABD_verify (
clen = GNUNET_ABD_delegates_get_size (delegate_count, delegates);
- //DEBUG LOG
+ // DEBUG LOG
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Trying to verify `%s' in ABD\n",
issuer_attribute);
@@ -543,14 +550,15 @@ GNUNET_ABD_verify (
GNUNET_memcpy (&v_msg[1], issuer_attribute, strlen (issuer_attribute));
GNUNET_ABD_delegates_serialize (delegate_count,
- delegates,
- clen,
- ((char *) &v_msg[1]) +
- strlen (issuer_attribute) + 1);
+ delegates,
+ clen,
+ ((char *) &v_msg[1])
+ + strlen (issuer_attribute) + 1);
GNUNET_CONTAINER_DLL_insert (handle->request_head, handle->request_tail, vr);
if (NULL != handle->mq)
GNUNET_MQ_send_copy (handle->mq, vr->env);
return vr;
}
+
/* end of abd_api.c */
diff --git a/src/abd/abd_serialization.c b/src/abd/abd_serialization.c
index d2bc15166..90a89886b 100644
--- a/src/abd/abd_serialization.c
+++ b/src/abd/abd_serialization.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -21,7 +21,7 @@
/**
* @file abd/abd_serialization.c
- * @brief API to serialize and deserialize delegation chains
+ * @brief API to serialize and deserialize delegation chains
* and abds
* @author Martin Schanzenbach
*/
@@ -58,6 +58,7 @@ GNUNET_ABD_delegation_set_get_size (
return ret;
}
+
/**
* Serizalize the given delegation chain entries and abd
*
@@ -158,12 +159,15 @@ GNUNET_ABD_delegates_get_size (
for (i = 0; i < c_count; i++)
{
- GNUNET_assert ((ret + cd[i].issuer_attribute_len + cd[i].subject_attribute_len) >= ret);
+ GNUNET_assert ((ret + cd[i].issuer_attribute_len
+ + cd[i].subject_attribute_len) >= ret);
// subject_attribute_len should be 0
ret += cd[i].issuer_attribute_len + cd[i].subject_attribute_len;
}
return ret;
}
+
+
/**
* Serizalize the given abds
*
@@ -187,15 +191,15 @@ GNUNET_ABD_delegates_serialize (
off = 0;
for (i = 0; i < c_count; i++)
{
- //c_rec.subject_attribute_len = htonl ((uint32_t) cd[i].subject_attribute_len);
+ // c_rec.subject_attribute_len = htonl ((uint32_t) cd[i].subject_attribute_len);
c_rec.issuer_attribute_len = htonl ((uint32_t) cd[i].issuer_attribute_len);
c_rec.issuer_key = cd[i].issuer_key;
c_rec.subject_key = cd[i].subject_key;
c_rec.signature = cd[i].signature;
c_rec.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DELEGATE);
c_rec.purpose.size =
- htonl ((sizeof (struct DelegateEntry) + cd[i].issuer_attribute_len) -
- sizeof (struct GNUNET_CRYPTO_EcdsaSignature));
+ htonl ((sizeof (struct DelegateEntry) + cd[i].issuer_attribute_len)
+ - sizeof (struct GNUNET_CRYPTO_EcdsaSignature));
c_rec.expiration = GNUNET_htonll (cd[i].expiration.abs_value_us);
if (off + sizeof (c_rec) > dest_size)
return -1;
@@ -224,9 +228,9 @@ GNUNET_ABD_delegates_serialize (
*/
int
GNUNET_ABD_delegates_deserialize (size_t len,
- const char *src,
- unsigned int c_count,
- struct GNUNET_ABD_Delegate *cd)
+ const char *src,
+ unsigned int c_count,
+ struct GNUNET_ABD_Delegate *cd)
{
struct DelegateEntry c_rec;
unsigned int i;
@@ -285,6 +289,7 @@ GNUNET_ABD_delegation_chain_get_size (
return ret + GNUNET_ABD_delegates_get_size (c_count, cd);
}
+
/**
* Serizalize the given delegation chain entries and abd
*
@@ -336,9 +341,9 @@ GNUNET_ABD_delegation_chain_serialize (
off += dd[i].subject_attribute_len;
}
return off + GNUNET_ABD_delegates_serialize (c_count,
- cd,
- dest_size - off,
- &dest[off]);
+ cd,
+ dest_size - off,
+ &dest[off]);
}
@@ -387,14 +392,15 @@ GNUNET_ABD_delegation_chain_deserialize (
off += dd[i].subject_attribute_len;
}
return GNUNET_ABD_delegates_deserialize (len - off,
- &src[off],
- c_count,
- cd);
+ &src[off],
+ c_count,
+ cd);
}
+
int
GNUNET_ABD_delegate_serialize (struct GNUNET_ABD_Delegate *dele,
- char **data)
+ char **data)
{
size_t size;
struct DelegateEntry *cdata;
@@ -455,6 +461,7 @@ GNUNET_ABD_delegate_serialize (struct GNUNET_ABD_Delegate *dele,
return size;
}
+
struct GNUNET_ABD_Delegate *
GNUNET_ABD_delegate_deserialize (const char *data, size_t data_size)
{
@@ -505,4 +512,5 @@ GNUNET_ABD_delegate_deserialize (const char *data, size_t data_size)
return dele;
}
+
/* end of abd_serialization.c */
diff --git a/src/abd/abd_serialization.h b/src/abd/abd_serialization.h
index cef9f42ef..21dc45a7b 100644
--- a/src/abd/abd_serialization.h
+++ b/src/abd/abd_serialization.h
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -21,7 +21,7 @@
/**
* @file abd/abd_serialization.h
- * @brief API to serialize and deserialize delegation chains
+ * @brief API to serialize and deserialize delegation chains
* and abds
* @author Martin Schanzenbach
*/
@@ -136,6 +136,7 @@ GNUNET_ABD_delegation_chain_deserialize (
struct GNUNET_ABD_Delegation *dd,
unsigned int c_count,
struct GNUNET_ABD_Delegate *cd);
+
size_t
GNUNET_ABD_delegates_get_size (
unsigned int c_count,
@@ -151,15 +152,16 @@ GNUNET_ABD_delegates_serialize (
int
GNUNET_ABD_delegates_deserialize (size_t len,
- const char *src,
- unsigned int c_count,
- struct GNUNET_ABD_Delegate *cd);
+ const char *src,
+ unsigned int c_count,
+ struct GNUNET_ABD_Delegate *cd);
int
GNUNET_ABD_delegate_serialize (struct GNUNET_ABD_Delegate *cred,
- char **data);
+ char **data);
struct GNUNET_ABD_Delegate *
GNUNET_ABD_delegate_deserialize (const char *data, size_t data_size);
+
#endif
/* end of abd_serialization.h */
diff --git a/src/abd/delegate_misc.c b/src/abd/delegate_misc.c
index fb5834274..df34cff8b 100644
--- a/src/abd/delegate_misc.c
+++ b/src/abd/delegate_misc.c
@@ -75,6 +75,7 @@ GNUNET_ABD_delegate_to_string (
return cred_str;
}
+
struct GNUNET_ABD_Delegate *
GNUNET_ABD_delegate_from_string (const char *s)
{
@@ -174,6 +175,7 @@ GNUNET_ABD_delegate_from_string (const char *s)
return dele;
}
+
/**
* Issue an attribute to a subject
*
diff --git a/src/abd/delegate_misc.h b/src/abd/delegate_misc.h
index 42a95ce99..0a4ddd9eb 100644
--- a/src/abd/delegate_misc.h
+++ b/src/abd/delegate_misc.h
@@ -28,7 +28,7 @@
char *
GNUNET_ABD_delegate_to_string (
- const struct GNUNET_ABD_Delegate *cred);
+ const struct GNUNET_ABD_Delegate *cred);
struct GNUNET_ABD_Delegate *
GNUNET_ABD_delegate_from_string (const char *str);
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c
index 23083ec68..a5d32c3dd 100644
--- a/src/abd/gnunet-abd.c
+++ b/src/abd/gnunet-abd.c
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -268,25 +268,27 @@ do_timeout (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
static void
-handle_intermediate_result(void *cls,
- struct GNUNET_ABD_Delegation *dd,
- bool is_bw)
+handle_intermediate_result (void *cls,
+ struct GNUNET_ABD_Delegation *dd,
+ bool is_bw)
{
char *prefix = "";
- if(is_bw)
+ if (is_bw)
prefix = "Backward -";
else
prefix = "Forward -";
printf ("%s Intermediate result: %s.%s <- %s.%s\n",
- prefix,
- GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->issuer_key),
- dd->issuer_attribute,
- GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->subject_key),
- dd->subject_attribute);
+ prefix,
+ GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->issuer_key),
+ dd->issuer_attribute,
+ GNUNET_CRYPTO_ecdsa_public_key_to_string (&dd->subject_key),
+ dd->subject_attribute);
}
+
static void
handle_collect_result (void *cls,
unsigned int d_count,
@@ -373,6 +375,7 @@ handle_verify_result (void *cls,
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Callback invoked from identity service with ego information.
* An @a ego of NULL means the ego was not found.
@@ -414,19 +417,20 @@ identity_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
privkey = GNUNET_IDENTITY_ego_get_private_key (ego);
collect_request = GNUNET_ABD_collect (abd,
- &issuer_pkey,
- issuer_attr,
- privkey,
- direction,
- &handle_collect_result,
- NULL,
- &handle_intermediate_result,
- NULL);
+ &issuer_pkey,
+ issuer_attr,
+ privkey,
+ direction,
+ &handle_collect_result,
+ NULL,
+ &handle_intermediate_result,
+ NULL);
return;
}
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Parse expiration time.
*
@@ -473,6 +477,7 @@ parse_expiration (const char *expirationstring,
return GNUNET_SYSERR;
}
+
/**
* Function called if lookup fails.
*/
@@ -483,13 +488,15 @@ error_cb (void *cls)
GNUNET_SCHEDULER_shutdown ();
return;
}
+
+
static void
add_continuation (void *cls, int32_t success, const char *emsg)
{
struct GNUNET_NAMESTORE_QueueEntry **qe = cls;
*qe = NULL;
- if(GNUNET_OK == success)
+ if (GNUNET_OK == success)
printf ("Adding successful.\n");
else
fprintf (stderr, "Error occured during adding, shutting down.\n");
@@ -497,6 +504,7 @@ add_continuation (void *cls, int32_t success, const char *emsg)
GNUNET_SCHEDULER_shutdown ();
}
+
static void
get_existing_record (void *cls,
const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
@@ -535,6 +543,7 @@ get_existing_record (void *cls,
return;
}
+
static void
store_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
{
@@ -627,6 +636,7 @@ store_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
return;
}
+
static void
sign_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
{
@@ -695,10 +705,10 @@ sign_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
// Sign delegate
dele = GNUNET_ABD_delegate_issue (privkey,
- &subject_pkey,
- issuer_attr,
- subject_attr,
- &etime_abs);
+ &subject_pkey,
+ issuer_attr,
+ subject_attr,
+ &etime_abs);
res = GNUNET_ABD_delegate_to_string (dele);
GNUNET_free (dele);
printf ("%s\n", res);
@@ -709,6 +719,7 @@ sign_cb (void *cls, const struct GNUNET_IDENTITY_Ego *ego)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Main function that will be run.
*
@@ -796,7 +807,7 @@ run (void *cls,
return;
}
- if (GNUNET_NO == forward && GNUNET_NO == backward)
+ if ((GNUNET_NO == forward) && (GNUNET_NO == backward))
{
// set default: bidirectional
forward = GNUNET_YES;
@@ -885,14 +896,14 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- if (NULL == issuer_attr || NULL == subject_delegate)
+ if ((NULL == issuer_attr) || (NULL == subject_delegate))
{
fprintf (stderr, _ ("You must provide issuer and subject attributes\n"));
GNUNET_SCHEDULER_shutdown ();
return;
}
- //Subject credentials are comma separated
+ // Subject credentials are comma separated
char *tmp = GNUNET_strdup (subject_delegate);
char *tok = strtok (tmp, ",");
if (NULL == tok)
@@ -923,16 +934,16 @@ run (void *cls,
}
verify_request = GNUNET_ABD_verify (abd,
- &issuer_pkey,
- issuer_attr,
- &subject_pkey,
- count,
- delegates,
- direction,
- &handle_verify_result,
- NULL,
- &handle_intermediate_result,
- NULL);
+ &issuer_pkey,
+ issuer_attr,
+ &subject_pkey,
+ count,
+ delegates,
+ direction,
+ &handle_verify_result,
+ NULL,
+ &handle_intermediate_result,
+ NULL);
for (i = 0; i < count; i++)
{
GNUNET_free ((char *) delegates[i].issuer_attribute);
@@ -961,93 +972,93 @@ int
main (int argc, char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] =
- {GNUNET_GETOPT_option_flag ('V',
- "verify",
+ {GNUNET_GETOPT_option_flag ('V',
+ "verify",
+ gettext_noop (
+ "verify credential against attribute"),
+ &verify),
+ GNUNET_GETOPT_option_string (
+ 's',
+ "subject",
+ "PKEY",
+ gettext_noop (
+ "The public key of the subject to lookup the"
+ "credential for, or for issuer side storage: subject and its attributes"),
+ &subject),
+ GNUNET_GETOPT_option_string (
+ 'd',
+ "delegate",
+ "DELE",
+ gettext_noop ("The private, signed delegate presented by the subject"),
+ &subject_delegate),
+ GNUNET_GETOPT_option_string (
+ 'i',
+ "issuer",
+ "PKEY",
+ gettext_noop (
+ "The public key of the authority to verify the credential against"),
+ &issuer_key),
+ GNUNET_GETOPT_option_string ('e',
+ "ego",
+ "EGO",
+ gettext_noop ("The ego/zone name to use"),
+ &ego_name),
+ GNUNET_GETOPT_option_string (
+ 'a',
+ "attribute",
+ "ATTR",
+ gettext_noop ("The issuer attribute to verify against or to issue"),
+ &issuer_attr),
+ GNUNET_GETOPT_option_string ('T',
+ "ttl",
+ "EXP",
gettext_noop (
- "verify credential against attribute"),
- &verify),
- GNUNET_GETOPT_option_string (
- 's',
- "subject",
- "PKEY",
- gettext_noop (
- "The public key of the subject to lookup the"
- "credential for, or for issuer side storage: subject and its attributes"),
- &subject),
- GNUNET_GETOPT_option_string (
- 'd',
- "delegate",
- "DELE",
- gettext_noop ("The private, signed delegate presented by the subject"),
- &subject_delegate),
- GNUNET_GETOPT_option_string (
- 'i',
- "issuer",
- "PKEY",
- gettext_noop (
- "The public key of the authority to verify the credential against"),
- &issuer_key),
- GNUNET_GETOPT_option_string ('e',
- "ego",
- "EGO",
- gettext_noop ("The ego/zone name to use"),
- &ego_name),
- GNUNET_GETOPT_option_string (
- 'a',
- "attribute",
- "ATTR",
- gettext_noop ("The issuer attribute to verify against or to issue"),
- &issuer_attr),
- GNUNET_GETOPT_option_string ('T',
- "ttl",
- "EXP",
- gettext_noop (
- "The time to live for the credential."
- "e.g. 5m, 6h, \"1990-12-30 12:00:00\""),
- &expiration),
- GNUNET_GETOPT_option_flag ('g',
- "collect",
- gettext_noop ("collect credentials"),
- &collect),
- GNUNET_GETOPT_option_flag ('U',
- "createIssuerSide",
- gettext_noop (
- "Create and issue a credential issuer side."),
- &create_is),
- GNUNET_GETOPT_option_flag ('C',
- "createSubjectSide",
- gettext_noop (
- "Issue a credential subject side."),
- &create_ss),
- GNUNET_GETOPT_option_flag (
- 'S',
- "signSubjectSide",
- gettext_noop ("Create, sign and return a credential subject side."),
- &sign_ss),
- GNUNET_GETOPT_option_string (
- 'x',
- "import",
- "IMP",
- gettext_noop (
- "Import signed credentials that should be issued to a zone/ego"),
- &import),
- GNUNET_GETOPT_option_flag ('P',
- "private",
- gettext_noop ("Create private record entry."),
- &is_private),
- GNUNET_GETOPT_option_flag (
- 'F',
- "forward",
- gettext_noop (
- "Indicates that the collect/verify process is done via forward search."),
- &forward),
- GNUNET_GETOPT_option_flag (
- 'B',
- "backward",
- gettext_noop (
- "Indicates that the collect/verify process is done via forward search."),
- &backward),
- GNUNET_GETOPT_OPTION_END};
+ "The time to live for the credential."
+ "e.g. 5m, 6h, \"1990-12-30 12:00:00\""),
+ &expiration),
+ GNUNET_GETOPT_option_flag ('g',
+ "collect",
+ gettext_noop ("collect credentials"),
+ &collect),
+ GNUNET_GETOPT_option_flag ('U',
+ "createIssuerSide",
+ gettext_noop (
+ "Create and issue a credential issuer side."),
+ &create_is),
+ GNUNET_GETOPT_option_flag ('C',
+ "createSubjectSide",
+ gettext_noop (
+ "Issue a credential subject side."),
+ &create_ss),
+ GNUNET_GETOPT_option_flag (
+ 'S',
+ "signSubjectSide",
+ gettext_noop ("Create, sign and return a credential subject side."),
+ &sign_ss),
+ GNUNET_GETOPT_option_string (
+ 'x',
+ "import",
+ "IMP",
+ gettext_noop (
+ "Import signed credentials that should be issued to a zone/ego"),
+ &import),
+ GNUNET_GETOPT_option_flag ('P',
+ "private",
+ gettext_noop ("Create private record entry."),
+ &is_private),
+ GNUNET_GETOPT_option_flag (
+ 'F',
+ "forward",
+ gettext_noop (
+ "Indicates that the collect/verify process is done via forward search."),
+ &forward),
+ GNUNET_GETOPT_option_flag (
+ 'B',
+ "backward",
+ gettext_noop (
+ "Indicates that the collect/verify process is done via forward search."),
+ &backward),
+ GNUNET_GETOPT_OPTION_END};
timeout = GNUNET_TIME_UNIT_FOREVER_REL;
@@ -1056,15 +1067,16 @@ main (int argc, char *const *argv)
GNUNET_log_setup ("gnunet-abd", "WARNING", NULL);
if (GNUNET_OK != GNUNET_PROGRAM_run (argc,
- argv,
- "gnunet-abd",
- _ ("GNUnet abd resolver tool"),
- options,
- &run,
- NULL))
+ argv,
+ "gnunet-abd",
+ _ ("GNUnet abd resolver tool"),
+ options,
+ &run,
+ NULL))
ret = 1;
GNUNET_free ((void *) argv);
return ret;
}
+
/* end of gnunet-abd.c */
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c
index 84222b290..36b0009ef 100644
--- a/src/abd/gnunet-service-abd.c
+++ b/src/abd/gnunet-service-abd.c
@@ -360,6 +360,7 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text)
dsentry->delegation_chain_entry->subject_attribute);
}
+
static void
cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
{
@@ -385,18 +386,19 @@ cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
GNUNET_free (ds_entry->delegation_chain_entry);
}
// Free DQ entries
- for(struct DelegationQueueEntry *dq_entry = ds_entry->queue_entries_head;
- NULL != ds_entry->queue_entries_head;
- dq_entry = ds_entry->queue_entries_head)
+ for (struct DelegationQueueEntry *dq_entry = ds_entry->queue_entries_head;
+ NULL != ds_entry->queue_entries_head;
+ dq_entry = ds_entry->queue_entries_head)
{
GNUNET_CONTAINER_DLL_remove (ds_entry->queue_entries_head,
- ds_entry->queue_entries_tail,
- dq_entry);
+ ds_entry->queue_entries_tail,
+ dq_entry);
GNUNET_free (dq_entry);
}
GNUNET_free (ds_entry);
}
+
static void
cleanup_handle (struct VerifyRequestHandle *vrh)
{
@@ -405,21 +407,22 @@ cleanup_handle (struct VerifyRequestHandle *vrh)
if (NULL != vrh->dsq_head)
{
- for (struct DelegationSetQueueEntry *ds_entry = vrh->dsq_head; NULL != vrh->dsq_head;
- ds_entry = vrh->dsq_head)
+ for (struct DelegationSetQueueEntry *ds_entry = vrh->dsq_head; NULL !=
+ vrh->dsq_head;
+ ds_entry = vrh->dsq_head)
{
GNUNET_CONTAINER_DLL_remove (vrh->dsq_head, vrh->dsq_tail, ds_entry);
- cleanup_dsq_entry(ds_entry);
+ cleanup_dsq_entry (ds_entry);
}
}
if (NULL != vrh->del_chain_head)
{
for (del_entry = vrh->del_chain_head; NULL != vrh->del_chain_head;
- del_entry = vrh->del_chain_head)
+ del_entry = vrh->del_chain_head)
{
GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head,
- vrh->del_chain_tail,
- del_entry);
+ vrh->del_chain_tail,
+ del_entry);
GNUNET_free_non_null (del_entry->delegate);
GNUNET_free (del_entry);
}
@@ -428,6 +431,7 @@ cleanup_handle (struct VerifyRequestHandle *vrh)
GNUNET_free (vrh);
}
+
static void
shutdown_task (void *cls)
{
@@ -459,15 +463,18 @@ shutdown_task (void *cls)
}
}
+
static void
-send_intermediate_response(struct VerifyRequestHandle *vrh, struct DelegationChainEntry *ch_entry, bool is_bw){
+send_intermediate_response (struct VerifyRequestHandle *vrh, struct
+ DelegationChainEntry *ch_entry, bool is_bw)
+{
struct DelegationChainIntermediateMessage *rmsg;
struct GNUNET_MQ_Envelope *env;
struct GNUNET_ABD_Delegation *dd;
size_t size;
// Don't report immediate results during collect
- if(vrh->is_collect)
+ if (vrh->is_collect)
return;
dd = GNUNET_new (struct GNUNET_ABD_Delegation);
@@ -482,31 +489,32 @@ send_intermediate_response(struct VerifyRequestHandle *vrh, struct DelegationCha
dd->subject_attribute = ch_entry->subject_attribute;
dd->subject_attribute_len = strlen (ch_entry->subject_attribute) + 1;
}
-
+
size = GNUNET_ABD_delegation_chain_get_size (1,
- dd,
- 0,
- NULL);
+ dd,
+ 0,
+ NULL);
env = GNUNET_MQ_msg_extra (rmsg,
size,
GNUNET_MESSAGE_TYPE_ABD_INTERMEDIATE_RESULT);
// Assign id so that client can find associated request
rmsg->id = vrh->request_id;
- rmsg->is_bw = htons(is_bw);
- rmsg->size = htonl(size);
+ rmsg->is_bw = htons (is_bw);
+ rmsg->size = htonl (size);
GNUNET_assert (
-1 != GNUNET_ABD_delegation_chain_serialize (1,
- dd,
- 0,
- NULL,
- size,
- (char *) &rmsg[1]));
+ dd,
+ 0,
+ NULL,
+ size,
+ (char *) &rmsg[1]));
GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (vrh->client), env);
}
+
static void
send_lookup_response (struct VerifyRequestHandle *vrh)
{
@@ -570,9 +578,9 @@ send_lookup_response (struct VerifyRequestHandle *vrh)
}
size =
GNUNET_ABD_delegation_chain_get_size (vrh->delegation_chain_size,
- dd,
- vrh->del_chain_size,
- dele);
+ dd,
+ vrh->del_chain_size,
+ dele);
env = GNUNET_MQ_msg_extra (rmsg,
size,
GNUNET_MESSAGE_TYPE_ABD_VERIFY_RESULT);
@@ -589,11 +597,11 @@ send_lookup_response (struct VerifyRequestHandle *vrh)
GNUNET_assert (
-1 !=
GNUNET_ABD_delegation_chain_serialize (vrh->delegation_chain_size,
- dd,
- vrh->del_chain_size,
- dele,
- size,
- (char *) &rmsg[1]));
+ dd,
+ vrh->del_chain_size,
+ dele,
+ size,
+ (char *) &rmsg[1]));
GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (vrh->client), env);
GNUNET_CONTAINER_DLL_remove (vrh_head, vrh_tail, vrh);
@@ -604,6 +612,7 @@ send_lookup_response (struct VerifyRequestHandle *vrh)
GNUNET_NO);
}
+
static char *
partial_match (char *tmp_trail,
char *tmp_subattr,
@@ -660,6 +669,7 @@ partial_match (char *tmp_trail,
return attr_trailer;
}
+
static int
handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry,
struct DelegationSetQueueEntry *match_entry,
@@ -679,7 +689,7 @@ handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry,
fw_entry = old_fw_parent;
}
// set last entry of chain as actual_entry
- //actual_entry = last_entry;
+ // actual_entry = last_entry;
// set refcount, loop all delegations
for (struct DelegateRecordEntry *del_entry = vrh->del_chain_head;
del_entry != NULL;
@@ -724,6 +734,7 @@ handle_bidirectional_match (struct DelegationSetQueueEntry *actual_entry,
return GNUNET_YES;
}
+
static void
forward_resolution (void *cls,
uint32_t rd_count,
@@ -846,9 +857,9 @@ forward_resolution (void *cls,
ds_entry->delegation_chain_entry->issuer_key = del->issuer_key;
ds_entry->delegation_chain_entry->issuer_attribute =
GNUNET_strdup (del->issuer_attribute);
-
+
// Found new entry, repoting intermediate result
- send_intermediate_response(vrh, ds_entry->delegation_chain_entry, false);
+ send_intermediate_response (vrh, ds_entry->delegation_chain_entry, false);
// current delegation as parent
ds_entry->parent_queue_entry = dq_entry;
@@ -929,7 +940,7 @@ forward_resolution (void *cls,
if (GNUNET_NO ==
handle_bidirectional_match (ds_entry, del_entry, vrh))
return;
-
+
send_lookup_response (vrh);
return;
}
@@ -948,12 +959,12 @@ forward_resolution (void *cls,
ds_entry->lookup_request =
GNUNET_GNS_lookup (gns,
- GNUNET_GNS_EMPTY_LABEL_AT,
- &del->issuer_key,
- GNUNET_GNSRECORD_TYPE_DELEGATE,
- GNUNET_GNS_LO_DEFAULT,
- &forward_resolution,
- ds_entry);
+ GNUNET_GNS_EMPTY_LABEL_AT,
+ &del->issuer_key,
+ GNUNET_GNSRECORD_TYPE_DELEGATE,
+ GNUNET_GNS_LO_DEFAULT,
+ &forward_resolution,
+ ds_entry);
}
if (0 == vrh->pending_lookups)
@@ -964,6 +975,7 @@ forward_resolution (void *cls,
}
}
+
static void
backward_resolution (void *cls,
uint32_t rd_count,
@@ -998,10 +1010,10 @@ backward_resolution (void *cls,
if (GNUNET_OK !=
GNUNET_ABD_delegation_set_deserialize (GNUNET_ntohll (
- sets->data_size),
- (const char *) &sets[1],
- ntohl (sets->set_count),
- set))
+ sets->data_size),
+ (const char *) &sets[1],
+ ntohl (sets->set_count),
+ set))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to deserialize!\n");
continue;
@@ -1064,7 +1076,7 @@ backward_resolution (void *cls,
GNUNET_strdup (current_set->lookup_attribute);
// Found new entry, repoting intermediate result
- send_intermediate_response(vrh, ds_entry->delegation_chain_entry, true);
+ send_intermediate_response (vrh, ds_entry->delegation_chain_entry, true);
ds_entry->parent_queue_entry = dq_entry; // current_delegation;
@@ -1127,8 +1139,8 @@ backward_resolution (void *cls,
ds_entry->unresolved_attribute_delegation);
// Continue with next/new backward resolution
char issuer_attribute_name[strlen (
- ds_entry->unresolved_attribute_delegation) +
- 1];
+ ds_entry->unresolved_attribute_delegation)
+ + 1];
strcpy (issuer_attribute_name, ds_entry->unresolved_attribute_delegation);
char *next_attr = strtok (issuer_attribute_name, ".");
if (NULL == next_attr)
@@ -1156,7 +1168,7 @@ backward_resolution (void *cls,
del_entry = del_entry->next)
{
// only check entries added by forward algorithm
- if (!del_entry->from_bw)
+ if (! del_entry->from_bw)
{
// key of list entry matches actual key
if (0 == memcmp (&del_entry->delegation_chain_entry->issuer_key,
@@ -1174,8 +1186,8 @@ backward_resolution (void *cls,
// if one node on the path still needs solutions: return
if (GNUNET_NO ==
handle_bidirectional_match (del_entry, ds_entry, vrh))
- break;
-
+ break;
+
// Send lookup response
send_lookup_response (vrh);
return;
@@ -1197,12 +1209,12 @@ backward_resolution (void *cls,
ds_entry->handle = vrh;
ds_entry->lookup_request =
GNUNET_GNS_lookup (gns,
- lookup_attribute,
- ds_entry->issuer_key, // issuer_key,
- GNUNET_GNSRECORD_TYPE_ATTRIBUTE,
- GNUNET_GNS_LO_DEFAULT,
- &backward_resolution,
- ds_entry);
+ lookup_attribute,
+ ds_entry->issuer_key, // issuer_key,
+ GNUNET_GNSRECORD_TYPE_ATTRIBUTE,
+ GNUNET_GNS_LO_DEFAULT,
+ &backward_resolution,
+ ds_entry);
GNUNET_free (lookup_attribute);
}
@@ -1262,8 +1274,8 @@ delegation_chain_bw_resolution_start (void *cls)
}
- //Check for attributes from the issuer and follow the chain
- //till you get the required subject's attributes
+ // Check for attributes from the issuer and follow the chain
+ // till you get the required subject's attributes
char issuer_attribute_name[strlen (vrh->issuer_attribute) + 1];
strcpy (issuer_attribute_name, vrh->issuer_attribute);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1301,6 +1313,7 @@ delegation_chain_bw_resolution_start (void *cls)
return 0;
}
+
static int
delegation_chain_fw_resolution_start (void *cls)
{
@@ -1364,11 +1377,13 @@ delegation_chain_fw_resolution_start (void *cls)
GNUNET_memcpy (ds_entry->issuer_key,
&del_entry->delegate->subject_key,
sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey));
-
+
ds_entry->delegation_chain_entry = GNUNET_new (struct DelegationChainEntry);
- ds_entry->delegation_chain_entry->subject_key = del_entry->delegate->subject_key;
+ ds_entry->delegation_chain_entry->subject_key =
+ del_entry->delegate->subject_key;
ds_entry->delegation_chain_entry->subject_attribute = NULL;
- ds_entry->delegation_chain_entry->issuer_key = del_entry->delegate->issuer_key;
+ ds_entry->delegation_chain_entry->issuer_key =
+ del_entry->delegate->issuer_key;
ds_entry->delegation_chain_entry->issuer_attribute =
GNUNET_strdup (del_entry->delegate->issuer_attribute);
@@ -1392,6 +1407,7 @@ delegation_chain_fw_resolution_start (void *cls)
return 0;
}
+
static int
check_verify (void *cls, const struct VerifyMessage *v_msg)
{
@@ -1419,6 +1435,7 @@ check_verify (void *cls, const struct VerifyMessage *v_msg)
return GNUNET_OK;
}
+
static void
handle_verify (void *cls, const struct VerifyMessage *v_msg)
{
@@ -1465,18 +1482,18 @@ handle_verify (void *cls, const struct VerifyMessage *v_msg)
// Parse delegates from verifaction message
delegate_count = ntohl (v_msg->d_count);
- delegate_data_size = ntohs (v_msg->header.size) -
- sizeof (struct VerifyMessage) -
- ntohs (v_msg->issuer_attribute_len) - 1;
+ delegate_data_size = ntohs (v_msg->header.size)
+ - sizeof (struct VerifyMessage)
+ - ntohs (v_msg->issuer_attribute_len) - 1;
struct GNUNET_ABD_Delegate delegates[delegate_count];
memset (delegates,
0,
sizeof (struct GNUNET_ABD_Delegate) * delegate_count);
delegate_data = (char *) &v_msg[1] + ntohs (v_msg->issuer_attribute_len) + 1;
if (GNUNET_OK != GNUNET_ABD_delegates_deserialize (delegate_data_size,
- delegate_data,
- delegate_count,
- delegates))
+ delegate_data,
+ delegate_count,
+ delegates))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot deserialize delegates!\n");
send_lookup_response (vrh);
@@ -1488,8 +1505,8 @@ handle_verify (void *cls, const struct VerifyMessage *v_msg)
{
del_entry = GNUNET_new (struct DelegateRecordEntry);
del_entry->delegate =
- GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate) +
- delegates[i].issuer_attribute_len + 1);
+ GNUNET_malloc (sizeof (struct GNUNET_ABD_Delegate)
+ + delegates[i].issuer_attribute_len + 1);
GNUNET_memcpy (del_entry->delegate,
&delegates[i],
sizeof (struct GNUNET_ABD_Delegate));
@@ -1509,7 +1526,7 @@ handle_verify (void *cls, const struct VerifyMessage *v_msg)
if (GNUNET_ABD_FLAG_BACKWARD & vrh->resolution_algo &&
GNUNET_ABD_FLAG_FORWARD & vrh->resolution_algo)
{
- if(1 == delegation_chain_fw_resolution_start (vrh))
+ if (1 == delegation_chain_fw_resolution_start (vrh))
return;
delegation_chain_bw_resolution_start (vrh);
}
@@ -1523,6 +1540,7 @@ handle_verify (void *cls, const struct VerifyMessage *v_msg)
}
}
+
static void
handle_delegate_collection_error_cb (void *cls)
{
@@ -1533,6 +1551,7 @@ handle_delegate_collection_error_cb (void *cls)
send_lookup_response (vrh);
}
+
static void
delegate_collection_finished (void *cls)
{
@@ -1544,7 +1563,7 @@ delegate_collection_finished (void *cls)
GNUNET_ABD_FLAG_FORWARD & vrh->resolution_algo)
{
// if premature match found don't start bw resultion
- if(1 == delegation_chain_fw_resolution_start (vrh))
+ if (1 == delegation_chain_fw_resolution_start (vrh))
return;
delegation_chain_bw_resolution_start (vrh);
}
@@ -1558,6 +1577,7 @@ delegate_collection_finished (void *cls)
}
}
+
static void
handle_delegate_collection_cb (void *cls,
const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
@@ -1599,6 +1619,7 @@ handle_delegate_collection_cb (void *cls,
delegate_collection_finished (vrh);
}
+
static void
handle_collect (void *cls, const struct CollectMessage *c_msg)
{
@@ -1682,6 +1703,7 @@ check_collect (void *cls, const struct CollectMessage *c_msg)
return GNUNET_OK;
}
+
static void
client_disconnect_cb (void *cls,
struct GNUNET_SERVICE_Client *client,
@@ -1690,6 +1712,7 @@ client_disconnect_cb (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client %p disconnected\n", client);
}
+
static void *
client_connect_cb (void *cls,
struct GNUNET_SERVICE_Client *client,
@@ -1699,6 +1722,7 @@ client_connect_cb (void *cls,
return client;
}
+
/**
* Process Credential requests.
*
diff --git a/src/abd/plugin_gnsrecord_abd.c b/src/abd/plugin_gnsrecord_abd.c
index 9d8f4a79b..c7635b997 100644
--- a/src/abd/plugin_gnsrecord_abd.c
+++ b/src/abd/plugin_gnsrecord_abd.c
@@ -346,4 +346,5 @@ libgnunet_plugin_gnsrecord_abd_done (void *cls)
return NULL;
}
+
/* end of plugin_gnsrecord_abd.c */
diff --git a/src/abe/abe.c b/src/abe/abe.c
index bba6e5c45..dbd722ca3 100644
--- a/src/abe/abe.c
+++ b/src/abe/abe.c
@@ -77,6 +77,7 @@ init_aes (element_t k, int enc,
return rc;
}
+
static int
aes_128_cbc_encrypt (char*pt,
int size,
@@ -115,6 +116,7 @@ aes_128_cbc_encrypt (char*pt,
return buf_size;
}
+
static int
aes_128_cbc_decrypt (char*ct,
int size,
@@ -148,6 +150,7 @@ aes_128_cbc_decrypt (char*ct,
return len;
}
+
/**
* @ingroup abe
* Create a new CP-ABE master key. Caller must free return value.
@@ -166,6 +169,7 @@ GNUNET_ABE_cpabe_create_master_key (void)
return key;
}
+
/**
* @ingroup abe
* Delete a CP-ABE master key.
@@ -183,6 +187,7 @@ GNUNET_ABE_cpabe_delete_master_key (struct GNUNET_ABE_AbeMasterKey *key)
GNUNET_free (key);
}
+
/**
* @ingroup abe
* Create a new CP-ABE key. Caller must free return value.
@@ -208,6 +213,7 @@ GNUNET_ABE_cpabe_create_key (struct GNUNET_ABE_AbeMasterKey *key,
return prv_key;
}
+
/**
* @ingroup abe
* Delete a CP-ABE key.
@@ -227,6 +233,7 @@ GNUNET_ABE_cpabe_delete_key (struct GNUNET_ABE_AbeKey *key,
GNUNET_free (key);
}
+
static ssize_t
write_cpabe (void **result,
uint32_t file_len,
@@ -255,6 +262,7 @@ write_cpabe (void **result,
return 12 + cph_buf_len + aes_buf_len;
}
+
static ssize_t
read_cpabe (const void *data,
char**cph_buf,
@@ -285,6 +293,7 @@ read_cpabe (const void *data,
return buf_len;
}
+
/**
* @ingroup abe
* Encrypt a block using sessionkey.
@@ -329,6 +338,7 @@ GNUNET_ABE_cpabe_encrypt (const void *block,
return result_len;
}
+
/**
* @ingroup abe
* Decrypt a block using the ABE key.
@@ -378,6 +388,7 @@ GNUNET_ABE_cpabe_decrypt (const void *block,
return plt_len;
}
+
/**
* @ingroup abe
* Serialize an ABE key.
@@ -408,6 +419,7 @@ GNUNET_ABE_cpabe_serialize_key (const struct GNUNET_ABE_AbeKey *key,
return len;
}
+
/**
* @ingroup abe
* Deserialize a serialized ABE key.
@@ -440,6 +452,7 @@ GNUNET_ABE_cpabe_deserialize_key (const void *data,
return key;
}
+
/**
* @ingroup abe
* Serialize an ABE master key.
@@ -471,6 +484,7 @@ GNUNET_ABE_cpabe_serialize_master_key (const struct
return len;
}
+
/**
* @ingroup abe
* Deserialize an ABE master key.
diff --git a/src/abe/test_cpabe.c b/src/abe/test_cpabe.c
index c1db72f96..2ac4ef0a8 100644
--- a/src/abe/test_cpabe.c
+++ b/src/abe/test_cpabe.c
@@ -85,4 +85,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_crypto_aes.c */
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index da7268f67..4c6ce3240 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -288,8 +288,7 @@ handle_arm_result (void *cls,
wait for the result message, but also wait for the service to close
the connection (and then we have to close our client handle as well);
this is done by installing a different receive handler, waiting for
- the connection to go down */
- if (NULL != h->thm)
+ the connection to go down */if (NULL != h->thm)
{
GNUNET_break (0);
op->result_cont (h->thm->cont_cls,
@@ -956,8 +955,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h,
* 2) We're not connected to ARM.
* Cancel any reconnection attempts temporarily, then perform
* a service test.
- */
- if (GNUNET_YES == h->currently_up)
+ */if (GNUNET_YES == h->currently_up)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"ARM is already running\n");
@@ -976,8 +974,7 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h,
yet complete the MQ handshake. However, given that users
are unlikely to hammer 'gnunet-arm -s' on a busy system,
the above check should catch 99.99% of the cases where ARM
- is already running. */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ is already running. */LOG (GNUNET_ERROR_TYPE_DEBUG,
"Starting ARM service\n");
if (NULL == (sig = GNUNET_DISK_pipe (GNUNET_NO,
GNUNET_NO,
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c
index 0fdb66fa0..3b4e770b0 100644
--- a/src/arm/gnunet-arm.c
+++ b/src/arm/gnunet-arm.c
@@ -1061,4 +1061,5 @@ main (int argc, char *const *argv)
return lret;
}
+
/* end of gnunet-arm.c */
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index d13be6eb1..6b6264757 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -1335,6 +1335,7 @@ pool_write (char *pool_start, size_t pool_size, size_t *pool_pos, char *str)
return GNUNET_OK;
}
+
/**
* Handle LIST-message.
*
@@ -2193,12 +2194,15 @@ main (int argc, char *const *argv)
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_ARM_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
diff --git a/src/arm/mockup-service.c b/src/arm/mockup-service.c
index 9870afea1..43dd3c92b 100644
--- a/src/arm/mockup-service.c
+++ b/src/arm/mockup-service.c
@@ -116,7 +116,8 @@ GNUNET_SERVICE_MAIN ("do-nothing",
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((destructor)) GNUNET_mockup_done ()
+void __attribute__ ((destructor))
+GNUNET_mockup_done ()
{
_exit (special_ret);
}
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c
index 5a06c823c..56a0abbd2 100644
--- a/src/arm/test_arm_api.c
+++ b/src/arm/test_arm_api.c
@@ -184,8 +184,7 @@ arm_start_cb (void *cls,
* ("sent", because it isn't going anywhere, ARM API starts ARM service
* by itself).
* ARM API should report that ARM service is starting.
- */
- GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
+ */GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
GNUNET_break (phase == 0);
LOG ("Sent 'START' request for arm to ARM %s\n",
(status == GNUNET_ARM_REQUEST_SENT_OK) ? "successfully" :
@@ -255,4 +254,5 @@ main (int argc, char *argvx[])
return ok;
}
+
/* end of test_arm_api.c */
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c
index 5d1863f37..e3eed8568 100644
--- a/src/arm/test_exponential_backoff.c
+++ b/src/arm/test_exponential_backoff.c
@@ -412,4 +412,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_exponential_backoff.c */
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c
index 45053a41d..90fb8bfa0 100644
--- a/src/arm/test_gnunet_service_arm.c
+++ b/src/arm/test_gnunet_service_arm.c
@@ -263,4 +263,5 @@ main (int argc, char *av[])
return ret;
}
+
/* end of test_gnunet_service_arm.c */
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c
index 676021926..fa379200f 100644
--- a/src/ats-tests/ats-testing-experiment.c
+++ b/src/ats-tests/ats-testing-experiment.c
@@ -65,6 +65,7 @@ create_experiment ()
return e;
}
+
static void
free_experiment (struct Experiment *e)
{
@@ -509,6 +510,7 @@ enforce_start_send (struct GNUNET_ATS_TEST_Operation *op)
GNUNET_TIME_UNIT_FOREVER_REL);
}
+
static void
enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -572,6 +574,7 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op)
op->pref_type);
}
+
static void
enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -595,7 +598,9 @@ enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op)
}
}
-static void enforce_episode (struct Episode *ep)
+
+static void
+enforce_episode (struct Episode *ep)
{
struct GNUNET_ATS_TEST_Operation *cur;
@@ -794,6 +799,7 @@ GNUNET_ATS_TEST_experimentation_load (const char *filename)
return e;
}
+
void
GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e)
{
@@ -810,4 +816,5 @@ GNUNET_ATS_TEST_experimentation_stop (struct Experiment *e)
free_experiment (e);
}
+
/* end of file ats-testing-experiment.c*/
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c
index 12a08ffda..38094a438 100644
--- a/src/ats-tests/ats-testing-log.c
+++ b/src/ats-tests/ats-testing-log.c
@@ -246,7 +246,6 @@ struct LoggingHandle
};
-
static void
write_throughput_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs,
int slaves)
@@ -380,6 +379,7 @@ write_rtt_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, int
GNUNET_free (gfn);
}
+
static void
write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp, char **fs, int
slaves)
@@ -664,6 +664,7 @@ GNUNET_ATS_TEST_logging_write_to_file (struct LoggingHandle *l,
GNUNET_free (filename_master);
}
+
/**
* Log all data now
*
@@ -895,6 +896,7 @@ GNUNET_ATS_TEST_logging_stop (struct LoggingHandle *l)
_ ("Stop logging\n"));
}
+
/**
* Clean up logging data
*
@@ -969,4 +971,6 @@ GNUNET_ATS_TEST_logging_start (struct GNUNET_TIME_Relative log_frequency,
return l;
}
+
+
/* end of file ats-testing-log.c */
diff --git a/src/ats-tests/ats-testing-preferences.c b/src/ats-tests/ats-testing-preferences.c
index 8138b18bb..f30fde960 100644
--- a/src/ats-tests/ats-testing-preferences.c
+++ b/src/ats-tests/ats-testing-preferences.c
@@ -261,4 +261,5 @@ GNUNET_ATS_TEST_generate_preferences_stop_all ()
}
}
+
/* end of file ats-testing-preferences.c */
diff --git a/src/ats-tests/ats-testing-traffic.c b/src/ats-tests/ats-testing-traffic.c
index 14a8fe327..f19eac871 100644
--- a/src/ats-tests/ats-testing-traffic.c
+++ b/src/ats-tests/ats-testing-traffic.c
@@ -389,4 +389,5 @@ GNUNET_ATS_TEST_generate_traffic_stop_all ()
}
}
+
/* end of file ats-testing-traffic.c */
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c
index 88c1729a6..c7969cdfe 100644
--- a/src/ats-tests/ats-testing.c
+++ b/src/ats-tests/ats-testing.c
@@ -738,7 +738,6 @@ do_connect_ats (void *cls)
}
-
static void
peerinformation_cb (void *cb_cls,
struct GNUNET_TESTBED_Operation *op,
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c
index c9e7a6d9f..fb3014798 100644
--- a/src/ats-tests/gnunet-ats-sim.c
+++ b/src/ats-tests/gnunet-ats-sim.c
@@ -252,22 +252,19 @@ topology_setup_done (void *cls,
GNUNET_ATS_TEST_TG_CONSTANT, 1, 1, GNUNET_TIME_UNIT_SECONDS,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
GNUNET_ATS_PREFERENCE_BANDWIDTH);
- */
-/*
+ *//*
GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
GNUNET_ATS_TEST_TG_LINEAR, 1, 50,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2),
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
GNUNET_ATS_PREFERENCE_BANDWIDTH);
- */
-/*
+ *//*
GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
GNUNET_ATS_TEST_TG_RANDOM, 1, 50,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 2),
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 250),
GNUNET_ATS_PREFERENCE_BANDWIDTH);
- */
-/*
+ *//*
GNUNET_ATS_TEST_generate_preferences_start(&masters[0],&masters[0].partners[0],
GNUNET_ATS_TEST_TG_SINUS, 10, 5,
GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
@@ -397,4 +394,6 @@ main (int argc, char *argv[])
GNUNET_free (opt_exp_file);
return 0;
}
+
+
/* end of file gnunet-ats-sim.c */
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c
index bc6a3c435..09ddd7b2d 100644
--- a/src/ats-tests/gnunet-solver-eval.c
+++ b/src/ats-tests/gnunet-solver-eval.c
@@ -408,6 +408,7 @@ load_episode (struct Experiment *e,
return GNUNET_OK;
}
+
static int
load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg)
{
@@ -517,8 +518,8 @@ enforce_start_send (struct GNUNET_ATS_TEST_Operation *op)
partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner,
op->tg_type, op->base_rate, op->max_rate, op->period,
GNUNET_TIME_UNIT_FOREVER_REL);
- */
-}
+ */}
+
static void
enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op)
@@ -541,8 +542,7 @@ enforce_stop_send (struct GNUNET_ATS_TEST_Operation *op)
GNUNET_ATS_TEST_generate_traffic_stop(p->tg);
p->tg = NULL;
}
- */
-}
+ */}
static void
@@ -579,8 +579,8 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op)
partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner,
op->tg_type, op->base_rate, op->max_rate, op->period, op->frequency,
op->pref_type);
- */
-}
+ */}
+
static void
enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op)
@@ -603,10 +603,11 @@ enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op)
GNUNET_ATS_TEST_generate_preferences_stop (p->pg);
p->pg = NULL;
}
- */
-}
+ */}
+
-static void enforce_episode (struct Episode *ep)
+static void
+enforce_episode (struct Episode *ep)
{
struct GNUNET_ATS_TEST_Operation *cur;
@@ -805,6 +806,7 @@ GNUNET_ATS_solvers_experimentation_load (char *filename)
return e;
}
+
void
GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e)
{
@@ -821,6 +823,7 @@ GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e)
free_experiment (e);
}
+
/**
* Solver
*/
@@ -847,6 +850,7 @@ GNUNET_ATS_solvers_solver_stop (struct GNUNET_ATS_TESTING_SolverHandle *sh)
GNUNET_free (sh);
}
+
struct GNUNET_ATS_TESTING_SolverHandle *
GNUNET_ATS_solvers_solver_start (enum GNUNET_ATS_Solvers type)
{
@@ -885,6 +889,7 @@ GNUNET_ATS_solvers_solver_start (enum GNUNET_ATS_Solvers type)
return sh;
}
+
static struct Experiment *e;
static struct GNUNET_ATS_TESTING_SolverHandle *sh;
@@ -1015,4 +1020,6 @@ main (int argc, char *argv[])
return 0;
}
+
+
/* end of file gnunet-solver-eval.c*/
diff --git a/src/ats-tests/perf_ats.c b/src/ats-tests/perf_ats.c
index 470c687fc..64756b8aa 100644
--- a/src/ats-tests/perf_ats.c
+++ b/src/ats-tests/perf_ats.c
@@ -420,7 +420,7 @@ main (int argc, char *argv[])
/* Determine solver name */
solver = GNUNET_strdup (tmp);
/* Remove .exe prefix */
- if ((NULL != (dotexe = strstr (solver, ".exe")))&&(dotexe[4] == '\0'))
+ if ((NULL != (dotexe = strstr (solver, ".exe"))) && (dotexe[4] == '\0'))
dotexe[0] = '\0';
/* Determine first '_' after solver */
@@ -597,4 +597,5 @@ main (int argc, char *argv[])
return result;
}
+
/* end of file perf_ats.c */
diff --git a/src/ats-tests/perf_ats_logging.c b/src/ats-tests/perf_ats_logging.c
index 41c50ea6e..ac8fa8950 100644
--- a/src/ats-tests/perf_ats_logging.c
+++ b/src/ats-tests/perf_ats_logging.c
@@ -372,6 +372,7 @@ write_rtt_gnuplot_script (char *fn, struct LoggingPeer *lp)
GNUNET_free (gfn);
}
+
static void
write_bw_gnuplot_script (char *fn, struct LoggingPeer *lp)
{
@@ -514,7 +515,6 @@ write_to_file ()
/* Assembling master string */
-
GNUNET_asprintf (&data, "%llu;%llu;%u;%u;%u;%u;%u;%u;;;;;;;;;;;%s\n",
cur_lt->timestamp,
GNUNET_TIME_absolute_get_difference (lp[c_m].start,
@@ -703,6 +703,7 @@ collect_log_now (void)
}
}
+
static void
collect_log_task (void *cls)
{
@@ -774,4 +775,6 @@ perf_logging_start (struct GNUNET_TIME_Relative log_frequency,
log_task = GNUNET_SCHEDULER_add_now (&collect_log_task, NULL);
running = GNUNET_YES;
}
+
+
/* end of file perf_ats_logging.c */
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 03bddba8f..16636e505 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -988,4 +988,5 @@ main (int argc, char *const *argv)
return 1;
}
+
/* end of gnunet-ats.c */
diff --git a/src/ats/ats.h b/src/ats/ats.h
index 3a3d12cfa..711c1c103 100644
--- a/src/ats/ats.h
+++ b/src/ats/ats.h
@@ -235,7 +235,6 @@ struct GNUNET_ATS_SessionReleaseMessage
};
-
/**
* ATS Service suggests to the transport service to use the address
* identified by the given @e session_id for the given @e peer with
@@ -490,5 +489,4 @@ struct FeedbackPreferenceMessage
GNUNET_NETWORK_STRUCT_END
-
#endif
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c
index 8defd6022..acc9356ed 100644
--- a/src/ats/ats_api_performance.c
+++ b/src/ats/ats_api_performance.c
@@ -992,4 +992,5 @@ GNUNET_ATS_performance_give_feedback (struct GNUNET_ATS_PerformanceHandle *ph,
env);
}
+
/* end of ats_api_performance.c */
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c
index 9866ca929..6a014357e 100644
--- a/src/ats/gnunet-ats-solver-eval.c
+++ b/src/ats/gnunet-ats-solver-eval.c
@@ -123,6 +123,7 @@ find_peer_by_id (int id)
return NULL;
}
+
static struct TestPeer *
find_peer_by_pid (const struct GNUNET_PeerIdentity *pid)
{
@@ -134,6 +135,7 @@ find_peer_by_pid (const struct GNUNET_PeerIdentity *pid)
return NULL;
}
+
static struct TestAddress *
find_address_by_id (struct TestPeer *peer, int aid)
{
@@ -238,6 +240,7 @@ logging_task (void *cls)
l);
}
+
struct LoggingHandle *
GNUNET_ATS_solver_logging_start (struct GNUNET_TIME_Relative freq)
{
@@ -252,6 +255,7 @@ GNUNET_ATS_solver_logging_start (struct GNUNET_TIME_Relative freq)
return l;
}
+
void
GNUNET_ATS_solver_logging_stop (struct LoggingHandle *l)
{
@@ -263,6 +267,7 @@ GNUNET_ATS_solver_logging_stop (struct LoggingHandle *l)
l->logging_task = NULL;
}
+
static struct LoggingFileHandle *
find_logging_file_handle (struct LoggingFileHandle *lf_head,
struct LoggingFileHandle *lf_tail,
@@ -276,6 +281,7 @@ find_logging_file_handle (struct LoggingFileHandle *lf_head,
return NULL;
}
+
void
GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int
add_time_stamp,
@@ -391,8 +397,7 @@ GNUNET_ATS_solver_logging_write_to_disk (struct LoggingHandle *l, int
fprintf(stderr,"\t %s = %.2f %.2f [abs/rel]\n",
GNUNET_ATS_print_preference_type(c),
log_p->pref_abs[c], log_p->pref_norm[c]);
- */
- GNUNET_asprintf (&prefstring_tmp, "%s;%.3f;%.3f",
+ */GNUNET_asprintf (&prefstring_tmp, "%s;%.3f;%.3f",
prefstring, log_p->pref_abs[c], log_p->pref_norm[c]);
@@ -449,6 +454,7 @@ cleanup:
}
}
+
void
GNUNET_ATS_solver_logging_eval (struct LoggingHandle *l)
{
@@ -493,6 +499,7 @@ GNUNET_ATS_solver_logging_eval (struct LoggingHandle *l)
}
}
+
void
GNUNET_ATS_solver_logging_free (struct LoggingHandle *l)
{
@@ -538,6 +545,7 @@ GNUNET_ATS_solver_logging_free (struct LoggingHandle *l)
GNUNET_free (l);
}
+
/**
* Property Generators
*/
@@ -701,6 +709,7 @@ find_prop_gen (unsigned int peer, unsigned int address,
return NULL;
}
+
void
GNUNET_ATS_solver_generate_property_stop (struct PropertyGenerator *pg)
{
@@ -1056,6 +1065,7 @@ find_pref_gen (unsigned int peer, enum GNUNET_ATS_PreferenceKind kind)
return NULL;
}
+
void
GNUNET_ATS_solver_generate_preferences_stop (struct PreferenceGenerator *pg)
{
@@ -1210,7 +1220,6 @@ GNUNET_ATS_solver_generate_preferences_start (unsigned int peer,
}
-
/**
* Stop all preferences generators
*/
@@ -1229,7 +1238,6 @@ GNUNET_ATS_solver_generate_preferences_stop_all ()
}
-
/**
* Experiments
*/
@@ -1983,6 +1991,7 @@ load_op_start_set_property (struct GNUNET_ATS_TEST_Operation *o,
return GNUNET_OK;
}
+
static int
load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
struct Episode *e,
@@ -2078,6 +2087,7 @@ load_op_start_request (struct GNUNET_ATS_TEST_Operation *o,
return GNUNET_OK;
}
+
static int
load_op_stop_request (struct GNUNET_ATS_TEST_Operation *o,
struct Episode *e,
@@ -2205,6 +2215,7 @@ load_episode (struct Experiment *e, struct Episode *cur,
return GNUNET_OK;
}
+
static int
load_episodes (struct Experiment *e, struct GNUNET_CONFIGURATION_Handle *cfg)
{
@@ -2280,6 +2291,7 @@ timeout_experiment (void *cls)
GNUNET_SYSERR);
}
+
struct ATS_Address *
create_ats_address (const struct GNUNET_PeerIdentity *peer,
const char *plugin_name,
@@ -2309,7 +2321,6 @@ create_ats_address (const struct GNUNET_PeerIdentity *peer,
}
-
static void
enforce_add_address (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -2413,6 +2424,7 @@ enforce_del_address (struct GNUNET_ATS_TEST_Operation *op)
GNUNET_free (a);
}
+
static void
enforce_start_property (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -2454,6 +2466,7 @@ enforce_start_property (struct GNUNET_ATS_TEST_Operation *op)
op->prop_type);
}
+
static void
enforce_stop_property (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -2477,6 +2490,7 @@ enforce_stop_property (struct GNUNET_ATS_TEST_Operation *op)
}
}
+
static void
enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -2509,6 +2523,7 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op)
op->frequency);
}
+
static void
enforce_stop_preference (struct GNUNET_ATS_TEST_Operation *op)
{
@@ -2581,7 +2596,9 @@ enforce_stop_request (struct GNUNET_ATS_TEST_Operation *op)
}
}
-static void enforce_episode (struct Episode *ep)
+
+static void
+enforce_episode (struct Episode *ep)
{
struct GNUNET_ATS_TEST_Operation *cur;
@@ -2719,6 +2736,7 @@ GNUNET_ATS_solvers_experimentation_run (struct Experiment *e,
enforce_episode (e->cur);
}
+
void
GNUNET_ATS_solvers_experimentation_stop (struct Experiment *e)
{
@@ -2872,7 +2890,6 @@ GNUNET_ATS_solvers_experimentation_load (char *filename)
}
-
/**
* Solver
*/
@@ -2892,6 +2909,7 @@ free_all_it (void *cls,
return GNUNET_OK;
}
+
void
GNUNET_ATS_solvers_solver_stop (struct SolverHandle *sh)
{
@@ -3178,6 +3196,7 @@ solver_info_cb (void *cls,
}
}
+
static void
solver_bandwidth_changed_cb (void *cls, struct ATS_Address *address)
{
@@ -3229,6 +3248,7 @@ solver_bandwidth_changed_cb (void *cls, struct ATS_Address *address)
return;
}
+
const double *
get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id)
{
@@ -3385,6 +3405,7 @@ done ()
end_now ();
}
+
static void
experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,
int success)
@@ -3398,6 +3419,7 @@ experiment_done_cb (struct Experiment *e, struct GNUNET_TIME_Relative duration,
GNUNET_SCHEDULER_add_now (&done, NULL);
}
+
static void
episode_done_cb (struct Episode *ep)
{
@@ -3405,7 +3427,6 @@ episode_done_cb (struct Episode *ep)
}
-
/**
* Do shutdown
*/
@@ -3424,6 +3445,7 @@ end_now ()
}
}
+
static void
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -3560,4 +3582,6 @@ main (int argc, char *argv[])
return res;
}
+
+
/* end of file ats-testing-experiment.c*/
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c
index fbef6f166..5e27ecbd0 100644
--- a/src/ats/gnunet-service-ats.c
+++ b/src/ats/gnunet-service-ats.c
@@ -94,7 +94,6 @@ handle_ats_start (void *cls,
}
-
/**
* Handle 'reservation request' messages from clients.
*
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 7c73cbf5b..e8a95c65e 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -712,5 +712,4 @@ GAS_handle_request_address_list (struct GNUNET_SERVICE_Client *client,
}
-
/* end of gnunet-service-ats_addresses.c */
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c
index 441c6610e..a4d7b36b6 100644
--- a/src/ats/gnunet-service-ats_performance.c
+++ b/src/ats/gnunet-service-ats_performance.c
@@ -278,4 +278,5 @@ GAS_performance_done ()
nc_pic = NULL;
}
+
/* end of gnunet-service-ats_performance.c */
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c
index c4367fb85..a50e9d5b7 100644
--- a/src/ats/gnunet-service-ats_reservations.c
+++ b/src/ats/gnunet-service-ats_reservations.c
@@ -213,4 +213,5 @@ GAS_reservations_done ()
GNUNET_CONTAINER_multipeermap_destroy (trackers);
}
+
/* end of gnunet-service-ats_reservations.c */
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c
index 5f10addaf..8e20f4454 100644
--- a/src/ats/perf_ats_solver.c
+++ b/src/ats/perf_ats_solver.c
@@ -530,6 +530,7 @@ perf_update_all_addresses (unsigned int cp, unsigned int ca, unsigned int
}
}
+
/**
* Create an address for a peer
*
@@ -818,6 +819,7 @@ solver_info_cb (void *cls,
}
}
+
/**
* Evaluate results for a specific iteration
*
@@ -1016,7 +1018,6 @@ write_all_iterations (void)
struct Result *cur_upd_res;
-
// fprintf (stderr, "P: %u I: %u == %p \n", c_peer, c_iteration, cur_res);
cur_full_res = ph.iterations_results[c_iteration].results_array[c_peer];
if (c_peer == 0)
@@ -1505,4 +1506,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of file perf_ats_solver.c */
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index a1e995013..f4324d238 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -773,8 +773,7 @@ update_active_address (struct GAS_PROPORTIONAL_Handle *s,
* suggest one. Therefore we have to disconnect the peer.
* The above call to "distribute_bandwidth_in_network()
* does not see 'current_address' so we need to trigger
- * the update here. */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ * the update here. */LOG (GNUNET_ERROR_TYPE_DEBUG,
"Disconnecting peer `%s'.\n",
GNUNET_i2s (peer));
s->env->bandwidth_changed_cb (s->env->cls,
diff --git a/src/ats/test_ats_api.c b/src/ats/test_ats_api.c
index 0ec1bbdef..390cafe0f 100644
--- a/src/ats/test_ats_api.c
+++ b/src/ats/test_ats_api.c
@@ -45,7 +45,11 @@ static struct Command test_commands[] = {
.properties = {
.scope = GNUNET_NT_LAN
}
+
+
}
+
+
},
/* 1: adding same address again should fail */
{
@@ -61,6 +65,8 @@ static struct Command test_commands[] = {
},
.expect_fail = 1
}
+
+
},
/* 2: some solver still require explicit start */
{
@@ -69,6 +75,8 @@ static struct Command test_commands[] = {
.details.request_connection_start = {
.pid = 0
}
+
+
},
/* 3: check we got an address */
{
@@ -76,6 +84,8 @@ static struct Command test_commands[] = {
.details.await_address_suggestion = {
.add_label = "add-address-0-0"
}
+
+
},
/* 4: check monitor also got the address */
{
@@ -83,6 +93,8 @@ static struct Command test_commands[] = {
.details.await_address_information = {
.add_label = "add-address-0-0"
}
+
+
},
/* 5: test session API */
{
@@ -92,12 +104,16 @@ static struct Command test_commands[] = {
.add_label = "add-address-0-0",
.session = 1
}
+
+
},
{
.code = CMD_DEL_SESSION,
.details.del_session = {
.add_session_label = "add-session-0-0-1",
}
+
+
},
/* 7: test preference API */
{
@@ -106,6 +122,8 @@ static struct Command test_commands[] = {
.pid = 0
/* FIXME: preference details */
}
+
+
},
{
.code = CMD_PROVIDE_FEEDBACK,
@@ -114,6 +132,8 @@ static struct Command test_commands[] = {
.scope = { 50LL }
/* FIXME: preference details */
}
+
+
},
/* 9: test sanity check address listing */
{
@@ -126,6 +146,8 @@ static struct Command test_commands[] = {
.min_active_calls = 1,
.max_active_calls = 1
}
+
+
},
/* 10: remove address testing */
{
@@ -133,6 +155,8 @@ static struct Command test_commands[] = {
.details.del_address = {
.add_label = "add-address-0-0"
}
+
+
},
/* 11: check we got disconnected */
{
@@ -140,6 +164,8 @@ static struct Command test_commands[] = {
.details.await_disconnect_suggestion = {
.pid = 0
}
+
+
},
/* 12: just for symmetry, also stop asking for the connection */
{
@@ -147,6 +173,8 @@ static struct Command test_commands[] = {
.details.request_connection_stop = {
.connect_label = "request-0",
}
+
+
},
/* 13: add address again */
{
@@ -159,7 +187,11 @@ static struct Command test_commands[] = {
.properties = {
.scope = GNUNET_NT_LAN
}
+
+
}
+
+
},
/* 14: some solver still require explicit start */
{
@@ -168,6 +200,8 @@ static struct Command test_commands[] = {
.details.request_connection_start = {
.pid = 0
}
+
+
},
/* 15: check we got an address */
{
@@ -175,6 +209,8 @@ static struct Command test_commands[] = {
.details.await_address_suggestion = {
.add_label = "add-address-0-0:1"
}
+
+
},
/* 16: add alternative address */
{
@@ -188,7 +224,11 @@ static struct Command test_commands[] = {
.properties = {
.scope = GNUNET_NT_LAN
}
+
+
}
+
+
},
/* 17: remove original address */
{
@@ -196,6 +236,8 @@ static struct Command test_commands[] = {
.details.del_address = {
.add_label = "add-address-0-0:1"
}
+
+
},
/* 18: check we switched to alternative address */
{
@@ -203,6 +245,8 @@ static struct Command test_commands[] = {
.details.await_address_suggestion = {
.add_label = "add-address-0-1"
}
+
+
},
/* 19: remove alternative address */
{
@@ -210,6 +254,8 @@ static struct Command test_commands[] = {
.details.del_address = {
.add_label = "add-address-0-1"
}
+
+
},
/* 20: check we got disconnected */
{
@@ -217,6 +263,8 @@ static struct Command test_commands[] = {
.details.await_disconnect_suggestion = {
.pid = 0
}
+
+
},
/* 21: just for symmetry, also stop asking for the connection */
{
@@ -224,6 +272,8 @@ static struct Command test_commands[] = {
.details.request_connection_stop = {
.connect_label = "request-0",
}
+
+
},
/* Test ends successfully */
{
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c
index cd512634d..2c4d3f5ad 100644
--- a/src/ats/test_ats_lib.c
+++ b/src/ats/test_ats_lib.c
@@ -146,7 +146,6 @@ static unsigned int off;
static struct Command *test_commands;
-
/**
* Free `struct AddressSuggestData` entry.
*
@@ -1104,4 +1103,5 @@ TEST_ATS_run (int argc,
return ret;
}
+
/* end of test_ats_lib.c */
diff --git a/src/ats/test_ats_reservation_api.c b/src/ats/test_ats_reservation_api.c
index ff924b3b4..46658007b 100644
--- a/src/ats/test_ats_reservation_api.c
+++ b/src/ats/test_ats_reservation_api.c
@@ -46,7 +46,11 @@ static struct Command test_commands[] = {
/* use network with 65k quota! */
.scope = GNUNET_NT_WAN
}
+
+
}
+
+
},
/* 1: some solver still require explicit start */
{
@@ -55,6 +59,8 @@ static struct Command test_commands[] = {
.details.request_connection_start = {
.pid = 0
}
+
+
},
/* 2: check we got an address */
{
@@ -62,6 +68,8 @@ static struct Command test_commands[] = {
.details.await_address_suggestion = {
.add_label = "add-address-0-0"
}
+
+
},
/* 3: sleep 7s, should give us 5s * 64k/s = 320k buffer;
Note that this depends on MAX_BANDWIDTH_CARRY_S. We
@@ -79,6 +87,8 @@ static struct Command test_commands[] = {
.amount = 128 * 1024,
.expected_result = GNUNET_YES
}
+
+
},
/* 5: reserve another 192k -- should just work (now exactly pushing the limit) */
{
@@ -89,6 +99,8 @@ static struct Command test_commands[] = {
.amount = 192 * 1024,
.expected_result = GNUNET_YES
}
+
+
},
/* 6: reserve another 32k -- should now fail (if MAX_BANDWIDTH_CARRY_S
is precisely observed) */
@@ -100,6 +112,8 @@ static struct Command test_commands[] = {
.amount = 32 * 1024,
.expected_result = GNUNET_SYSERR
}
+
+
},
/* 7: sleep 3s, should give us 3s * 64k/s - 32k = 160k buffer */
{
@@ -116,6 +130,8 @@ static struct Command test_commands[] = {
.amount = 160 * 1024,
.expected_result = GNUNET_YES
}
+
+
},
/* 9: remove address */
{
@@ -123,6 +139,8 @@ static struct Command test_commands[] = {
.details.del_address = {
.add_label = "add-address-0-0"
}
+
+
},
/* 10: check we got disconnected */
{
@@ -130,6 +148,8 @@ static struct Command test_commands[] = {
.details.await_disconnect_suggestion = {
.pid = 0
}
+
+
},
/* 11: just for symmetry, also stop asking for the connection */
{
@@ -137,6 +157,8 @@ static struct Command test_commands[] = {
.details.request_connection_stop = {
.connect_label = "request-0",
}
+
+
},
/* Test ends successfully */
{
diff --git a/src/auction/gnunet-auction-info.c b/src/auction/gnunet-auction-info.c
index 05bee50ef..5a3587a40 100644
--- a/src/auction/gnunet-auction-info.c
+++ b/src/auction/gnunet-auction-info.c
@@ -82,4 +82,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-auction.c */
diff --git a/src/auction/gnunet-auction-join.c b/src/auction/gnunet-auction-join.c
index 05bee50ef..5a3587a40 100644
--- a/src/auction/gnunet-auction-join.c
+++ b/src/auction/gnunet-auction-join.c
@@ -82,4 +82,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-auction.c */
diff --git a/src/auction/test_auction_api.c b/src/auction/test_auction_api.c
index 0ec6f8cc8..1eac9b5c4 100644
--- a/src/auction/test_auction_api.c
+++ b/src/auction/test_auction_api.c
@@ -29,6 +29,7 @@ check ()
return 0;
}
+
int
main (int argc, char *argv[])
{
@@ -39,4 +40,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_auction_api.c */
diff --git a/src/block/block.c b/src/block/block.c
index dafba9d8c..5abe64e69 100644
--- a/src/block/block.c
+++ b/src/block/block.c
@@ -121,7 +121,6 @@ add_plugin (void *cls,
}
-
/**
* Create a block context. Loads the block plugins.
*
diff --git a/src/block/plugin_block_template.c b/src/block/plugin_block_template.c
index 21b8a9be6..ecd46e364 100644
--- a/src/block/plugin_block_template.c
+++ b/src/block/plugin_block_template.c
@@ -191,4 +191,5 @@ libgnunet_plugin_block_template_done (void *cls)
return NULL;
}
+
/* end of plugin_block_template.c */
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c
index b73e58cab..45d54d339 100644
--- a/src/block/plugin_block_test.c
+++ b/src/block/plugin_block_test.c
@@ -205,4 +205,5 @@ libgnunet_plugin_block_test_done (void *cls)
return NULL;
}
+
/* end of plugin_block_test.c */
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index 9aeedb616..68bd4c290 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -1121,4 +1121,5 @@ GNUNET_CADET_get_mq (const struct GNUNET_CADET_Channel *channel)
return channel->mq;
}
+
/* end of cadet_api.c */
diff --git a/src/cadet/cadet_api_get_channel.c b/src/cadet/cadet_api_get_channel.c
index 6d86e8e81..05e2a8383 100644
--- a/src/cadet/cadet_api_get_channel.c
+++ b/src/cadet/cadet_api_get_channel.c
@@ -256,4 +256,5 @@ GNUNET_CADET_get_channel_cancel (struct GNUNET_CADET_ChannelMonitor *cm)
return ret;
}
+
/* end of cadet_api_get_channel.c */
diff --git a/src/cadet/cadet_api_list_peers.c b/src/cadet/cadet_api_list_peers.c
index 8865b6f57..52f59cc74 100644
--- a/src/cadet/cadet_api_list_peers.c
+++ b/src/cadet/cadet_api_list_peers.c
@@ -234,4 +234,5 @@ GNUNET_CADET_list_peers_cancel (struct GNUNET_CADET_PeersLister *pl)
return ret;
}
+
/* end of cadet_api_list_peers.c */
diff --git a/src/cadet/cadet_test_lib.c b/src/cadet/cadet_test_lib.c
index 490e6539b..9c7b9063d 100644
--- a/src/cadet/cadet_test_lib.c
+++ b/src/cadet/cadet_test_lib.c
@@ -372,4 +372,5 @@ GNUNET_CADET_TEST_ruN (const char *testname,
ctx);
}
+
/* end of cadet_test_lib.c */
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c
index e66761e1e..c3a19a399 100644
--- a/src/cadet/gnunet-cadet-profiler.c
+++ b/src/cadet/gnunet-cadet-profiler.c
@@ -407,6 +407,7 @@ abort_test (long line)
}
}
+
/**
* Stats callback. Finish the stats testbed operation and when all stats have
* been iterated, shutdown the test.
@@ -615,7 +616,7 @@ tmt_rdy_pong (void *cls, size_t size, void *buf)
struct CadetPingMessage *ping = cls;
struct CadetPingMessage *pong;
- if ((0 == size)||(NULL == buf))
+ if ((0 == size) || (NULL == buf))
{
GNUNET_free (ping);
return 0;
@@ -654,6 +655,7 @@ ping (void *cls)
&tmt_rdy_ping, peer);
}
+
/**
* @brief Reply with a pong to origin.
*
@@ -691,7 +693,7 @@ tmt_rdy_ping (void *cls, size_t size, void *buf)
peer->ping_ntr = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"tmt_rdy called, filling buffer\n");
- if ((size < sizeof(struct CadetPingMessage))||(NULL == buf))
+ if ((size < sizeof(struct CadetPingMessage)) || (NULL == buf))
{
GNUNET_break (GNUNET_YES == test_finished);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -857,6 +859,7 @@ incoming_channel (void *cls, struct GNUNET_CADET_Channel *channel,
return NULL;
}
+
/**
* Function called whenever an inbound channel is destroyed. Should clean up
* any associated state.
@@ -903,6 +906,7 @@ select_random_peer (struct CadetPeer *peer)
return &peers[r];
}
+
/**
* START THE TEST ITSELF, AS WE ARE CONNECTED TO THE CADET SERVICES.
*
@@ -999,7 +1003,7 @@ peer_id_cb (void *cls,
{
long n = (long) cls;
- if ((NULL == pinfo)||(NULL != emsg))
+ if ((NULL == pinfo) || (NULL != emsg))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "pi_cb: %s\n", emsg);
abort_test (__LINE__);
@@ -1151,4 +1155,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of gnunet-cadet-profiler.c */
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c
index d85a3c6ba..f3ccd9883 100644
--- a/src/cadet/gnunet-cadet.c
+++ b/src/cadet/gnunet-cadet.c
@@ -265,6 +265,7 @@ shutdown_task (void *cls)
}
}
+
void
mq_cb (void *cls)
{
@@ -676,7 +677,7 @@ run (void *cls,
if (target_id && args[1])
target_port = args[1];
- if (((0 != (request_peers | request_tunnels))||(NULL != conn_id)||
+ if (((0 != (request_peers | request_tunnels)) || (NULL != conn_id) ||
(NULL != channel_id) ) &&
(target_id != NULL) )
{
@@ -846,4 +847,5 @@ main (int argc, char *const *argv)
return 1;
}
+
/* end of gnunet-cadet.c */
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index c64da33e2..ba83fe0fc 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -688,9 +688,7 @@ check_local_data (void *cls,
ONE payload item or multiple? Seems current cadet_api
at least in theory allows more than one. Next-gen
cadet_api will likely no more, so we could then
- simplify this mess again. */
- /* Sanity check for message size */
- payload_size = ntohs (msg->header.size) - sizeof(*msg);
+ simplify this mess again. *//* Sanity check for message size */payload_size = ntohs (msg->header.size) - sizeof(*msg);
buf = (const char *) &msg[1];
while (payload_size >= sizeof(struct GNUNET_MessageHeader))
{
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 0a261039c..a2c710cbc 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1238,8 +1238,7 @@ GCCH_handle_channel_plaintext_data (
* - The channel is out-of-order
* - The channel is reliable and MID matches next expected MID
* - The channel is unreliable and MID is before lowest seen MID
- */
- if ((GNUNET_YES == ch->out_of_order) ||
+ */if ((GNUNET_YES == ch->out_of_order) ||
((msg->mid.mid == ch->mid_recv.mid) && (GNUNET_YES == ch->reliable)) ||
((GNUNET_NO == ch->reliable) &&
(ntohl (msg->mid.mid) >= ntohl (ch->mid_recv.mid)) &&
@@ -1415,8 +1414,7 @@ GCCH_handle_channel_plaintext_data (
the case above if "delta" >= 64, which could be the case if
max_pending_messages is also >= 64 or if our client is unready
and we are seeing retransmissions of the message our client is
- blocked on. */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ blocked on. */LOG (GNUNET_ERROR_TYPE_DEBUG,
"Duplicate payload of %u bytes on %s (mid %u) dropped\n",
(unsigned int) payload_size,
GCCH_2s (ch),
diff --git a/src/cadet/gnunet-service-cadet_channel.h b/src/cadet/gnunet-service-cadet_channel.h
index 181c6e88b..0a6c97329 100644
--- a/src/cadet/gnunet-service-cadet_channel.h
+++ b/src/cadet/gnunet-service-cadet_channel.h
@@ -183,7 +183,6 @@ GCCH_handle_duplicate_open (struct CadetChannel *ch,
GNUNET_CADET_ConnectionTunnelIdentifier *cti);
-
/**
* We got payload data for a channel. Pass it on to the client.
*
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 66dc20481..c07339ebc 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1053,4 +1053,5 @@ GCC_debug (struct CadetConnection *cc, enum GNUNET_ErrorType level)
#endif
}
+
/* end of gnunet-service-cadet_connection.c */
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c
index 7d1791f3c..d54022896 100644
--- a/src/cadet/gnunet-service-cadet_core.c
+++ b/src/cadet/gnunet-service-cadet_core.c
@@ -1333,4 +1333,5 @@ GCO_shutdown ()
}
}
+
/* end of gnunet-cadet-service_core.c */
diff --git a/src/cadet/gnunet-service-cadet_dht.c b/src/cadet/gnunet-service-cadet_dht.c
index 3bb86cae4..4e8ccbb08 100644
--- a/src/cadet/gnunet-service-cadet_dht.c
+++ b/src/cadet/gnunet-service-cadet_dht.c
@@ -349,4 +349,5 @@ GCD_search_stop (struct GCD_search_handle *h)
GNUNET_free (h);
}
+
/* end of gnunet-service-cadet_dht.c */
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index bbe947ad1..21870a454 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -146,4 +146,5 @@ GCH_get_mine (void)
return mine;
}
+
/* end of gnunet-service-cadet-new_hello.c */
diff --git a/src/cadet/gnunet-service-cadet_paths.c b/src/cadet/gnunet-service-cadet_paths.c
index e4a8dc789..087515a5e 100644
--- a/src/cadet/gnunet-service-cadet_paths.c
+++ b/src/cadet/gnunet-service-cadet_paths.c
@@ -156,7 +156,6 @@ GCPP_add_connection (struct CadetPeerPath *path,
}
-
/**
* Notify @a path that it is no longer used for connection @a cc which
* ended at the path's offset @a off.
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 52a0c2bd3..8258881d0 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -1250,6 +1250,7 @@ GCP_iterate_paths (struct CadetPeer *cp,
return ret;
}
+
/**
* Iterate over the paths to a peer without direct link.
*
@@ -1552,6 +1553,4 @@ GCP_send_ooo (struct CadetPeer *cp,
}
-
-
/* end of gnunet-service-cadet-new_peer.c */
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c
index 6f2dd1d8d..d7c7f278e 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.c
+++ b/src/cadet/gnunet-service-cadet_tunnels.c
@@ -1922,6 +1922,7 @@ test_crypto_bug (const struct GNUNET_CRYPTO_EcdhePrivateKey *e1,
check_ed (e2, d1);
}
+
#endif
@@ -2064,7 +2065,6 @@ GCT_handle_kx_auth (struct CadetTConnection *ct,
}
-
/* ************************************** end core crypto ***************************** */
@@ -2828,8 +2828,7 @@ maintain_connections_cb (void *cls)
restarted after that happens).
Furthermore, if the paths we do know are in a reasonably narrow
quality band and are plentyful, we might also consider us stabilized
- and then reduce the frequency accordingly. */
- delay = GNUNET_TIME_UNIT_MINUTES;
+ and then reduce the frequency accordingly. */delay = GNUNET_TIME_UNIT_MINUTES;
t->maintain_connections_task
= GNUNET_SCHEDULER_add_delayed (delay,
&maintain_connections_cb,
@@ -3398,8 +3397,7 @@ GCT_handle_encrypted (struct CadetTConnection *ct,
this increment if we successfully decrypted with the old KX
material and thus didn't even both with the new one. This is
the ideal case, as a malicious injection of bogus KX data
- basically only causes us to increment a counter a few times. */
- t->unverified_attempts++;
+ basically only causes us to increment a counter a few times. */t->unverified_attempts++;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Failed to decrypt message with unverified KX data %u times\n",
t->unverified_attempts);
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 354593c4b..25713709c 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -263,7 +263,7 @@ static unsigned int msg_dropped;
static struct GNUNET_CADET_Channel *
get_target_channel ()
{
- if ((SPEED == test)&&(GNUNET_YES == test_backwards))
+ if ((SPEED == test) && (GNUNET_YES == test_backwards))
return outgoing_ch;
else
return incoming_ch;
@@ -383,7 +383,7 @@ stats_cont (void *cls,
"KA sent: %u, KA received: %u\n",
ka_sent,
ka_received);
- if (((KEEPALIVE == test)||(REOPEN == test)) &&
+ if (((KEEPALIVE == test) || (REOPEN == test)) &&
((ka_sent < 2) || (ka_sent > ka_received + 1)))
{
GNUNET_break (0);
@@ -426,10 +426,10 @@ stats_iterator (void *cls,
i = GNUNET_TESTBED_get_index (peer);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "STATS PEER %u - %s [%s]: %llu\n", i,
subsystem, name, (unsigned long long) value);
- if ((0 == strncmp (s_sent, name, strlen (s_sent)))&&(0 == i))
+ if ((0 == strncmp (s_sent, name, strlen (s_sent))) && (0 == i))
ka_sent = value;
- if ((0 == strncmp (s_recv, name, strlen (s_recv)))&&(peers_requested - 1 ==
- i) )
+ if ((0 == strncmp (s_recv, name, strlen (s_recv))) && (peers_requested - 1 ==
+ i) )
ka_received = value;
if (0 == strncmp (rdrops, name, strlen (rdrops)))
msg_dropped += value;
@@ -556,6 +556,7 @@ reconnect_op (void *cls)
send_test_message (outgoing_ch);
}
+
/**
* Function called whenever an MQ-channel is destroyed, unless the destruction
* was requested by #GNUNET_CADET_channel_destroy.
@@ -594,14 +595,14 @@ disconnect_handler (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Unknown channel! %p\n",
channel);
- if ((NULL != disconnect_task)&&(REOPEN != test))
+ if ((NULL != disconnect_task) && (REOPEN != test))
{
GNUNET_SCHEDULER_cancel (disconnect_task);
disconnect_task =
GNUNET_SCHEDULER_add_now (&gather_stats_and_exit,
(void *) __LINE__);
}
- else if ((NULL != reconnect_task)&&(REOPEN == test))
+ else if ((NULL != reconnect_task) && (REOPEN == test))
{
GNUNET_SCHEDULER_cancel (reconnect_task);
reconnect_task =
@@ -661,7 +662,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel)
if (SPEED_ACK == test) // FIXME unify SPEED_ACK with an initializer
data_sent++;
}
- else if ((SPEED == test)||(SPEED_ACK == test))
+ else if ((SPEED == test) || (SPEED_ACK == test))
{
if (get_target_channel () == channel)
{
@@ -860,7 +861,7 @@ handle_data (void *cls,
if (get_target_channel () == channel) /* Got "data" */
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received data %u\n", data_received);
- if ((SPEED != test) ||( (ok_goal - 2) == ok) )
+ if ((SPEED != test) || ( (ok_goal - 2) == ok) )
{
/* Send ACK */
send_test_message (channel);
@@ -874,14 +875,14 @@ handle_data (void *cls,
}
else /* Got "ack" */
{
- if ((SPEED_ACK == test) ||(SPEED == test) )
+ if ((SPEED_ACK == test) || (SPEED == test) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received ack %u\n", ack_received);
/* Send more data */
send_test_message (channel);
- if ((ack_received < total_packets) &&(SPEED != test) )
+ if ((ack_received < total_packets) && (SPEED != test) )
return;
- if ((ok == 2) &&(SPEED == test) )
+ if ((ok == 2) && (SPEED == test) )
return;
show_end_data ();
}
@@ -946,7 +947,7 @@ connect_handler (void *cls,
(long) cls);
GNUNET_assert (0);
}
- if ((NULL != disconnect_task)&&(REOPEN != test))
+ if ((NULL != disconnect_task) && (REOPEN != test))
{
GNUNET_SCHEDULER_cancel (disconnect_task);
disconnect_task = GNUNET_SCHEDULER_add_delayed (short_time,
@@ -1223,8 +1224,7 @@ main (int argc, char *argv[])
* total_packets received data packet (@dest)
* total_packets received data packet (@orig)
* 1 received channel destroy (@dest) FIXME #5818
- */
- ok_goal = total_packets * 2 + 2;
+ */ok_goal = total_packets * 2 + 2;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SPEED_ACK\n");
test = SPEED_ACK;
test_name = "speed ack";
@@ -1237,8 +1237,7 @@ main (int argc, char *argv[])
* total_packets received data packet (@dest)
* 1 received data packet (@orig)
* 1 received channel destroy (@dest) FIXME #5818
- */
- ok_goal = total_packets + 4;
+ */ok_goal = total_packets + 4;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "SPEED\n");
if (strstr (argv[0], "_reliable") != NULL)
{
@@ -1260,8 +1259,7 @@ main (int argc, char *argv[])
* 1 incoming channel (@dest)
* [wait]
* 1 received channel destroy (@dest) FIXME #5818
- */
- ok_goal = 1;
+ */ok_goal = 1;
}
else if (strstr (argv[0], "_reopen") != NULL)
{
@@ -1313,4 +1311,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_cadet.c */
diff --git a/src/cadet/test_cadet_flow.c b/src/cadet/test_cadet_flow.c
index 94e1f1c85..2fbdd8d50 100644
--- a/src/cadet/test_cadet_flow.c
+++ b/src/cadet/test_cadet_flow.c
@@ -333,10 +333,10 @@ stats_iterator (void *cls,
i = GNUNET_TESTBED_get_index (peer);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "STATS PEER %u - %s [%s]: %llu\n", i,
subsystem, name, (unsigned long long) value);
- if ((0 == strncmp (s_sent, name, strlen (s_sent)))&&(0 == i))
+ if ((0 == strncmp (s_sent, name, strlen (s_sent))) && (0 == i))
ka_sent = value;
- if ((0 == strncmp (s_recv, name, strlen (s_recv)))&&(peers_requested - 1 ==
- i) )
+ if ((0 == strncmp (s_recv, name, strlen (s_recv))) && (peers_requested - 1 ==
+ i) )
ka_received = value;
if (0 == strncmp (rdrops, name, strlen (rdrops)))
msg_dropped += value;
@@ -425,7 +425,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel)
if (SPEED_ACK == test) // FIXME unify SPEED_ACK with an initializer
data_sent++;
}
- else if ((SPEED == test)||(SPEED_ACK == test))
+ else if ((SPEED == test) || (SPEED_ACK == test))
{
if (get_target_channel () == channel)
{
@@ -577,14 +577,14 @@ handle_data (void *cls,
}
else /* Got "ack" */
{
- if ((SPEED_ACK == test) ||(SPEED == test) )
+ if ((SPEED_ACK == test) || (SPEED == test) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, " received ack %u\n", ack_received);
/* Send more data */
send_test_message (channel);
- if ((ack_received < total_packets) &&(SPEED != test) )
+ if ((ack_received < total_packets) && (SPEED != test) )
return;
- if ((ok == 2) &&(SPEED == test) )
+ if ((ok == 2) && (SPEED == test) )
return;
show_end_data ();
}
@@ -887,4 +887,5 @@ main (int argc,
return 0;
}
+
/* end of test_cadet_flow.c */
diff --git a/src/cadet/test_cadet_local_mq.c b/src/cadet/test_cadet_local_mq.c
index c56b510ae..6f75dfd1f 100644
--- a/src/cadet/test_cadet_local_mq.c
+++ b/src/cadet/test_cadet_local_mq.c
@@ -131,6 +131,7 @@ do_abort (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Method called whenever a peer connects to a port in MQ-based CADET.
*
@@ -155,6 +156,7 @@ connected (void *cls,
return channel;
}
+
/**
* Function called whenever an MQ-channel is destroyed, even if the destruction
* was requested by #GNUNET_CADET_channel_destroy.
@@ -332,4 +334,5 @@ main (int argc, char *argv[])
return (result == GNUNET_OK) ? 0 : 1;
}
+
/* end of test_cadet_local_1.c */
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c
index c4350adaf..06b4c88ef 100644
--- a/src/consensus/consensus_api.c
+++ b/src/consensus/consensus_api.c
@@ -259,6 +259,7 @@ idc_adapter (void *cls)
GNUNET_free (i);
}
+
/**
* Insert an element in the set being reconsiled. Must not be called after
* "GNUNET_CONSENSUS_conclude".
@@ -344,4 +345,5 @@ GNUNET_CONSENSUS_destroy (struct GNUNET_CONSENSUS_Handle *consensus)
GNUNET_free (consensus);
}
+
/* end of consensus_api.c */
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 8ef70eee8..160d352d7 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -100,7 +100,6 @@ struct TaskKey
};
-
struct SetKey
{
int set_kind GNUNET_PACKED;
@@ -403,7 +402,6 @@ struct SetHandle
};
-
/**
* A consensus session consists of one local client and the remote authorities.
*/
@@ -590,6 +588,7 @@ setname (uint16_t kind)
}
}
+
static const char *
rfnname (uint16_t kind)
{
@@ -605,6 +604,7 @@ rfnname (uint16_t kind)
}
}
+
static const char *
diffname (uint16_t kind)
{
@@ -622,6 +622,7 @@ diffname (uint16_t kind)
}
}
+
#ifdef GNUNET_EXTRA_LOGGING
@@ -635,6 +636,7 @@ debug_str_element (const struct GNUNET_SET_Element *el)
return GNUNET_h2s (&hash);
}
+
static const char *
debug_str_task_key (struct TaskKey *tk)
{
@@ -648,6 +650,7 @@ debug_str_task_key (struct TaskKey *tk)
return buf;
}
+
static const char *
debug_str_diff_key (struct DiffKey *dk)
{
@@ -660,6 +663,7 @@ debug_str_diff_key (struct DiffKey *dk)
return buf;
}
+
static const char *
debug_str_set_key (const struct SetKey *sk)
{
@@ -685,6 +689,7 @@ debug_str_rfn_key (const struct RfnKey *rk)
return buf;
}
+
#endif /* GNUNET_EXTRA_LOGGING */
@@ -1192,6 +1197,7 @@ set_result_cb (void *cls,
}
}
+
#ifdef EVIL
enum EvilnessType
@@ -1349,6 +1355,7 @@ cleanup:
free (evil_subtype_str);
}
+
#endif
@@ -1538,6 +1545,7 @@ put_diff (struct ConsensusSession *session,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
+
static void
put_set (struct ConsensusSession *session,
struct SetEntry *set)
@@ -1570,7 +1578,6 @@ put_rfn (struct ConsensusSession *session,
}
-
static void
task_cancel_reconcile (struct TaskEntry *task)
{
@@ -1676,6 +1683,8 @@ diff_destroy (struct DiffEntry *diff)
GNUNET_CONTAINER_multihashmap_destroy (diff->changes);
GNUNET_free (diff);
}
+
+
#endif
@@ -1882,7 +1891,6 @@ finish_step (struct Step *step)
}
-
/**
* Apply the result from one round of gradecasts (i.e. every peer
* should have gradecasted) to the peer's current set.
@@ -2326,8 +2334,7 @@ task_start_eval_echo (struct TaskEntry *task)
can't simply send "nothing" for the value. Thus we mark our 'confirm'
reconciliation as contested. Other peers might not know that the
leader is faulty, thus we still re-distribute in the confirmation
- round. */
- output_set->is_contested = GNUNET_YES;
+ round. */output_set->is_contested = GNUNET_YES;
}
switch (majority_vote)
@@ -2387,6 +2394,7 @@ task_start_finish (struct TaskEntry *task)
task);
}
+
static void
start_task (struct ConsensusSession *session, struct TaskEntry *task)
{
@@ -2403,8 +2411,6 @@ start_task (struct ConsensusSession *session, struct TaskEntry *task)
}
-
-
/*
* Run all steps of the session that don't any
* more dependencies.
@@ -2452,7 +2458,6 @@ run_ready_steps (struct ConsensusSession *session)
}
-
static void
finish_task (struct TaskEntry *task)
{
@@ -2703,7 +2708,6 @@ set_listen_cb (void *cls,
}
-
static void
put_task (struct GNUNET_CONTAINER_MultiHashMap *taskmap,
struct TaskEntry *t)
@@ -2754,7 +2758,6 @@ install_step_timeouts (struct ConsensusSession *session)
}
-
/*
* Arrange two peers in some canonical order.
*/
@@ -3134,7 +3137,6 @@ construct_task_graph (struct ConsensusSession *session)
step = NULL;
-
/* Byzantine union */
/* sequential repetitions of the gradecasts */
@@ -3193,7 +3195,6 @@ construct_task_graph (struct ConsensusSession *session)
}
-
/**
* Check join message.
*
diff --git a/src/consensus/plugin_block_consensus.c b/src/consensus/plugin_block_consensus.c
index 1caf4fc39..fb6da5bcd 100644
--- a/src/consensus/plugin_block_consensus.c
+++ b/src/consensus/plugin_block_consensus.c
@@ -134,4 +134,5 @@ libgnunet_plugin_block_consensus_done (void *cls)
return NULL;
}
+
/* end of plugin_block_consensus.c */
diff --git a/src/consensus/test_consensus_api.c b/src/consensus/test_consensus_api.c
index d32bc06ed..235a67484 100644
--- a/src/consensus/test_consensus_api.c
+++ b/src/consensus/test_consensus_api.c
@@ -44,6 +44,7 @@ conclude_done (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
static void
on_new_element (void *cls,
const struct GNUNET_SET_Element *element)
@@ -51,6 +52,7 @@ on_new_element (void *cls,
elements_received++;
}
+
static void
insert_done (void *cls, int success)
{
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c
index eb070e56e..daf51042a 100644
--- a/src/conversation/conversation_api.c
+++ b/src/conversation/conversation_api.c
@@ -62,7 +62,6 @@ enum CallerState
};
-
/**
* A caller is the handle we have for an incoming call.
*/
@@ -867,4 +866,5 @@ GNUNET_CONVERSATION_caller_resume (struct GNUNET_CONVERSATION_Caller *caller,
}
}
+
/* end of conversation_api.c */
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c
index c03723fc3..307b55435 100644
--- a/src/conversation/gnunet-conversation-test.c
+++ b/src/conversation/gnunet-conversation-test.c
@@ -261,4 +261,5 @@ main (int argc,
return ret;
}
+
/* end of gnunet-conversation-test.c */
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c
index 0b04ba38e..6c0a6e42f 100644
--- a/src/conversation/gnunet-conversation.c
+++ b/src/conversation/gnunet-conversation.c
@@ -258,8 +258,7 @@ phone_event_handler (void *cls,
ring_my_bell();
*
* see https://gstreamer.freedesktop.org/documentation/application-development/highlevel/playback-components.html on how to play a wav using the gst framework being used here
- */
- fprintf (
+ */fprintf (
stdout,
_ (
"Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n"),
@@ -1229,4 +1228,5 @@ main (int argc, char *const *argv)
return (GNUNET_OK == ret) ? 0 : 1;
}
+
/* end of gnunet-conversation.c */
diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c
index d7e1cd036..dfa400d71 100644
--- a/src/conversation/gnunet-helper-audio-playback.c
+++ b/src/conversation/gnunet-helper-audio-playback.c
@@ -262,6 +262,7 @@ write_wav_header ()
return ! ret ? -1 : 16;
}
+
#endif
@@ -397,7 +398,7 @@ ogg_demux_and_decode ()
{
/*OggOpus streams are identified by a magic string in the initial
stream header.*/
- if (op.b_o_s &&(op.bytes >= 8) && ! memcmp (op.packet, "OpusHead", 8))
+ if (op.b_o_s && (op.bytes >= 8) && ! memcmp (op.packet, "OpusHead", 8))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Got Opus Header\n");
@@ -418,7 +419,7 @@ ogg_demux_and_decode ()
}
if (! has_opus_stream)
{
- if ((packet_count > 0) &&(opus_serialno == os.serialno) )
+ if ((packet_count > 0) && (opus_serialno == os.serialno) )
{
fprintf (stderr,
"\nError: Apparent chaining without changing serial number (%"
@@ -443,7 +444,7 @@ ogg_demux_and_decode ()
(int64_t) os.serialno);
}
}
- if (! has_opus_stream ||(os.serialno != opus_serialno) )
+ if (! has_opus_stream || (os.serialno != opus_serialno) )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"breaking out\n");
@@ -458,9 +459,9 @@ ogg_demux_and_decode ()
if (! dec)
quit (1);
- if ((0 != ogg_stream_packetout (&os, &op)) ||(255 ==
- og.header[og.header_len
- - 1]) )
+ if ((0 != ogg_stream_packetout (&os, &op)) || (255 ==
+ og.header[og.header_len
+ - 1]) )
{
/*The format specifies that the initial header and tags packets are on their
own pages. To aid implementors in discovering that their files are wrong
@@ -490,9 +491,9 @@ ogg_demux_and_decode ()
else if (1 == packet_count)
{
has_tags_packet = 1;
- if ((0 != ogg_stream_packetout (&os, &op)) ||(255 ==
- og.header[og.header_len
- - 1]) )
+ if ((0 != ogg_stream_packetout (&os, &op)) || (255 ==
+ og.header[og.header_len
+ - 1]) )
{
fprintf (stderr,
"Extra packets on initial tags page. Invalid stream.\n");
@@ -506,7 +507,7 @@ ogg_demux_and_decode ()
int64_t outsamp;
/*End of stream condition*/
- if (op.e_o_s &&(os.serialno == opus_serialno) )
+ if (op.e_o_s && (os.serialno == opus_serialno) )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Got EOS\n");
diff --git a/src/conversation/gnunet-helper-audio-record-gst.c b/src/conversation/gnunet-helper-audio-record-gst.c
index a3607014e..883dd9eea 100644
--- a/src/conversation/gnunet-helper-audio-record-gst.c
+++ b/src/conversation/gnunet-helper-audio-record-gst.c
@@ -108,6 +108,7 @@ quit ()
gst_element_set_state (pipeline, GST_STATE_NULL);
}
+
static gboolean
bus_call (GstBus *bus, GstMessage *msg, gpointer data)
{
@@ -141,6 +142,7 @@ bus_call (GstBus *bus, GstMessage *msg, gpointer data)
return TRUE;
}
+
void
source_child_added (GstChildProxy *child_proxy, GObject *object, gchar *name,
gpointer user_data)
@@ -150,6 +152,7 @@ source_child_added (GstChildProxy *child_proxy, GObject *object, gchar *name,
(gint64) LATENCY_TIME, NULL);
}
+
static void
signalhandler (int s)
{
diff --git a/src/conversation/gnunet-helper-audio-record.c b/src/conversation/gnunet-helper-audio-record.c
index 16311cf69..633030a64 100644
--- a/src/conversation/gnunet-helper-audio-record.c
+++ b/src/conversation/gnunet-helper-audio-record.c
@@ -774,6 +774,7 @@ ogg_init ()
}
}
+
/**
* The main function for the record helper.
*
diff --git a/src/conversation/gnunet_gst.c b/src/conversation/gnunet_gst.c
index 7703215bb..d776189cd 100644
--- a/src/conversation/gnunet_gst.c
+++ b/src/conversation/gnunet_gst.c
@@ -62,6 +62,7 @@ BREAKOUT:
return;
}
+
/***
* load gnunet configuration
*/
@@ -142,6 +143,7 @@ gg_load_configuration (GNUNET_gstData *d)
// GNUNET_CONFIGURATION_write(cfg, "mediahelper.conf");
}
+
static void
write_data (const char *ptr, size_t msg_size)
{
@@ -163,7 +165,6 @@ write_data (const char *ptr, size_t msg_size)
}
-
extern GstFlowReturn
on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
{
@@ -179,9 +180,7 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
char *si_str;
GstCaps *s_caps;
char *caps_str;
- */
-
- if (gst_app_sink_is_eos (GST_APP_SINK (element)))
+ */if (gst_app_sink_is_eos (GST_APP_SINK (element)))
return GST_FLOW_OK;
// pull sample from appsink
@@ -198,7 +197,6 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
GST_WARNING ("caps are %" GST_PTR_FORMAT, gst_sample_get_caps (s));
-
gst_buffer_map (b, &map, GST_MAP_READ);
size_t len;
@@ -226,6 +224,7 @@ on_appsink_new_sample (GstElement *element, GNUNET_gstData *d)
return GST_FLOW_OK;
}
+
/***
* Dump a pipeline graph
*/
@@ -248,7 +247,6 @@ pl_graph (GstElement *pipeline)
}
-
extern gboolean
gnunet_gst_bus_call (GstBus *bus, GstMessage *msg, gpointer data)
{
@@ -286,6 +284,7 @@ gnunet_gst_bus_call (GstBus *bus, GstMessage *msg, gpointer data)
return TRUE;
}
+
/* called when pipeline changes state */
extern void
state_changed_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *d)
@@ -326,6 +325,7 @@ state_changed_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *d)
}
}
+
static void
application_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -333,6 +333,7 @@ application_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
static void
error_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -340,6 +341,7 @@ error_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
static void
eos_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
{
@@ -347,6 +349,7 @@ eos_cb (GstBus *bus, GstMessage *msg, GNUNET_gstData *data)
return;
}
+
extern void
gg_setup_gst_bus (GNUNET_gstData *d)
{
@@ -367,6 +370,7 @@ gg_setup_gst_bus (GNUNET_gstData *d)
gst_object_unref (bus);
}
+
/*
* take buffer from gstreamer and feed it to gnunet
*/
@@ -543,7 +547,6 @@ feed_buffer_to_gst (const char *audio, size_t b_len, GNUNET_gstData *d)
}
-
/**
* debug making elements
*/
@@ -567,6 +570,7 @@ gst_element_factory_make_debug (gchar *factoryname, gchar *name)
}
}
+
/*
static gboolean
gst_element_link_many_debug(...)
@@ -585,6 +589,7 @@ lf (char *msg)
exit (10);
}
+
/***
* used to set properties on autoaudiosink's chosen sink
*/
@@ -601,6 +606,7 @@ autoaudiosink_child_added (GstChildProxy *child_proxy,
NULL);
}
+
/***
* used to set properties on autoaudiosource's chosen sink
*/
@@ -624,6 +630,7 @@ get_pipeline (GstElement *element)
return GST_ELEMENT (p);
}
+
static void
decoder_ogg_pad_added (GstElement *element,
GstPad *pad,
@@ -682,6 +689,7 @@ gnunet_read (GNUNET_gstData *d)
return 0;
}
+
/**
* Message callback
*
@@ -802,6 +810,7 @@ get_app (GNUNET_gstData *d, int type)
return bin;
}
+
extern GstBin *
get_coder (GNUNET_gstData *d, int type)
{
@@ -824,8 +833,7 @@ get_coder (GNUNET_gstData *d, int type)
"sprop-stereo", G_TYPE_STRING, "0",
"encoding-params", G_TYPE_STRING, "2",
NULL);
- */
- rtpcaps = gst_caps_new_simple ("application/x-rtp",
+ */ rtpcaps = gst_caps_new_simple ("application/x-rtp",
"media", G_TYPE_STRING, "audio",
"clock-rate", G_TYPE_INT, SAMPLING_RATE,
"encoding-name", G_TYPE_STRING, "OPUS",
@@ -1013,8 +1021,7 @@ get_audiobin (GNUNET_gstData *d, int type)
"enough-data",
G_CALLBACK(appsrc_enough_data),
NULL);
- */
-/*
+ *//*
g_signal_connect (queue,
"notify::current-level-bytes",
G_CALLBACK(queue_current_level),
@@ -1039,11 +1046,7 @@ get_audiobin (GNUNET_gstData *d, int type)
"pushing",
G_CALLBACK(queue_pushing),
NULL);
- */
- }
-
-
-
+ */ }
gst_bin_add_many (bin, conv, resampler, sink, NULL);
diff --git a/src/conversation/gnunet_gst_def.h b/src/conversation/gnunet_gst_def.h
index bbadc5f92..7bfcc5e53 100644
--- a/src/conversation/gnunet_gst_def.h
+++ b/src/conversation/gnunet_gst_def.h
@@ -84,7 +84,6 @@
// static struct AudioMessage *audio_message;
-
typedef struct GNUNET_gstData GNUNET_gstData;
struct GNUNET_gstData
{
@@ -106,8 +105,6 @@ struct GNUNET_gstData
};
-
-
#define DEBUG_READ_PURE_OGG 1
#define DEBUG_RECORD_PURE_OGG 1
diff --git a/src/conversation/gnunet_gst_test.c b/src/conversation/gnunet_gst_test.c
index 884b0fe83..98054797c 100644
--- a/src/conversation/gnunet_gst_test.c
+++ b/src/conversation/gnunet_gst_test.c
@@ -34,7 +34,6 @@ main (int argc, char *argv[])
GstElement *gnunetsrc, *gnunetsink, *source, *sink, *encoder, *decoder;
-
// audio_message = GNUNET_malloc (UINT16_MAX);
// audio_message->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);
@@ -51,9 +50,7 @@ main (int argc, char *argv[])
gst->audiobackend = JACK;
gst->dropsilence = TRUE;
gst->usertp = FALSE;
- */
- /* Initialize GStreamer */
- gst_init (&argc, &argv);
+ *//* Initialize GStreamer */gst_init (&argc, &argv);
gst->pipeline = GST_PIPELINE (gst_pipeline_new ("gnunet-media-helper"));
@@ -118,8 +115,7 @@ main (int argc, char *argv[])
GstFlowReturn flow;
flow = on_appsink_new_sample (gst->appsink, gst);
}
- */
- }
+ */}
if (type == SPEAKER)
{
while (1)
diff --git a/src/conversation/microphone.c b/src/conversation/microphone.c
index 5ab115c1f..a4a40796f 100644
--- a/src/conversation/microphone.c
+++ b/src/conversation/microphone.c
@@ -196,4 +196,5 @@ GNUNET_MICROPHONE_destroy (struct GNUNET_MICROPHONE_Handle *microphone)
GNUNET_free (microphone);
}
+
/* end of microphone.c */
diff --git a/src/conversation/plugin_gnsrecord_conversation.c b/src/conversation/plugin_gnsrecord_conversation.c
index 9f7299c15..2ea2f48f0 100644
--- a/src/conversation/plugin_gnsrecord_conversation.c
+++ b/src/conversation/plugin_gnsrecord_conversation.c
@@ -258,4 +258,5 @@ libgnunet_plugin_gnsrecord_conversation_done (void *cls)
return NULL;
}
+
/* end of plugin_gnsrecord_conversation.c */
diff --git a/src/conversation/speaker.c b/src/conversation/speaker.c
index 8703f269d..38eb1159c 100644
--- a/src/conversation/speaker.c
+++ b/src/conversation/speaker.c
@@ -185,4 +185,5 @@ GNUNET_SPEAKER_destroy (struct GNUNET_SPEAKER_Handle *speaker)
GNUNET_free (speaker);
}
+
/* end of speaker.c */
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c
index 66b800304..2b717367a 100644
--- a/src/conversation/test_conversation_api.c
+++ b/src/conversation/test_conversation_api.c
@@ -501,4 +501,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_conversation_api.c */
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c
index 53f700890..62e4109b0 100644
--- a/src/conversation/test_conversation_api_reject.c
+++ b/src/conversation/test_conversation_api_reject.c
@@ -354,4 +354,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_conversation_api_reject.c */
diff --git a/src/conversation/test_conversation_api_twocalls.c b/src/conversation/test_conversation_api_twocalls.c
index 71f97b1d7..fab49f7d7 100644
--- a/src/conversation/test_conversation_api_twocalls.c
+++ b/src/conversation/test_conversation_api_twocalls.c
@@ -633,4 +633,5 @@ main (int argc, char *argv[])
return 1;
}
+
/* end of test_conversation_api_twocalls.c */
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c
index 0d991f194..90777a7a8 100644
--- a/src/core/gnunet-core.c
+++ b/src/core/gnunet-core.c
@@ -204,4 +204,5 @@ main (int argc, char *const *argv)
return 1;
}
+
/* end of gnunet-core.c */
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 3828460dc..04e6d0141 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -501,8 +501,7 @@ handle_client_send (void *cls, const struct SendMessage *sm)
* (which triggered removal of the 'car') and now the client gives us a message
* just *before* the client learns about the disconnect. Theoretically, we
* might also now be *again* connected. So this can happen (but should be
- * rare). If it does happen, the message is discarded. */
- GNUNET_STATISTICS_update (GSC_stats,
+ * rare). If it does happen, the message is discarded. */GNUNET_STATISTICS_update (GSC_stats,
gettext_noop (
"# messages discarded (session disconnected)"),
1,
@@ -806,8 +805,7 @@ GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
and a 99% chance of being kept if we are at the soft max.
The reason is to make it more likely to drop control traffic
(ACK, queries) which may be cummulative or highly redundant,
- and cheap to drop than data traffic. */
- qlen = GNUNET_MQ_get_length (c->mq);
+ and cheap to drop than data traffic. */qlen = GNUNET_MQ_get_length (c->mq);
if ((qlen >= HARD_MAX_QUEUE) ||
((qlen > SOFT_MAX_QUEUE) &&
((GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 503d4600f..6c446fc7c 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -1039,4 +1039,5 @@ GSC_SESSIONS_done ()
}
}
+
/* end of gnunet-service-core_sessions.c */
diff --git a/src/core/gnunet-service-core_typemap.c b/src/core/gnunet-service-core_typemap.c
index 645127b99..47235501c 100644
--- a/src/core/gnunet-service-core_typemap.c
+++ b/src/core/gnunet-service-core_typemap.c
@@ -373,4 +373,5 @@ GSC_TYPEMAP_done ()
/* nothing to do */
}
+
/* end of gnunet-service-core_typemap.c */
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index feeea7e9f..dda60215d 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -340,4 +340,5 @@ main (int argc, char *argv1[])
return ok;
}
+
/* end of test_core_api.c */
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index ca0919294..b510e8993 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -531,4 +531,5 @@ main (int argc,
return ok;
}
+
/* end of test_core_api_reliability.c */
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c
index 77023f573..c2e39cd26 100644
--- a/src/core/test_core_api_send_to_self.c
+++ b/src/core/test_core_api_send_to_self.c
@@ -191,4 +191,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_core_api_send_to_self.c */
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index f2eda4e7a..3cbe50d72 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -246,4 +246,5 @@ main (int argc,
return ret;
}
+
/* end of test_core_api_start_only.c */
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 8d18835ac..67f8bb224 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -434,7 +434,6 @@ disconnect_notify (void *cls,
}
-
static void
handle_test (void *cls,
const struct TestMessage *hdr)
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 98bf67d2e..f0ccd7f19 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -594,8 +594,7 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx,
curl -w "foo%{size_request} -XPOST --data "ABC" $URL
the CURLINFO_REQUEST_SIZE should be the whole size of the request
including headers and body.
- */
- GNUNET_break (size_curl <= size_long);
+ */GNUNET_break (size_curl <= size_long);
urd = get_url_benchmark_data (url, (unsigned int) response_code);
urd->count++;
@@ -730,4 +729,5 @@ GNUNET_CURL_destructor__ (void)
curl_global_cleanup ();
}
+
/* end of curl.c */
diff --git a/src/curl/curl_reschedule.c b/src/curl/curl_reschedule.c
index c0dc30c95..a1fe55aa5 100644
--- a/src/curl/curl_reschedule.c
+++ b/src/curl/curl_reschedule.c
@@ -197,4 +197,5 @@ GNUNET_CURL_gnunet_scheduler_reschedule (void *cls)
rc->task = GNUNET_SCHEDULER_add_now (&context_task, rc);
}
+
/* end of curl_reschedule.c */
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index 1656ac91c..ce3b4c25d 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -164,4 +164,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of perf_datacache.c */
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c
index f176e3568..dbc9cac9c 100644
--- a/src/datacache/plugin_datacache_heap.c
+++ b/src/datacache/plugin_datacache_heap.c
@@ -294,7 +294,6 @@ struct GetContext
};
-
/**
* Function called during GET to find matching blocks.
* Only matches by type.
@@ -590,5 +589,4 @@ libgnunet_plugin_datacache_heap_done (void *cls)
}
-
/* end of plugin_datacache_heap.c */
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index c532550ae..09049fde2 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -702,5 +702,4 @@ libgnunet_plugin_datacache_postgres_done (void *cls)
}
-
/* end of plugin_datacache_postgres.c */
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c
index edb3b6757..329bfd9a4 100644
--- a/src/datacache/plugin_datacache_template.c
+++ b/src/datacache/plugin_datacache_template.c
@@ -126,7 +126,6 @@ template_plugin_get_random (void *cls,
}
-
/**
* Iterate over the results that are "close" to a particular key in
* the datacache. "close" is defined as numerically larger than @a
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index 58a03914b..6f6e4eec1 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -191,4 +191,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_datacache.c */
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c
index 26a23d632..92807fbe2 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -160,4 +160,5 @@ main (int argc,
return ok;
}
+
/* end of test_datacache_quota.c */
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index ee963b5ef..7af926617 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -254,5 +254,4 @@ struct DataMessage
GNUNET_NETWORK_STRUCT_END
-
#endif
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index b10c43944..4537f6efe 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -1241,7 +1241,6 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
}
-
/**
* Get a random value from the datastore for content replication.
* Returns a single, random value among those with the highest
diff --git a/src/datastore/gnunet-datastore.c b/src/datastore/gnunet-datastore.c
index 259fa518b..54d087bc4 100644
--- a/src/datastore/gnunet-datastore.c
+++ b/src/datastore/gnunet-datastore.c
@@ -412,7 +412,7 @@ start_insert ()
ssize_t len;
len = GNUNET_DISK_file_read (file_handle, buf, MAGIC_LEN);
- if ((len != MAGIC_LEN)||(0 != memcmp (buf, MAGIC_BYTES, MAGIC_LEN)))
+ if ((len != MAGIC_LEN) || (0 != memcmp (buf, MAGIC_BYTES, MAGIC_LEN)))
{
fprintf (stderr, _ ("Input file is not of a supported format\n"));
return;
@@ -504,4 +504,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-datastore.c */
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index bd86fdad1..3fc46e19c 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -599,8 +599,7 @@ handle_reserve (void *cls, const struct ReserveMessage *msg)
* message happens, the insertion request could be blocked
* by less-important content from migration because it is
* larger than 1/8th of the overall available space, and
- * we only reserve 1/8th for "fresh" insertions */
- GNUNET_log (
+ * we only reserve 1/8th for "fresh" insertions */GNUNET_log (
GNUNET_ERROR_TYPE_WARNING,
_ (
"The requested amount (%llu bytes) is larger than the cache size (%llu bytes)\n"),
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index f353d0452..fef38891e 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -625,4 +625,5 @@ main (int argc,
return ok;
}
+
/* end of perf_datastore_api.c */
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index a1604d441..d7488d4e7 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -408,7 +408,6 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api,
}
-
/**
* Last task run during shutdown. Disconnects us from
* the transport and core.
@@ -570,4 +569,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of perf_plugin_datastore.c */
diff --git a/src/datastore/plugin_datastore_heap.c b/src/datastore/plugin_datastore_heap.c
index 4e48bfd4c..a827a2763 100644
--- a/src/datastore/plugin_datastore_heap.c
+++ b/src/datastore/plugin_datastore_heap.c
@@ -268,6 +268,7 @@ update_iterator (void *cls,
return GNUNET_NO;
}
+
/**
* Store an item in the datastore.
*
@@ -939,4 +940,5 @@ libgnunet_plugin_datastore_heap_done (void *cls)
return NULL;
}
+
/* end of plugin_datastore_heap.c */
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index 6aec09c54..15c2fe386 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -920,7 +920,6 @@ struct ExpiCtx
};
-
/**
* Wrapper for the processor for #mysql_plugin_get_expiration().
* If no expired value was found, we do a second query for
@@ -1200,4 +1199,5 @@ libgnunet_plugin_datastore_mysql_done (void *cls)
return NULL;
}
+
/* end of plugin_datastore_mysql.c */
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 0811edfd7..eba717226 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -73,8 +73,7 @@ init_connection (struct Plugin *plugin)
* we do math or inequality tests, so we can't handle the entire range of uint32_t.
* This will also cause problems for expiration times after 294247-01-10-04:00:54 UTC.
* PostgreSQL also recommends against using WITH OIDS.
- */
- GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS gn090 ("
+ */GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS gn090 ("
" repl INTEGER NOT NULL DEFAULT 0,"
" type INTEGER NOT NULL DEFAULT 0,"
" prio INTEGER NOT NULL DEFAULT 0,"
@@ -970,4 +969,5 @@ libgnunet_plugin_datastore_postgres_done (void *cls)
return NULL;
}
+
/* end of plugin_datastore_postgres.c */
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index b1bb7df7e..b3b30f256 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -349,8 +349,7 @@ database_setup (const struct GNUNET_CONFIGURATION_Handle *cfg,
* we only test equality on it and can cast it to/from uint32_t. For repl, prio, and anonLevel
* we do math or inequality tests, so we can't handle the entire range of uint32_t.
* This will also cause problems for expiration times after 294247-01-10-04:00:54 UTC.
- */
- if ((SQLITE_DONE == sqlite3_step (stmt)) &&
+ */if ((SQLITE_DONE == sqlite3_step (stmt)) &&
(SQLITE_OK != sqlite3_exec (plugin->dbh,
"CREATE TABLE gn091 ("
" repl INT4 NOT NULL DEFAULT 0,"
@@ -1350,4 +1349,5 @@ libgnunet_plugin_datastore_sqlite_done (void *cls)
return NULL;
}
+
/* end of plugin_datastore_sqlite.c */
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c
index 1f9a0f416..2b455f8cb 100644
--- a/src/datastore/plugin_datastore_template.c
+++ b/src/datastore/plugin_datastore_template.c
@@ -118,7 +118,6 @@ template_plugin_get_key (void *cls,
}
-
/**
* Get a random item for replication. Returns a single, not expired,
* random item from those with the highest replication counters. The
@@ -271,4 +270,5 @@ libgnunet_plugin_datastore_template_done (void *cls)
return NULL;
}
+
/* end of plugin_datastore_template.c */
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 93ba46ff8..dbe590bab 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -728,4 +728,5 @@ main (int argc,
return ok;
}
+
/* end of test_datastore_api.c */
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index e6bacaf6e..7bec0d064 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -404,4 +404,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_datastore_api_management.c */
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index 15fead3b7..9fe2462e7 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -154,8 +154,8 @@ do_put (struct CpsRunContext *crc)
/* most content is 32k */
size = 32 * 1024;
- if ((0 != i)&&(GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) ==
- 0) ) /* but some of it is less! */
+ if ((0 != i) && (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) ==
+ 0) ) /* but some of it is less! */
size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024);
size = size - (size & 7); /* always multiple of 8 */
@@ -274,7 +274,6 @@ unload_plugin (struct GNUNET_DATASTORE_PluginFunctions *api,
}
-
/**
* Last task run during shutdown. Disconnects us from
* the transport and core.
@@ -475,4 +474,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_plugin_datastore.c */
diff --git a/src/dht/dht.h b/src/dht/dht.h
index 052a60b99..86f1b9b49 100644
--- a/src/dht/dht.h
+++ b/src/dht/dht.h
@@ -137,7 +137,6 @@ struct GNUNET_DHT_ClientGetResultSeenMessage
};
-
/**
* Reply to a GET send from the service to a client.
*/
diff --git a/src/dht/dht_test_lib.c b/src/dht/dht_test_lib.c
index e18d2ab24..0d382cd74 100644
--- a/src/dht/dht_test_lib.c
+++ b/src/dht/dht_test_lib.c
@@ -213,4 +213,5 @@ GNUNET_DHT_TEST_run (const char *testname,
&dht_test_run, ctx);
}
+
/* end of dht_test_lib.c */
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c
index aacd4ac98..c8a1cb735 100644
--- a/src/dht/gnunet-dht-get.c
+++ b/src/dht/gnunet-dht-get.c
@@ -286,4 +286,5 @@ main (int argc, char *const *argv)
: 1;
}
+
/* end of gnunet-dht-get.c */
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c
index d0cd4cff1..8dc14e223 100644
--- a/src/dht/gnunet-dht-monitor.c
+++ b/src/dht/gnunet-dht-monitor.c
@@ -284,6 +284,7 @@ run (void *cls,
NULL);
}
+
/**
* Entry point for gnunet-dht-monitor
*
@@ -340,4 +341,5 @@ main (int argc, char *const *argv)
: 1;
}
+
/* end of gnunet-dht-monitor.c */
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index d8bffbf37..7ee4ec185 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -168,6 +168,7 @@ run (void *cls,
NULL);
}
+
/**
* Entry point for gnunet-dht-put
*
@@ -236,4 +237,5 @@ main (int argc, char *const *argv)
: 1;
}
+
/* end of gnunet-dht-put.c */
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 380002deb..2dd49a1b6 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -161,6 +161,4 @@ run (void *cls,
GDS_DHT_SERVICE_INIT ("dht", &run);
-
-
/* end of gnunet-service-dht.c */
diff --git a/src/dht/gnunet-service-dht.h b/src/dht/gnunet-service-dht.h
index 2574edc7b..6741efb4e 100644
--- a/src/dht/gnunet-service-dht.h
+++ b/src/dht/gnunet-service-dht.h
@@ -59,7 +59,6 @@ extern struct GNUNET_STATISTICS_Handle *GDS_stats;
extern struct GNUNET_MessageHeader *GDS_my_hello;
-
/**
* Handle a reply we've received from another peer. If the reply
* matches any of our pending queries, forward it to the respective
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index 932b04d9b..be6e22d01 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -1318,7 +1318,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
cl_size = 0;
for (m = monitor_head; NULL != m; m = m->next)
{
- if (((GNUNET_BLOCK_TYPE_ANY == m->type) ||(m->type == type) ) &&
+ if (((GNUNET_BLOCK_TYPE_ANY == m->type) || (m->type == type) ) &&
((NULL == m->key) ||
(memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) ))
{
@@ -1402,7 +1402,7 @@ GDS_CLIENTS_process_put (uint32_t options,
cl_size = 0;
for (m = monitor_head; NULL != m; m = m->next)
{
- if (((GNUNET_BLOCK_TYPE_ANY == m->type) ||(m->type == type) ) &&
+ if (((GNUNET_BLOCK_TYPE_ANY == m->type) || (m->type == type) ) &&
((NULL == m->key) ||
(memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0) ))
{
@@ -1540,4 +1540,5 @@ GDS_CLIENTS_done ()
}
}
+
/* end of gnunet-service-dht_clients.c */
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c
index e57951ab1..a0141d1fb 100644
--- a/src/dht/gnunet-service-dht_hello.c
+++ b/src/dht/gnunet-service-dht_hello.c
@@ -144,4 +144,5 @@ GDS_HELLO_done ()
}
}
+
/* end of gnunet-service-dht_hello.c */
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index fe9dd3e9c..c251dfa12 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -907,11 +907,8 @@ get_distance (const struct GNUNET_HashCode *target,
* use the highest 2^9 bits of the result to signify the
* number of (mis)matching LSB bits; if we have 0 matching
* and hence 512 mismatching LSB bits we return -1 (since
- * 512 itself cannot be represented with 9 bits) */
-
- /* first, calculate the most significant 9 bits of our
- * result, aka the number of LSBs */
- bucket = GNUNET_CRYPTO_hash_matching_bits (target,
+ * 512 itself cannot be represented with 9 bits) *//* first, calculate the most significant 9 bits of our
+ * result, aka the number of LSBs */bucket = GNUNET_CRYPTO_hash_matching_bits (target,
have);
/* bucket is now a value between 0 and 512 */
if (bucket == 512)
diff --git a/src/dht/gnunet-service-dht_neighbours.h b/src/dht/gnunet-service-dht_neighbours.h
index cdcf30b01..55cc5b135 100644
--- a/src/dht/gnunet-service-dht_neighbours.h
+++ b/src/dht/gnunet-service-dht_neighbours.h
@@ -143,7 +143,6 @@ GDS_am_closest_peer (const struct GNUNET_HashCode *key,
const struct GNUNET_CONTAINER_BloomFilter *bloom);
-
/**
* Initialize neighbours subsystem.
*
diff --git a/src/dht/gnunet-service-dht_nse.c b/src/dht/gnunet-service-dht_nse.c
index 89107be16..7f411cf71 100644
--- a/src/dht/gnunet-service-dht_nse.c
+++ b/src/dht/gnunet-service-dht_nse.c
@@ -113,4 +113,5 @@ GDS_NSE_done ()
}
}
+
/* end of gnunet-service-dht_nse.c */
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c
index 3454c1acb..75513f833 100644
--- a/src/dht/gnunet-service-dht_routing.c
+++ b/src/dht/gnunet-service-dht_routing.c
@@ -484,4 +484,5 @@ GDS_ROUTING_done ()
recent_map = NULL;
}
+
/* end of gnunet-service-dht_routing.c */
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
index 084384146..f213433ed 100644
--- a/src/dht/plugin_block_dht.c
+++ b/src/dht/plugin_block_dht.c
@@ -247,4 +247,5 @@ libgnunet_plugin_block_dht_done (void *cls)
return NULL;
}
+
/* end of plugin_block_dht.c */
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c
index a62ee9668..957c71d7f 100644
--- a/src/dht/test_dht_api.c
+++ b/src/dht/test_dht_api.c
@@ -189,4 +189,5 @@ main (int argc,
return ok;
}
+
/* end of test_dht_api.c */
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c
index d92095cc6..7f737ea03 100644
--- a/src/dht/test_dht_topo.c
+++ b/src/dht/test_dht_topo.c
@@ -528,4 +528,5 @@ main (int xargc, char *xargv[])
return ok;
}
+
/* end of test_dht_topo.c */
diff --git a/src/dns/dns_api.c b/src/dns/dns_api.c
index cd208d820..5969102b9 100644
--- a/src/dns/dns_api.c
+++ b/src/dns/dns_api.c
@@ -146,7 +146,6 @@ mq_error_handler (void *cls,
}
-
/**
* This receives packets from the DNS service and calls the application to
* check that the request is well-formed
@@ -384,4 +383,5 @@ GNUNET_DNS_disconnect (struct GNUNET_DNS_Handle *dh)
GNUNET_free (dh);
}
+
/* end of dns_api.c */
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c
index eceb278d2..ca3a2532d 100644
--- a/src/dns/gnunet-helper-dns.c
+++ b/src/dns/gnunet-helper-dns.c
@@ -1189,4 +1189,5 @@ cleanup_rest:
return r;
}
+
/* end of gnunet-helper-dns.c */
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index e1cb7a6ff..25fbcf430 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -1267,6 +1267,8 @@ GNUNET_DNS_init ()
strerror (errno));
}
}
+
+
#endif
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index fc07a4073..029474b49 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -232,4 +232,5 @@ libgnunet_plugin_block_dns_done (void *cls)
return NULL;
}
+
/* end of plugin_block_dns.c */
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 578997f4a..c479720d4 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -699,7 +699,6 @@ get_redirect_state (int af,
}
-
/**
* Check a request via cadet to send a request to a TCP service
* offered by this system.
@@ -3800,7 +3799,7 @@ setup_exit_helper_args ()
GNUNET_CONFIGURATION_get_value_string (cfg,
"exit",
"IPV6ADDR",
- &ipv6addr))||
+ &ipv6addr)) ||
(1 != inet_pton (AF_INET6,
ipv6addr,
&exit_ipv6addr))))
@@ -3851,7 +3850,7 @@ setup_exit_helper_args ()
GNUNET_CONFIGURATION_get_value_string (cfg,
"exit",
"IPV4ADDR",
- &ipv4addr))||
+ &ipv4addr)) ||
(1 != inet_pton (AF_INET,
ipv4addr,
&exit_ipv4addr))))
@@ -3868,7 +3867,7 @@ setup_exit_helper_args ()
GNUNET_CONFIGURATION_get_value_string (cfg,
"exit",
"IPV4MASK",
- &ipv4mask))||
+ &ipv4mask)) ||
(1 != inet_pton (AF_INET,
ipv4mask,
&exit_ipv4mask))))
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c
index ca187afa6..cf322725d 100644
--- a/src/exit/gnunet-helper-exit.c
+++ b/src/exit/gnunet-helper-exit.c
@@ -813,4 +813,5 @@ cleanup:
return global_ret;
}
+
/* end of gnunet-helper-exit.c */
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c
index 5dd935d7d..92ae9f595 100644
--- a/src/fragmentation/defragmentation.c
+++ b/src/fragmentation/defragmentation.c
@@ -586,4 +586,5 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
return GNUNET_YES;
}
+
/* end of defragmentation.c */
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index f7eb40b42..0228e37ce 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -676,7 +676,6 @@ void *
GNUNET_FS_make_file_reader_context_ (const char *filename);
-
/**
* Function that provides data by copying from a buffer.
*
@@ -799,7 +798,6 @@ void
GNUNET_FS_download_start_task_ (void *cls);
-
/**
* Fill in all of the generic fields for
* an unindex event and call the callback.
@@ -1064,7 +1062,6 @@ GNUNET_FS_end_top (struct GNUNET_FS_Handle *h,
struct TopLevelActivity *top);
-
/**
* Master context for most FS operations.
*/
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c
index 5e1e0af5e..1ef5fa3bb 100644
--- a/src/fs/fs_directory.c
+++ b/src/fs/fs_directory.c
@@ -317,6 +317,7 @@ GNUNET_FS_directory_list_contents (size_t size,
return GNUNET_OK;
}
+
/**
* Entries in the directory (builder).
*/
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index e7ea87e50..4d03b6546 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -463,8 +463,7 @@ try_match_block (struct GNUNET_FS_DownloadContext *dc,
thus, reconstruction of (some) inner blocks will fail.
FIXME: we might eventually want to write a tighter test to
maximize the circumstances under which we do succeed with
- IBlock reconstruction. (need good tests though). */
- return;
+ IBlock reconstruction. (need good tests though). */return;
}
complete = GNUNET_YES;
for (i = 0; i < dr->num_children; i++)
@@ -2285,6 +2284,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc)
dc->job_queue);
}
+
/**
* Suspend a download.
*
@@ -2414,4 +2414,5 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete)
GNUNET_free (dc);
}
+
/* end of fs_download.c */
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c
index bbbc30a6e..28bbf12dd 100644
--- a/src/fs/fs_file_information.c
+++ b/src/fs/fs_file_information.c
@@ -49,6 +49,7 @@ GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation *s)
return s->serialization;
}
+
/**
* Obtain the filename from the file information structure.
*
diff --git a/src/fs/fs_getopt.c b/src/fs/fs_getopt.c
index 84c1f6123..43a02a9fa 100644
--- a/src/fs/fs_getopt.c
+++ b/src/fs/fs_getopt.c
@@ -240,6 +240,7 @@ getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
return GNUNET_OK;
}
+
/**
* Allow user to specify metadata.
*
@@ -270,6 +271,4 @@ GNUNET_FS_GETOPT_METADATA (char shortName,
}
-
-
/* end of fs_getopt.c */
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index c50e71f0b..2d118ee51 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -320,4 +320,5 @@ GNUNET_FS_publish_ublock_cancel_ (struct GNUNET_FS_PublishUblockContext *uc)
GNUNET_free (uc);
}
+
/* end of fs_publish_ublock.c */
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 62ff4e90d..8e2d7deba 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -1831,4 +1831,5 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
GNUNET_free (sc);
}
+
/* end of fs_search.c */
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c
index dab5d00a0..e291938b5 100644
--- a/src/fs/fs_sharetree.c
+++ b/src/fs/fs_sharetree.c
@@ -452,4 +452,5 @@ GNUNET_FS_share_tree_free (struct GNUNET_FS_ShareTreeItem *toplevel)
GNUNET_free (toplevel);
}
+
/* end fs_sharetree.c */
diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h
index 87bc90bd6..36244eb19 100644
--- a/src/fs/fs_test_lib.h
+++ b/src/fs/fs_test_lib.h
@@ -99,5 +99,4 @@ GNUNET_FS_TEST_download (struct GNUNET_TESTBED_Peer *peer,
void *cont_cls);
-
#endif
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index 177f151f2..e7f922823 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -459,4 +459,5 @@ GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
GNUNET_free (te);
}
+
/* end of fs_tree.c */
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index c35d49312..f2315d7d0 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -897,4 +897,5 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc)
GNUNET_free (uc);
}
+
/* end of fs_unindex.c */
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 7eb9f86b0..c1faf4f12 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -265,6 +265,7 @@ percent_decode_keyword (const char *in, char **emsg)
return ret;
}
+
#define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX
/**
@@ -397,6 +398,7 @@ uri_sks_parse (const char *s, char **emsg)
return ret;
}
+
#define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX
@@ -1679,6 +1681,8 @@ get_keywords_from_tokens (const char *s, char **array, int index)
GNUNET_free (ss);
return seps;
}
+
+
#undef TOKENS
@@ -1719,8 +1723,7 @@ gather_uri_data (void *cls,
* If given non-utf8 string it will, most likely, find it to be invalid,
* and will return the length of its valid part, skipping the keyword.
* If it does - fix the extractor, not this check!
- */
- if (u8_strcount ((const uint8_t *) data) <= 2)
+ */if (u8_strcount ((const uint8_t *) data) <= 2)
return 0;
if ((EXTRACTOR_METATYPE_MIMETYPE == type) &&
(NULL != (sep = memchr (data, '/', data_len))) && (sep != data))
@@ -2049,4 +2052,5 @@ GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri)
}
}
+
/* end of fs_uri.c */
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c
index dc1912f09..53c64ab04 100644
--- a/src/fs/gnunet-auto-share.c
+++ b/src/fs/gnunet-auto-share.c
@@ -779,4 +779,5 @@ main (int argc, char *const *argv)
return ok;
}
+
/* end of gnunet-auto-share.c */
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index 0fe26fe8b..829906461 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -668,4 +668,5 @@ main (int argc, char *const *argv)
options, &run, NULL)) ? global_ret : 1;
}
+
/* end of gnunet-daemon-fsprofiler.c */
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index 8819d1777..58950bceb 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -174,6 +174,7 @@ run (void *cls,
}
}
+
/**
* The main function to inspect GNUnet directories.
*
@@ -206,4 +207,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-directory.c */
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index 05e102eac..63bb02958 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -380,4 +380,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-download.c */
diff --git a/src/fs/gnunet-fs-profiler.c b/src/fs/gnunet-fs-profiler.c
index a6e248213..6aad92055 100644
--- a/src/fs/gnunet-fs-profiler.c
+++ b/src/fs/gnunet-fs-profiler.c
@@ -241,4 +241,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-fs-profiler.c */
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index a44fcdf7a..35d410d37 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -110,6 +110,7 @@ run (void *cls,
}
}
+
/**
* The main function to access special file-sharing functions.
*
@@ -147,4 +148,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-fs.c */
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c
index fb5f7497d..5d2d1229b 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -149,6 +149,8 @@ add_to_md (void *cls,
}
return 0;
}
+
+
#endif
@@ -572,4 +574,5 @@ main (int argc, char *const *argv)
return 0;
}
+
/* end of gnunet-helper-fs-publish.c */
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index ff56dac8c..ac310b785 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -996,4 +996,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-publish.c */
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index f11335985..e0b9a31fd 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -375,4 +375,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-search.c */
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 40b3f6c1d..29e6de9d5 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -68,7 +68,6 @@
#define INSANE_STATISTICS GNUNET_NO
-
/**
* Doubly-linked list of requests we are performing
* on behalf of the same client.
@@ -504,9 +503,6 @@ client_disconnect_cb (void *cls,
}
-
-
-
/**
* Task that periodically ages our cover traffic statistics.
*
diff --git a/src/fs/gnunet-service-fs_cadet_server.c b/src/fs/gnunet-service-fs_cadet_server.c
index 34e4e6f58..395842ebb 100644
--- a/src/fs/gnunet-service-fs_cadet_server.c
+++ b/src/fs/gnunet-service-fs_cadet_server.c
@@ -143,7 +143,6 @@ static unsigned int sc_count;
static unsigned long long sc_count_max;
-
/**
* Task run to asynchronously terminate the cadet due to timeout.
*
@@ -248,8 +247,7 @@ handle_datastore_reply (void *cls,
answers should be queried; OTOH, this is not a
hard error as we might have had the answer in the
past and the user might have unindexed it. Hence
- we log at level "INFO" for now. */
- if (NULL == key)
+ we log at level "INFO" for now. */if (NULL == key)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Have no answer and the query was NULL\n");
@@ -544,4 +542,5 @@ GSF_cadet_stop_server ()
GNUNET_assert (0 == sc_count);
}
+
/* end of gnunet-service-fs_cadet.c */
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h
index c17b6a0a8..54f952778 100644
--- a/src/fs/gnunet-service-fs_cp.h
+++ b/src/fs/gnunet-service-fs_cp.h
@@ -387,7 +387,6 @@ const struct GNUNET_PeerIdentity *
GSF_connected_peer_get_identity2_ (const struct GSF_ConnectedPeer *cp);
-
/**
* Iterate over all connected peers.
*
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c
index 4a7172c50..98fca3ec5 100644
--- a/src/fs/gnunet-service-fs_indexing.c
+++ b/src/fs/gnunet-service-fs_indexing.c
@@ -515,4 +515,5 @@ GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
return GNUNET_OK;
}
+
/* end of gnunet-service-fs_indexing.c */
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index 7933b2dee..bb4b07c02 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -300,8 +300,7 @@ plan (struct PeerPlan *pp,
* which satisfies all of the rules above.
*
* Note: M_PI_4 = PI/4 = arctan(1)
- */
- rp->priority =
+ */rp->priority =
round ((GSF_current_priorities
+ 1.0) * atan (delay.rel_value_us / avg_delay)) / M_PI_4;
/* Note: usage of 'round' and 'atan' requires -lm */
@@ -812,5 +811,4 @@ GSF_plan_done ()
}
-
/* end of gnunet-service-fs_pe.h */
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index 9c558674b..71de5668b 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -424,6 +424,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
return pr;
}
+
/**
* Obtain the public data associated with a pending request
*
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index f22f85ee0..e060e734e 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -404,7 +404,6 @@ GSF_pending_request_test_target_ (struct GSF_PendingRequest *pr,
const struct GNUNET_PeerIdentity *target);
-
/**
* Setup the subsystem.
*/
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index 02990a637..1825e8eb3 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -673,4 +673,5 @@ GSF_push_done_ ()
GNUNET_assert (0 == mig_size);
}
+
/* end of gnunet-service-fs_push.c */
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c
index 335496119..ddc15820a 100644
--- a/src/fs/gnunet-service-fs_put.c
+++ b/src/fs/gnunet-service-fs_put.c
@@ -292,4 +292,5 @@ GSF_put_done_ ()
}
}
+
/* end of gnunet-service-fs_put.c */
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c
index 88825fa60..bf32de812 100644
--- a/src/fs/gnunet-unindex.c
+++ b/src/fs/gnunet-unindex.c
@@ -60,6 +60,7 @@ shutdown_task (void *cls)
}
}
+
/**
* Called by FS client to give information about the progress of an
* operation.
@@ -200,4 +201,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-unindex.c */
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c
index 39563dfa4..062f062b5 100644
--- a/src/fs/perf_gnunet_service_fs_p2p.c
+++ b/src/fs/perf_gnunet_service_fs_p2p.c
@@ -364,4 +364,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of perf_gnunet_service_fs_p2p.c */
diff --git a/src/fs/perf_gnunet_service_fs_p2p_respect.c b/src/fs/perf_gnunet_service_fs_p2p_respect.c
index fc17235fa..b7fe61be7 100644
--- a/src/fs/perf_gnunet_service_fs_p2p_respect.c
+++ b/src/fs/perf_gnunet_service_fs_p2p_respect.c
@@ -198,7 +198,6 @@ get_done (void *cls, int success)
}
-
/**
* Adapter function called to establish a connection to
* statistics service.
@@ -476,4 +475,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of perf_gnunet_service_fs_p2p_respect.c */
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index e5ea91c98..02855f418 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -295,4 +295,5 @@ libgnunet_plugin_block_fs_done (void *cls)
return NULL;
}
+
/* end of plugin_block_fs.c */
diff --git a/src/fs/test_fs.c b/src/fs/test_fs.c
index 73de7b204..7a57e98b0 100644
--- a/src/fs/test_fs.c
+++ b/src/fs/test_fs.c
@@ -47,6 +47,7 @@ makeName (unsigned int i)
return fn;
}
+
static enum GNUNET_FSUI_EventType lastEvent;
static struct GNUNET_MetaData *search_meta;
@@ -101,6 +102,7 @@ eventCallback (void *cls, const GNUNET_FSUI_Event *event)
return NULL;
}
+
#define START_DAEMON 1
int
@@ -256,4 +258,5 @@ FAILURE:
return (ok == GNUNET_YES) ? 0 : 1;
}
+
/* end of test_fs.c */
diff --git a/src/fs/test_fs_directory.c b/src/fs/test_fs_directory.c
index 37d74613a..1b109c4d4 100644
--- a/src/fs/test_fs_directory.c
+++ b/src/fs/test_fs_directory.c
@@ -63,6 +63,7 @@ processor (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
fprintf (stderr, "Error at %s:%d\n", __FILE__, __LINE__);
}
+
static int
testDirectory (unsigned int i)
{
@@ -181,4 +182,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_directory.c */
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c
index 422c41523..2be2e7f6a 100644
--- a/src/fs/test_fs_download.c
+++ b/src/fs/test_fs_download.c
@@ -361,4 +361,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_download.c */
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c
index 7b7a886eb..35d4ed441 100644
--- a/src/fs/test_fs_download_persistence.c
+++ b/src/fs/test_fs_download_persistence.c
@@ -347,4 +347,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_download_persistence.c */
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c
index 3f6f2d5a8..391b667cb 100644
--- a/src/fs/test_fs_file_information.c
+++ b/src/fs/test_fs_file_information.c
@@ -157,4 +157,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_file_information.c */
diff --git a/src/fs/test_fs_list_indexed.c b/src/fs/test_fs_list_indexed.c
index 431d42b2e..93367883f 100644
--- a/src/fs/test_fs_list_indexed.c
+++ b/src/fs/test_fs_list_indexed.c
@@ -259,4 +259,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_list_indexed.c */
diff --git a/src/fs/test_fs_publish.c b/src/fs/test_fs_publish.c
index 40eaa09e3..c42e546e3 100644
--- a/src/fs/test_fs_publish.c
+++ b/src/fs/test_fs_publish.c
@@ -245,4 +245,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_publish.c */
diff --git a/src/fs/test_fs_publish_persistence.c b/src/fs/test_fs_publish_persistence.c
index 4247f78dd..4ec39d06e 100644
--- a/src/fs/test_fs_publish_persistence.c
+++ b/src/fs/test_fs_publish_persistence.c
@@ -316,4 +316,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_publish_persistence.c */
diff --git a/src/fs/test_fs_search.c b/src/fs/test_fs_search.c
index 16f8ecbda..b392cc8ac 100644
--- a/src/fs/test_fs_search.c
+++ b/src/fs/test_fs_search.c
@@ -248,4 +248,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_search.c */
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c
index 40671823d..d523a6404 100644
--- a/src/fs/test_fs_search_persistence.c
+++ b/src/fs/test_fs_search_persistence.c
@@ -314,4 +314,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_search_persistence.c */
diff --git a/src/fs/test_fs_search_probes.c b/src/fs/test_fs_search_probes.c
index 2e2dc6005..b3c717aa1 100644
--- a/src/fs/test_fs_search_probes.c
+++ b/src/fs/test_fs_search_probes.c
@@ -254,4 +254,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_search_probes.c */
diff --git a/src/fs/test_fs_search_with_and.c b/src/fs/test_fs_search_with_and.c
index 60ceb94ee..2187f4531 100644
--- a/src/fs/test_fs_search_with_and.c
+++ b/src/fs/test_fs_search_with_and.c
@@ -268,4 +268,5 @@ main (int argc, char *argv[])
return err;
}
+
/* end of test_fs_search.c */
diff --git a/src/fs/test_fs_start_stop.c b/src/fs/test_fs_start_stop.c
index 1d6e27d62..509fbe76a 100644
--- a/src/fs/test_fs_start_stop.c
+++ b/src/fs/test_fs_start_stop.c
@@ -60,4 +60,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_start_stop.c */
diff --git a/src/fs/test_fs_test_lib.c b/src/fs/test_fs_test_lib.c
index 25b843e85..7f0077bdd 100644
--- a/src/fs/test_fs_test_lib.c
+++ b/src/fs/test_fs_test_lib.c
@@ -175,4 +175,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_fs_test_lib.c */
diff --git a/src/fs/test_fs_unindex.c b/src/fs/test_fs_unindex.c
index 19b935dbf..a11c574c1 100644
--- a/src/fs/test_fs_unindex.c
+++ b/src/fs/test_fs_unindex.c
@@ -232,4 +232,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_unindex.c */
diff --git a/src/fs/test_fs_unindex_persistence.c b/src/fs/test_fs_unindex_persistence.c
index 28079b842..c3668f4e0 100644
--- a/src/fs/test_fs_unindex_persistence.c
+++ b/src/fs/test_fs_unindex_persistence.c
@@ -302,4 +302,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_unindex_persistence.c */
diff --git a/src/fs/test_fs_uri.c b/src/fs/test_fs_uri.c
index 0602d8318..2a324af9a 100644
--- a/src/fs/test_fs_uri.c
+++ b/src/fs/test_fs_uri.c
@@ -333,4 +333,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_fs_uri.c */
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c
index 9842f8a83..d4a1c38b5 100644
--- a/src/fs/test_gnunet_service_fs_migration.c
+++ b/src/fs/test_gnunet_service_fs_migration.c
@@ -217,4 +217,5 @@ main (int argc,
return ok;
}
+
/* end of test_gnunet_service_fs_migration.c */
diff --git a/src/fs/test_gnunet_service_fs_p2p.c b/src/fs/test_gnunet_service_fs_p2p.c
index 8d2ed144f..bedcb7173 100644
--- a/src/fs/test_gnunet_service_fs_p2p.c
+++ b/src/fs/test_gnunet_service_fs_p2p.c
@@ -162,4 +162,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_gnunet_service_fs_p2p.c */
diff --git a/src/fs/test_plugin_block_fs.c b/src/fs/test_plugin_block_fs.c
index 305da2f18..4f71c5d74 100644
--- a/src/fs/test_plugin_block_fs.c
+++ b/src/fs/test_plugin_block_fs.c
@@ -88,4 +88,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_plugin_block_fs.c */
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c
index e646efc3e..e8253ee4c 100644
--- a/src/gns/gns_tld_api.c
+++ b/src/gns/gns_tld_api.c
@@ -346,4 +346,5 @@ GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr)
return ret;
}
+
/* end of gns_tld_api.c */
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index a1ae888dd..81a12de0a 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -103,7 +103,6 @@ static in_addr_t address;
static struct in6_addr address6;
-
/**
* Handle to GNS resolver.
*/
@@ -780,4 +779,5 @@ main (int argc,
return ret;
}
+
/* end of gnunet-dns2gns.c */
diff --git a/src/gns/gnunet-gns-benchmark.c b/src/gns/gnunet-gns-benchmark.c
index d85b9e203..bf13efb11 100644
--- a/src/gns/gnunet-gns-benchmark.c
+++ b/src/gns/gnunet-gns-benchmark.c
@@ -614,4 +614,5 @@ main (int argc,
return ret;
}
+
/* end of gnunet-gns-benchmark.c */
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c
index 064294234..0dc04064a 100644
--- a/src/gns/gnunet-gns-import.c
+++ b/src/gns/gnunet-gns-import.c
@@ -163,6 +163,7 @@ run_process_and_wait (int pipe_control,
return 0;
}
+
static void
check_pkey (unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd,
char *pk, int *found_rec)
@@ -186,6 +187,7 @@ check_pkey (unsigned int rd_len, const struct GNUNET_GNSRECORD_Data *rd,
}
}
+
/**
* Process a record that was stored in the namestore.
*
@@ -211,6 +213,7 @@ zone_iterator (void *cls,
GNUNET_NAMESTORE_zone_iterator_next (list_it);
}
+
static void
zone_iteration_error (void *cls)
{
@@ -322,17 +325,19 @@ get_ego (void *cls,
GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
if (NULL != identifier)
{
- if ((NULL == master_zone_pkey) &&(0 == strcmp ("master-zone", identifier)) )
+ if ((NULL == master_zone_pkey) && (0 == strcmp ("master-zone",
+ identifier)) )
{
master_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
master_pk = *GNUNET_IDENTITY_ego_get_private_key (ego);
}
- else if ((NULL == private_zone_pkey) &&(0 == strcmp ("private-zone",
- identifier)) )
+ else if ((NULL == private_zone_pkey) && (0 == strcmp ("private-zone",
+ identifier)) )
private_zone_pkey = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
}
}
+
/**
* Task run on shutdown.
*
@@ -362,6 +367,7 @@ shutdown_task (void *cls)
}
}
+
/**
* Main function that will be run.
*
@@ -484,4 +490,5 @@ main (int argc, char *const *argv)
return GNUNET_OK == r ? ret : 1;
}
+
/* end of gnunet-gns-import.c */
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index 2a39efef2..7a5dbb627 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -45,7 +45,6 @@
#include "gns.h"
-
/**
* Default Socks5 listen port.
*/
@@ -298,7 +297,6 @@ struct Socks5ServerResponseMessage
};
-
/* *********************** Datastructures for HTTP handling ****************** */
/**
@@ -335,7 +333,6 @@ struct ProxyGNSCertificate
};
-
/**
* A structure for all running Httpds
*/
@@ -652,7 +649,6 @@ struct Socks5Request
};
-
/* *********************** Globals **************************** */
/**
@@ -1953,8 +1949,7 @@ create_response (void *cls,
* Pre-populate cache to resolve Hostname.
* This is necessary as the DNS name in the CURLOPT_URL is used
* for SNI http://de.wikipedia.org/wiki/Server_Name_Indication
- */
- if (NULL != s5r->leho)
+ */if (NULL != s5r->leho)
{
char *curl_hosts;
@@ -2393,6 +2388,7 @@ mhd_connection_cb (void *cls,
}
}
+
/**
* Function called when MHD first processes an incoming connection.
* Gives us the respective URI information.
@@ -3905,4 +3901,5 @@ main (int argc,
return ret;
}
+
/* end of gnunet-gns-proxy.c */
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c
index 510e46d14..c3ba0a1f8 100644
--- a/src/gns/gnunet-gns.c
+++ b/src/gns/gnunet-gns.c
@@ -110,6 +110,7 @@ do_shutdown (void *cls)
}
}
+
/**
* Task to run on timeout
*
@@ -123,6 +124,7 @@ do_timeout (void*cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Function called with the result of a GNS lookup.
*
@@ -319,4 +321,5 @@ main (int argc, char *const *argv)
return global_ret;
}
+
/* end of gnunet-gns.c */
diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c
index d6ee7f91c..a44d36c89 100644
--- a/src/gns/gnunet-service-gns_interceptor.c
+++ b/src/gns/gnunet-service-gns_interceptor.c
@@ -409,4 +409,5 @@ GNS_interceptor_done ()
}
}
+
/* end of gnunet-service-gns_interceptor.c */
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index d4f174184..01af17fdc 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -536,6 +536,7 @@ is_canonical (const char *name)
return GNUNET_YES;
}
+
/* ************************** Resolution **************************** */
/**
diff --git a/src/gns/nss/nss_gns_query.c b/src/gns/nss/nss_gns_query.c
index fb431919b..9ebdcb31f 100644
--- a/src/gns/nss/nss_gns_query.c
+++ b/src/gns/nss/nss_gns_query.c
@@ -146,4 +146,5 @@ gns_resolve_name (int af, const char *name, struct userdata *u)
return 0;
}
+
/* end of nss_gns_query.c */
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index f4f5f906c..aabedcaac 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -246,4 +246,5 @@ libgnunet_plugin_block_gns_done (void *cls)
return NULL;
}
+
/* end of plugin_block_gns.c */
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c
index e0bc4fb0c..cffd5a965 100644
--- a/src/gns/plugin_gnsrecord_gns.c
+++ b/src/gns/plugin_gnsrecord_gns.c
@@ -381,4 +381,5 @@ libgnunet_plugin_gnsrecord_gns_done (void *cls)
return NULL;
}
+
/* end of plugin_gnsrecord_gns.c */
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index cdcdd6cf8..6ae753a07 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -465,4 +465,5 @@ libgnunet_plugin_rest_gns_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_gns.c */
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 02a9fc01e..12f3f8625 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -112,6 +112,7 @@ load_file (const char*filename,
return buffer;
}
+
/**
* Load PEM key from file
*
@@ -142,6 +143,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
+
/**
* Load cert from file
*
@@ -173,6 +175,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
+
static size_t
copy_buffer (void *ptr, size_t size, size_t nmemb, void *ctx)
{
@@ -521,6 +524,7 @@ run (void *cls,
NULL);
}
+
int
main (int argc, char *const *argv)
{
@@ -568,4 +572,5 @@ main (int argc, char *const *argv)
return global_ret;
}
+
/* end of test_gns_proxy.c */
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index 9d01210be..82fb71c06 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -246,4 +246,5 @@ GNUNET_GNSRECORD_number_to_typename (uint32_t type)
return NULL;
}
+
/* end of gnsrecord.c */
diff --git a/src/gnsrecord/gnsrecord_crypto.c b/src/gnsrecord/gnsrecord_crypto.c
index b173062ff..2b05dea56 100644
--- a/src/gnsrecord/gnsrecord_crypto.c
+++ b/src/gnsrecord/gnsrecord_crypto.c
@@ -288,7 +288,6 @@ GNUNET_GNSRECORD_block_create2 (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
}
-
/**
* Check if a signature is valid. This API is used by the GNS Block
* to validate signatures received from the network.
diff --git a/src/gnsrecord/gnsrecord_serialization.c b/src/gnsrecord/gnsrecord_serialization.c
index a2711538c..42665e662 100644
--- a/src/gnsrecord/gnsrecord_serialization.c
+++ b/src/gnsrecord/gnsrecord_serialization.c
@@ -130,8 +130,7 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count,
* Efficiently round up to the next
* power of 2 for padding
* https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
- */
- ret--;
+ */ret--;
ret |= ret >> 1;
ret |= ret >> 2;
ret |= ret >> 4;
diff --git a/src/gnsrecord/perf_gnsrecord_crypto.c b/src/gnsrecord/perf_gnsrecord_crypto.c
index 4dadbe9b6..3bb4ca4e1 100644
--- a/src/gnsrecord/perf_gnsrecord_crypto.c
+++ b/src/gnsrecord/perf_gnsrecord_crypto.c
@@ -136,4 +136,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_gnsrecord_crypto.c */
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c
index 9a45b5b93..5410d9546 100644
--- a/src/gnsrecord/plugin_gnsrecord_dns.c
+++ b/src/gnsrecord/plugin_gnsrecord_dns.c
@@ -808,4 +808,5 @@ libgnunet_plugin_gnsrecord_dns_done (void *cls)
return NULL;
}
+
/* end of plugin_gnsrecord_dns.c */
diff --git a/src/gnsrecord/test_gnsrecord_block_expiration.c b/src/gnsrecord/test_gnsrecord_block_expiration.c
index 9672c2ffb..b53d7d7e8 100644
--- a/src/gnsrecord/test_gnsrecord_block_expiration.c
+++ b/src/gnsrecord/test_gnsrecord_block_expiration.c
@@ -42,7 +42,6 @@
static int res;
-
static void
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -105,4 +104,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_gnsrecord_crypto.c */
diff --git a/src/gnsrecord/test_gnsrecord_crypto.c b/src/gnsrecord/test_gnsrecord_crypto.c
index b16828147..0da19fbe9 100644
--- a/src/gnsrecord/test_gnsrecord_crypto.c
+++ b/src/gnsrecord/test_gnsrecord_crypto.c
@@ -94,6 +94,7 @@ rd_decrypt_cb (void *cls,
res = 0;
}
+
static void
run (void *cls,
char *const *args,
@@ -166,4 +167,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_gnsrecord_crypto.c */
diff --git a/src/gnsrecord/test_gnsrecord_serialization.c b/src/gnsrecord/test_gnsrecord_serialization.c
index 6905cf515..22d9f8396 100644
--- a/src/gnsrecord/test_gnsrecord_serialization.c
+++ b/src/gnsrecord/test_gnsrecord_serialization.c
@@ -153,4 +153,5 @@ main (int argcx, char *argvx[])
return res;
}
+
/* end of test_gnsrecord_serialization.c */
diff --git a/src/hello/gnunet-hello.c b/src/hello/gnunet-hello.c
index 9f277de4a..b3f48322b 100644
--- a/src/hello/gnunet-hello.c
+++ b/src/hello/gnunet-hello.c
@@ -211,4 +211,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of gnunet-hello.c */
diff --git a/src/hello/hello.c b/src/hello/hello.c
index e701e1f17..11eec9898 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -945,7 +945,6 @@ GNUNET_HELLO_get_last_expiration (const struct GNUNET_HELLO_Message *msg)
*/
-
/**
* Function that is called on each address of this peer.
* Expands the corresponding URI string.
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c
index 1580dcc55..8631d2af3 100644
--- a/src/hello/test_hello.c
+++ b/src/hello/test_hello.c
@@ -249,4 +249,5 @@ main (int argc,
return 0; /* testcase passed */
}
+
/* end of test_hello.c */
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index bf6542d7f..adb1a328d 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -413,4 +413,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-daemon-hostlist.c */
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c
index 564aef2bd..a5ff9f9fa 100644
--- a/src/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/hostlist/gnunet-daemon-hostlist_client.c
@@ -1789,4 +1789,5 @@ GNUNET_HOSTLIST_client_stop ()
cfg = NULL;
}
+
/* end of gnunet-daemon-hostlist_client.c */
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c
index 43513930a..b2b7dac72 100644
--- a/src/hostlist/gnunet-daemon-hostlist_server.c
+++ b/src/hostlist/gnunet-daemon-hostlist_server.c
@@ -899,4 +899,5 @@ GNUNET_HOSTLIST_server_stop ()
core = NULL;
}
+
/* end of gnunet-daemon-hostlist_server.c */
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index 182340f9b..d10924eac 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -260,4 +260,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_gnunet_daemon_hostlist.c */
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
index f9fabab10..a45721521 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
@@ -588,4 +588,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_gnunet_daemon_hostlist_learning.c */
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
index ce17cfe4d..657b85fd8 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
@@ -259,4 +259,5 @@ main (int argcx, char *argvx[])
return ok;
}
+
/* end of test_gnunet_daemon_hostlist_reconnect.c */
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c
index 6a5b1b1ca..1350376d9 100644
--- a/src/identity/gnunet-identity.c
+++ b/src/identity/gnunet-identity.c
@@ -446,4 +446,5 @@ main (int argc, char *const *argv)
return global_ret;
}
+
/* end of gnunet-identity.c */
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index 98b5bde45..b509e7e9a 100644
--- a/src/identity/gnunet-service-identity.c
+++ b/src/identity/gnunet-service-identity.c
@@ -127,6 +127,7 @@ get_ego_filename (struct Ego *ego)
return filename;
}
+
/**
* Called whenever a client is disconnected.
*
@@ -159,6 +160,7 @@ client_connect_cb (void *cls,
return client;
}
+
/**
* Task run during shutdown.
*
@@ -521,6 +523,7 @@ key_cmp (const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk1,
return GNUNET_memcmp (pk1, pk2);
}
+
/**
* Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT message
*
@@ -557,6 +560,7 @@ check_set_default_message (void *cls, const struct SetDefaultMessage *msg)
return GNUNET_OK;
}
+
/**
* Handler for SET_DEFAULT message from client, updates
* default identity for some service.
@@ -629,6 +633,7 @@ notify_listeners (struct Ego *ego)
GNUNET_free (um);
}
+
/**
* Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_CREATE message
*
@@ -665,6 +670,7 @@ check_create_message (void *cls, const struct CreateRequestMessage *msg)
return GNUNET_OK;
}
+
/**
* Handler for CREATE message from client, creates
* new identity.
@@ -765,6 +771,7 @@ handle_ego_rename (void *cls, const char *section)
GNUNET_free (id);
}
+
/**
* Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_RENAME message
*
@@ -916,6 +923,7 @@ handle_ego_delete (void *cls, const char *section)
GNUNET_free (id);
}
+
/**
* Checks a #GNUNET_MESSAGE_TYPE_IDENTITY_DELETE message
*
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c
index 42e25c11d..29d9b9011 100644
--- a/src/identity/identity_api.c
+++ b/src/identity/identity_api.c
@@ -865,4 +865,5 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h)
GNUNET_free (h);
}
+
/* end of identity_api.c */
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index e052ac6b3..65bbaaaba 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -291,6 +291,7 @@ cleanup_handle (void *cls)
GNUNET_free (handle);
}
+
/**
* Task run on errors. Reports an error and cleans up everything.
*
@@ -410,6 +411,7 @@ ego_get_for_subsystem (void *cls,
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
}
+
/**
* Handle identity GET request for subsystem
*
@@ -567,6 +569,7 @@ ego_get_pubkey (struct GNUNET_REST_RequestHandle *con_handle,
ego_get_response (handle, ego_entry);
}
+
/**
* Handle identity GET request with a name
*
@@ -789,6 +792,7 @@ ego_edit_pubkey (struct GNUNET_REST_RequestHandle *con_handle,
ego_edit (handle, ego_entry);
}
+
/**
* Handle identity PUT request with name
*
@@ -828,6 +832,7 @@ ego_edit_name (struct GNUNET_REST_RequestHandle *con_handle,
ego_edit (handle, ego_entry);
}
+
/**
* Handle identity subsystem PUT request with name
*
@@ -936,6 +941,7 @@ ego_edit_subsystem (struct GNUNET_REST_RequestHandle *con_handle,
return;
}
+
/**
* Handle identity POST request
*
@@ -1026,6 +1032,7 @@ ego_create (struct GNUNET_REST_RequestHandle *con_handle,
handle);
}
+
/**
* Handle identity DELETE request with public key
*
@@ -1137,6 +1144,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
return;
}
+
/**
* Handle rest request
*
@@ -1179,6 +1187,7 @@ init_cont (struct RequestHandle *handle)
}
}
+
/**
* If listing is enabled, prints information about the egos.
*
@@ -1257,7 +1266,8 @@ init_egos (void *cls,
GNUNET_free (tmp->identifier);
GNUNET_free (tmp);
}
- else {
+ else
+ {
// Renamed
GNUNET_free (tmp->identifier);
tmp->identifier = GNUNET_strdup (identifier);
@@ -1276,6 +1286,7 @@ init_egos (void *cls,
}
+
/**
* Function processing the REST call
*
@@ -1315,6 +1326,7 @@ rest_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");
}
+
/**
* Entry point for the plugin.
*
@@ -1348,6 +1360,7 @@ libgnunet_plugin_rest_identity_init (void *cls)
return api;
}
+
/**
* Exit point from the plugin.
*
@@ -1368,4 +1381,5 @@ libgnunet_plugin_rest_identity_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_identity.c */
diff --git a/src/include/block_fs.h b/src/include/block_fs.h
index 358fb43fa..e4caf6e50 100644
--- a/src/include/block_fs.h
+++ b/src/include/block_fs.h
@@ -41,7 +41,6 @@
#define MAX_UBLOCK_SIZE (60 * 1024)
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
diff --git a/src/include/compat.h b/src/include/compat.h
index 19badcefc..729e5e70a 100644
--- a/src/include/compat.h
+++ b/src/include/compat.h
@@ -44,6 +44,7 @@ void*
GN_memrchr_ (const void *s,
int c,
size_t n);
+
#ifndef HAVE_MEMRCHR
#define memrchr(s, c, n) GN_memrchr_ (s, c, n)
#endif
diff --git a/src/include/gnunet_abd_service.h b/src/include/gnunet_abd_service.h
index b50ff8b86..afec880f1 100644
--- a/src/include/gnunet_abd_service.h
+++ b/src/include/gnunet_abd_service.h
@@ -11,7 +11,7 @@
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -58,15 +58,16 @@ struct GNUNET_ABD_Request;
/*
* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
*/
-enum GNUNET_ABD_CredentialFlags {
+enum GNUNET_ABD_CredentialFlags
+{
- //Subject had credentials before, but have been revoked now
+ // Subject had credentials before, but have been revoked now
GNUNET_ABD_FLAG_REVOKED=0,
- //Subject flag indicates that the subject is a holder of this credential and may present it as such
+ // Subject flag indicates that the subject is a holder of this credential and may present it as such
GNUNET_ABD_FLAG_SUBJECT=1,
- //Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
+ // Issuer flag is used to signify that the subject is allowed to issue this credential and delegate issuance
GNUNET_ABD_FLAG_ISSUER=2
};
@@ -75,7 +76,8 @@ GNUNET_NETWORK_STRUCT_BEGIN
/**
* The attribute delegation record
*/
-struct GNUNET_ABD_DelegationRecord {
+struct GNUNET_ABD_DelegationRecord
+{
/**
* Number of delegation sets in this record
@@ -95,7 +97,8 @@ struct GNUNET_ABD_DelegationRecord {
/**
* The attribute delegation record
*/
-struct GNUNET_ABD_DelegationRecordSet {
+struct GNUNET_ABD_DelegationRecordSet
+{
/**
* Public key of the subject this attribute was delegated to
@@ -114,7 +117,8 @@ GNUNET_NETWORK_STRUCT_END
/**
* The attribute delegation record
*/
-struct GNUNET_ABD_DelegationSet {
+struct GNUNET_ABD_DelegationSet
+{
/**
* Public key of the subject this attribute was delegated to
@@ -133,7 +137,8 @@ struct GNUNET_ABD_DelegationSet {
/**
* A delegation
*/
-struct GNUNET_ABD_Delegation {
+struct GNUNET_ABD_Delegation
+{
/**
* The issuer of the delegation
@@ -170,7 +175,8 @@ struct GNUNET_ABD_Delegation {
/**
* A delegate
*/
-struct GNUNET_ABD_Delegate {
+struct GNUNET_ABD_Delegate
+{
/**
* The issuer of the credential
@@ -217,12 +223,13 @@ struct GNUNET_ABD_Delegate {
/*
* Enum used for checking whether the issuer has the authority to issue credentials or is just a subject
*/
-enum GNUNET_ABD_AlgoDirectionFlags {
+enum GNUNET_ABD_AlgoDirectionFlags
+{
- //Subject had credentials before, but have been revoked now
+ // Subject had credentials before, but have been revoked now
GNUNET_ABD_FLAG_FORWARD=1 << 0,
- //Subject flag indicates that the subject is a holder of this credential and may present it as such
+ // Subject flag indicates that the subject is a holder of this credential and may present it as such
GNUNET_ABD_FLAG_BACKWARD=1 << 1
};
@@ -256,14 +263,19 @@ GNUNET_ABD_disconnect (struct GNUNET_ABD_Handle *handle);
* @param delegate the delegates
*/
typedef void (*GNUNET_ABD_CredentialResultProcessor) (void *cls,
- unsigned int d_count,
- struct GNUNET_ABD_Delegation *delegation_chain,
- unsigned int c_count,
- struct GNUNET_ABD_Delegate *delegte);
-
+ unsigned int d_count,
+ struct
+ GNUNET_ABD_Delegation *
+ delegation_chain,
+ unsigned int c_count,
+ struct GNUNET_ABD_Delegate
+ *delegte);
+
typedef void (*GNUNET_ABD_IntermediateResultProcessor) (void *cls,
- struct GNUNET_ABD_Delegation *delegation,
- bool is_bw);
+ struct
+ GNUNET_ABD_Delegation *
+ delegation,
+ bool is_bw);
/**
* Iterator called on obtained result for an attribute delegation.
@@ -273,7 +285,7 @@ typedef void (*GNUNET_ABD_IntermediateResultProcessor) (void *cls,
* @param result the record data that can be handed to the subject
*/
typedef void (*GNUNET_ABD_DelegateResultProcessor) (void *cls,
- uint32_t success);
+ uint32_t success);
/**
* Iterator called on obtained result for an attribute delegation removal.
@@ -283,7 +295,7 @@ typedef void (*GNUNET_ABD_DelegateResultProcessor) (void *cls,
* @param result the record data that can be handed to the subject
*/
typedef void (*GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls,
- uint32_t success);
+ uint32_t success);
/**
@@ -305,28 +317,28 @@ typedef void (*GNUNET_ABD_RemoveDelegateResultProcessor) (void *cls,
* @return handle to the queued request
*/
struct GNUNET_ABD_Request*
-GNUNET_ABD_verify (struct GNUNET_ABD_Handle *handle,
- const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
- const char *issuer_attribute,
- const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
- uint32_t delegate_count,
- const struct GNUNET_ABD_Delegate *delegates,
- enum GNUNET_ABD_AlgoDirectionFlags direction,
- GNUNET_ABD_CredentialResultProcessor proc,
- void *proc_cls,
- GNUNET_ABD_IntermediateResultProcessor,
- void *proc2_cls);
+ GNUNET_ABD_verify (struct GNUNET_ABD_Handle *handle,
+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
+ const char *issuer_attribute,
+ const struct GNUNET_CRYPTO_EcdsaPublicKey *subject_key,
+ uint32_t delegate_count,
+ const struct GNUNET_ABD_Delegate *delegates,
+ enum GNUNET_ABD_AlgoDirectionFlags direction,
+ GNUNET_ABD_CredentialResultProcessor proc,
+ void *proc_cls,
+ GNUNET_ABD_IntermediateResultProcessor,
+ void *proc2_cls);
struct GNUNET_ABD_Request*
-GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle,
- const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
- const char *issuer_attribute,
- const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
- enum GNUNET_ABD_AlgoDirectionFlags direction,
- GNUNET_ABD_CredentialResultProcessor proc,
- void *proc_cls,
- GNUNET_ABD_IntermediateResultProcessor,
- void *proc2_cls);
+ GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle,
+ const struct GNUNET_CRYPTO_EcdsaPublicKey *issuer_key,
+ const char *issuer_attribute,
+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *subject_key,
+ enum GNUNET_ABD_AlgoDirectionFlags direction,
+ GNUNET_ABD_CredentialResultProcessor proc,
+ void *proc_cls,
+ GNUNET_ABD_IntermediateResultProcessor,
+ void *proc2_cls);
/**
* Delegate an attribute
@@ -342,12 +354,12 @@ GNUNET_ABD_collect (struct GNUNET_ABD_Handle *handle,
*/
struct GNUNET_ABD_Request *
GNUNET_ABD_add_delegation (struct GNUNET_ABD_Handle *handle,
- struct GNUNET_IDENTITY_Ego *issuer,
- const char *attribute,
- struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
- const char *delegated_attribute,
- GNUNET_ABD_DelegateResultProcessor proc,
- void *proc_cls);
+ struct GNUNET_IDENTITY_Ego *issuer,
+ const char *attribute,
+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
+ const char *delegated_attribute,
+ GNUNET_ABD_DelegateResultProcessor proc,
+ void *proc_cls);
/**
* Remove a delegation
@@ -361,11 +373,10 @@ GNUNET_ABD_add_delegation (struct GNUNET_ABD_Handle *handle,
*/
struct GNUNET_ABD_Request *
GNUNET_ABD_remove_delegation (struct GNUNET_ABD_Handle *handle,
- struct GNUNET_IDENTITY_Ego *issuer,
- const char *attribute,
- GNUNET_ABD_RemoveDelegateResultProcessor proc,
- void *proc_cls);
-
+ struct GNUNET_IDENTITY_Ego *issuer,
+ const char *attribute,
+ GNUNET_ABD_RemoveDelegateResultProcessor proc,
+ void *proc_cls);
/**
@@ -379,10 +390,10 @@ GNUNET_ABD_remove_delegation (struct GNUNET_ABD_Handle *handle,
*/
struct GNUNET_ABD_Delegate*
GNUNET_ABD_delegate_issue (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
- struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
- const char *iss_attr,
- const char *sub_attr,
- struct GNUNET_TIME_Absolute *expiration);
+ struct GNUNET_CRYPTO_EcdsaPublicKey *subject,
+ const char *iss_attr,
+ const char *sub_attr,
+ struct GNUNET_TIME_Absolute *expiration);
/**
diff --git a/src/include/gnunet_abe_lib.h b/src/include/gnunet_abe_lib.h
index fd1df9f0d..7aeb3520d 100644
--- a/src/include/gnunet_abe_lib.h
+++ b/src/include/gnunet_abe_lib.h
@@ -52,7 +52,6 @@ struct GNUNET_CRYPTO_AbeMasterKey;
struct GNUNET_CRYPTO_AbeKey;
-
/**
* @ingroup abe
* Create a new CP-ABE master key. Caller must free return value.
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index cd1e62bee..8b8ce3f02 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -148,7 +148,6 @@ struct GNUNET_ATS_PropertiesNBO
};
-
/* ********************* LAN Characterization library ************************ */
/* Note: these functions do not really communicate with the ATS service */
@@ -175,7 +174,6 @@ GNUNET_ATS_properties_ntoh (struct GNUNET_ATS_Properties *hbo,
const struct GNUNET_ATS_PropertiesNBO *nbo);
-
/* ********************Connection Suggestion API ***************************** */
/**
@@ -379,7 +377,6 @@ void
GNUNET_ATS_address_destroy (struct GNUNET_ATS_AddressRecord *ar);
-
/* ******************************** Performance API ***************************** */
/**
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h
index 5529ca8f4..34dd46dd5 100644
--- a/src/include/gnunet_bio_lib.h
+++ b/src/include/gnunet_bio_lib.h
@@ -137,7 +137,6 @@ GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
f, sizeof(float)))
-
/**
* Read a double.
*
@@ -270,7 +269,6 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
const struct GNUNET_CONTAINER_MetaData *m);
-
/**
* Write a float.
*
@@ -280,7 +278,6 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
#define GNUNET_BIO_write_float(h, f) GNUNET_BIO_write (h, &f, sizeof(float))
-
/**
* Write a double.
*
diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h
index b01134f09..ee237ac03 100644
--- a/src/include/gnunet_block_plugin.h
+++ b/src/include/gnunet_block_plugin.h
@@ -215,7 +215,6 @@ typedef int
struct GNUNET_HashCode *key);
-
/**
* Each plugin is required to return a pointer to a struct of this
* type as the return value from its entry point.
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 4af43d857..4fdc2d777 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -418,6 +418,7 @@ GNUNET_get_log_call_status (int caller_level,
const char *file,
const char *function,
int line);
+
#endif
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index 4df8d8965..302429430 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -341,7 +341,6 @@ GNUNET_CONFIGURATION_get_value_time (const struct
struct GNUNET_TIME_Relative *time);
-
/**
* Get a configuration value that should be a size in bytes.
*
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h
index 35cf424fb..9387aa095 100644
--- a/src/include/gnunet_consensus_service.h
+++ b/src/include/gnunet_consensus_service.h
@@ -68,7 +68,6 @@ typedef void (*GNUNET_CONSENSUS_ElementCallback) (void *cls,
GNUNET_SET_Element *element);
-
/**
* Opaque handle for the consensus service.
*/
@@ -139,7 +138,6 @@ GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus,
void *idc_cls);
-
/**
* Called when a conclusion was successful.
*
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h
index e2678a60e..e1572635f 100644
--- a/src/include/gnunet_constants.h
+++ b/src/include/gnunet_constants.h
@@ -41,7 +41,6 @@ extern "C"
#endif
-
/**
* Bandwidth (in/out) to assume initially (before either peer has
* communicated any particular preference). Should be rather low; set
@@ -165,8 +164,6 @@ extern "C"
#define GNUNET_CONSTANTS_BLOOMFILTER_K 16
-
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 57b813225..c99db67bc 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -341,7 +341,6 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
void *proc_cls);
-
/**
* Cancel a datastore operation. The final callback from the
* operation must not have been done yet.
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 573a800e5..ea3ea92fa 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -55,7 +55,6 @@ extern "C"
GNUNET_TIME_UNIT_MINUTES, 60)
-
/**
* Connection to the DHT service.
*/
@@ -356,7 +355,6 @@ typedef void
size_t size);
-
/**
* Start monitoring the local DHT service.
*
diff --git a/src/include/gnunet_dns_service.h b/src/include/gnunet_dns_service.h
index da2881e5b..66f6890f8 100644
--- a/src/include/gnunet_dns_service.h
+++ b/src/include/gnunet_dns_service.h
@@ -96,7 +96,6 @@ enum GNUNET_DNS_Flags
};
-
/**
* Signature of a function that is called whenever the DNS service
* encounters a DNS request and needs to do something with it. The
diff --git a/src/include/gnunet_dnsparser_lib.h b/src/include/gnunet_dnsparser_lib.h
index cbb53e416..8d882a216 100644
--- a/src/include/gnunet_dnsparser_lib.h
+++ b/src/include/gnunet_dnsparser_lib.h
@@ -407,7 +407,6 @@ struct GNUNET_DNSPARSER_CaaRecord
};
-
/**
* Binary record information (unparsed).
*/
diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h
index 6683a08d7..512a9b93b 100644
--- a/src/include/gnunet_fragmentation_lib.h
+++ b/src/include/gnunet_fragmentation_lib.h
@@ -218,7 +218,6 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
const struct GNUNET_MessageHeader *msg);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 2b25b5c81..01d736e89 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -103,7 +103,6 @@ typedef int
int is_mandatory);
-
/**
* Get a unique key from a URI. This is for putting URIs
* into HashMaps. The key may change between FS implementations.
@@ -491,7 +490,6 @@ GNUNET_FS_getopt_set_metadata (struct
const char *value);
-
/* ************************* sharing API ***************** */
@@ -2343,7 +2341,6 @@ enum GNUNET_FS_DownloadOptions
};
-
/**
* Download parts of a file. Note that this will store
* the blocks at the respective offset in the given file. Also, the
@@ -2456,7 +2453,6 @@ void
GNUNET_FS_download_resume (struct GNUNET_FS_DownloadContext *dc);
-
/* ******************** Directory API *********************** */
diff --git a/src/include/gnunet_my_lib.h b/src/include/gnunet_my_lib.h
index 04dddeb92..74e7bf492 100644
--- a/src/include/gnunet_my_lib.h
+++ b/src/include/gnunet_my_lib.h
@@ -44,7 +44,6 @@ extern "C"
#endif
-
/**
* Information we pass to #GNUNET_MY_exec_prepared() to
* initialize the arguments of the prepared statement.
@@ -258,7 +257,6 @@ struct GNUNET_MY_ResultSpec
#define GNUNET_MY_result_spec_end { NULL, NULL, NULL, 0, NULL, 0, 0 }
-
/**
* Obtain fixed size result of @a ptr_size bytes from
* MySQL, store in already allocated buffer at @a ptr.
diff --git a/src/include/gnunet_namecache_service.h b/src/include/gnunet_namecache_service.h
index da2121d31..07b26aec3 100644
--- a/src/include/gnunet_namecache_service.h
+++ b/src/include/gnunet_namecache_service.h
@@ -104,7 +104,6 @@ typedef void
const char *emsg);
-
/**
* Store an item in the namecache. If the item is already present,
* it is replaced with the new record.
diff --git a/src/include/gnunet_nat_service.h b/src/include/gnunet_nat_service.h
index 4273b5ad1..b66c188cc 100644
--- a/src/include/gnunet_nat_service.h
+++ b/src/include/gnunet_nat_service.h
@@ -236,7 +236,6 @@ enum GNUNET_NAT_StatusCode
};
-
/**
* What the situation of the NAT connectivity
*/
@@ -269,7 +268,6 @@ enum GNUNET_NAT_Type
};
-
/**
* Signature of the callback passed to #GNUNET_NAT_register() for
* a function to call whenever our set of 'valid' addresses changes.
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index e4c0d6cdb..2eada2783 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -625,7 +625,6 @@ int
GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
-
/**
* Retrieve the status of a process, waiting on it if dead.
* Blocking version.
diff --git a/src/include/gnunet_rps_service.h b/src/include/gnunet_rps_service.h
index b6f2e2456..f5df8639f 100644
--- a/src/include/gnunet_rps_service.h
+++ b/src/include/gnunet_rps_service.h
@@ -200,6 +200,7 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
uint32_t num_peers,
const struct GNUNET_PeerIdentity *ids,
const struct GNUNET_PeerIdentity *target_peer);
+
#endif /* ENABLE_MALICIOUS */
/* Get internals for debugging/profiling purposes */
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index da968737e..b828e2db7 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -209,8 +209,6 @@ struct GNUNET_SCHEDULER_TaskContext
};
-
-
/**
* Function used by event-loop implementations to signal the scheduler
* that a particular @a task is ready due to an event specified in the
@@ -907,7 +905,6 @@ GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
void *new_select_cls);
-
/**
* Change the async scope for the currently executing task and (transitively)
* for all tasks scheduled by the current task after calling this function.
@@ -924,7 +921,6 @@ void
GNUNET_SCHEDULER_begin_async_scope (struct GNUNET_AsyncScopeId *aid);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/include/gnunet_secretsharing_service.h b/src/include/gnunet_secretsharing_service.h
index 9bacee06e..127f1db78 100644
--- a/src/include/gnunet_secretsharing_service.h
+++ b/src/include/gnunet_secretsharing_service.h
@@ -95,7 +95,6 @@ extern "C"
"1d7024c3650f60d0da"
-
/**
* Session that will eventually establish a shared secred between
* the involved peers and allow encryption and cooperative decryption.
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h
index 19a5fb89b..ad238a0fa 100644
--- a/src/include/gnunet_service_lib.h
+++ b/src/include/gnunet_service_lib.h
@@ -84,7 +84,6 @@ enum GNUNET_SERVICE_Options
};
-
/* **************** NEW SERVICE API ********************** */
/**
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h
index 13f761d7d..187c65626 100644
--- a/src/include/gnunet_set_service.h
+++ b/src/include/gnunet_set_service.h
@@ -153,7 +153,6 @@ enum GNUNET_SET_Status
};
-
/**
* The way results are given to the client.
*/
@@ -324,7 +323,6 @@ typedef void
struct GNUNET_SET_Request *request);
-
typedef void
(*GNUNET_SET_CopyReadyCallback) (void *cls,
struct GNUNET_SET_Handle *copy);
diff --git a/src/include/gnunet_sq_lib.h b/src/include/gnunet_sq_lib.h
index b6b09eb67..21ce5b393 100644
--- a/src/include/gnunet_sq_lib.h
+++ b/src/include/gnunet_sq_lib.h
@@ -98,7 +98,6 @@ GNUNET_SQ_query_param_fixed_size (const void *ptr,
size_t ptr_size);
-
/**
* Generate query parameter for a string.
*
@@ -452,7 +451,6 @@ void
GNUNET_SQ_cleanup_result (struct GNUNET_SQ_ResultSpec *rs);
-
/* ******************** sq_prepare.c functions ************** */
@@ -492,7 +490,6 @@ GNUNET_SQ_make_prepare (const char *sql,
sqlite3_stmt **pstmt);
-
/**
* Prepare all statements given in the (NULL,NULL)-terminated
* array at @a ps
@@ -568,7 +565,6 @@ GNUNET_SQ_exec_statements (sqlite3 *dbh,
const struct GNUNET_SQ_ExecuteStatement *es);
-
#endif /* GNUNET_SQ_LIB_H_ */
/* end of include/gnunet_sq_lib.h */
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index dfb03d67a..20e958865 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -218,7 +218,6 @@ GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
int make_persistent);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 7f532c97a..0c659bfb3 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -235,7 +235,6 @@ GNUNET_STRINGS_buffer_tokenize (const char *buffer,
unsigned int count, ...);
-
/**
* @ingroup time
* Like `asctime`, except for GNUnet time. Converts a GNUnet internal
diff --git a/src/include/gnunet_testbed_service.h b/src/include/gnunet_testbed_service.h
index d45f5bc34..03c372623 100644
--- a/src/include/gnunet_testbed_service.h
+++ b/src/include/gnunet_testbed_service.h
@@ -95,7 +95,6 @@ GNUNET_TESTBED_host_create (const char *hostname,
uint16_t port);
-
/**
* Create a host to run peers and controllers on. This function is used
* if a peer learns about a host via IPC between controllers (and thus
@@ -875,7 +874,6 @@ GNUNET_TESTBED_shutdown_peers (struct GNUNET_TESTBED_Controller *c,
void *cb_cls);
-
/**
* Options for peer connections.
*/
@@ -943,7 +941,6 @@ GNUNET_TESTBED_underlay_configure_link (void *op_cls,
...);
-
/**
* Topologies and topology options supported for testbeds. Options should always
* end with #GNUNET_TESTBED_TOPOLOGY_OPTION_END
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 3c3ef8f2e..22e142e43 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -242,6 +242,7 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system,
int
GNUNET_TESTING_configuration_create (struct GNUNET_TESTING_System *system,
struct GNUNET_CONFIGURATION_Handle *cfg);
+
// FIXME: add dual to 'release' ports again...
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index fd6010f5d..6f14de2f4 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -163,7 +163,6 @@ GNUNET_NETWORK_STRUCT_END
#define GNUNET_TIME_UNIT_FOREVER_ABS GNUNET_TIME_absolute_get_forever_ ()
-
/**
* Threshold after which exponential backoff should not increase (15 m).
*/
@@ -326,7 +325,6 @@ GNUNET_TIME_relative_min (struct GNUNET_TIME_Relative t1,
struct GNUNET_TIME_Relative t2);
-
/**
* Return the maximum of two relative time values.
*
diff --git a/src/include/platform.h b/src/include/platform.h
index 85f451bea..dd5e28760 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -205,6 +205,7 @@
#if ! HAVE_ATOLL
long long
atoll (const char *nptr);
+
#endif
#if ENABLE_NLS
diff --git a/src/json/json_generator.c b/src/json/json_generator.c
index 72ee05dfc..6373d65d8 100644
--- a/src/json/json_generator.c
+++ b/src/json/json_generator.c
@@ -161,6 +161,7 @@ GNUNET_JSON_from_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *sig)
return ret;
}
+
/**
* Convert GNS record to JSON.
*
diff --git a/src/json/json_mhd.c b/src/json/json_mhd.c
index 602a15b7a..dac4a5f2d 100644
--- a/src/json/json_mhd.c
+++ b/src/json/json_mhd.c
@@ -364,4 +364,5 @@ GNUNET_JSON_post_parser_cleanup (void *con_cls)
}
}
+
/* end of mhd_json.c */
diff --git a/src/json/test_json.c b/src/json/test_json.c
index f77d9add9..4485a37a4 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -225,4 +225,5 @@ main (int argc, const char *const argv[])
return 0;
}
+
/* end of test_json.c */
diff --git a/src/json/test_json_mhd.c b/src/json/test_json_mhd.c
index 6af1edd86..5ab1b63ca 100644
--- a/src/json/test_json_mhd.c
+++ b/src/json/test_json_mhd.c
@@ -188,4 +188,5 @@ main (int argc, const char *const argv[])
return global_ret;
}
+
/* end of test_json_mhd.c */
diff --git a/src/namecache/gnunet-namecache.c b/src/namecache/gnunet-namecache.c
index 20729e125..15a0c96ee 100644
--- a/src/namecache/gnunet-namecache.c
+++ b/src/namecache/gnunet-namecache.c
@@ -242,4 +242,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-namecache.c */
diff --git a/src/namecache/plugin_namecache_flat.c b/src/namecache/plugin_namecache_flat.c
index 14406c13d..69b54fcf3 100644
--- a/src/namecache/plugin_namecache_flat.c
+++ b/src/namecache/plugin_namecache_flat.c
@@ -188,6 +188,7 @@ database_setup (struct Plugin *plugin)
return GNUNET_OK;
}
+
/**
* Store values in hashmap in file and free data
*
@@ -232,6 +233,7 @@ store_and_free_entries (void *cls,
return GNUNET_YES;
}
+
/**
* Shutdown database connection and associate data
* structures.
@@ -263,6 +265,7 @@ database_shutdown (struct Plugin *plugin)
GNUNET_DISK_file_close (fh);
}
+
static int
expire_blocks (void *cls,
const struct GNUNET_HashCode *key,
@@ -285,7 +288,6 @@ expire_blocks (void *cls,
}
-
/**
* Removes any expired block.
*
@@ -430,4 +432,5 @@ libgnunet_plugin_namecache_flat_done (void *cls)
return NULL;
}
+
/* end of plugin_namecache_sqlite.c */
diff --git a/src/namecache/plugin_namecache_postgres.c b/src/namecache/plugin_namecache_postgres.c
index 35bf5c2ff..f4a114e22 100644
--- a/src/namecache/plugin_namecache_postgres.c
+++ b/src/namecache/plugin_namecache_postgres.c
@@ -348,4 +348,5 @@ libgnunet_plugin_namecache_postgres_done (void *cls)
return NULL;
}
+
/* end of plugin_namecache_postgres.c */
diff --git a/src/namecache/plugin_namecache_sqlite.c b/src/namecache/plugin_namecache_sqlite.c
index ee3ec7eab..8f762cb40 100644
--- a/src/namecache/plugin_namecache_sqlite.c
+++ b/src/namecache/plugin_namecache_sqlite.c
@@ -592,4 +592,5 @@ libgnunet_plugin_namecache_sqlite_done (void *cls)
return NULL;
}
+
/* end of plugin_namecache_sqlite.c */
diff --git a/src/namecache/test_namecache_api_cache_block.c b/src/namecache/test_namecache_api_cache_block.c
index 2b25a26f9..9b150c9d9 100644
--- a/src/namecache/test_namecache_api_cache_block.c
+++ b/src/namecache/test_namecache_api_cache_block.c
@@ -148,6 +148,7 @@ name_lookup_proc (void *cls,
(void *) name));
}
+
static void
cache_cont (void *cls, int32_t success, const char *emsg)
{
diff --git a/src/namecache/test_plugin_namecache.c b/src/namecache/test_plugin_namecache.c
index e4ca145d7..5e0cd7cfd 100644
--- a/src/namecache/test_plugin_namecache.c
+++ b/src/namecache/test_plugin_namecache.c
@@ -128,4 +128,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_plugin_namecache.c */
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 93048ca1a..ca9f6ed0e 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -698,6 +698,7 @@ lookup_it_processor (void *cls,
GNUNET_NAMESTORE_zone_iterator_next (request->lookup_it, 1);
}
+
static void
lookup_it_finished (void *cls)
{
@@ -729,6 +730,7 @@ lookup_it_finished (void *cls)
request);
}
+
/**
* Main MHD callback for handling requests.
*
@@ -1212,4 +1214,5 @@ main (int argc,
return ret;
}
+
/* end of gnunet-namestore-fcfsd.c */
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 65c0f7726..df2b49a62 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -1677,4 +1677,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-namestore.c */
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c
index bbbe7d783..eca02bdc3 100644
--- a/src/namestore/gnunet-zoneimport.c
+++ b/src/namestore/gnunet-zoneimport.c
@@ -1881,4 +1881,5 @@ main (int argc, char *const *argv)
return 0;
}
+
/* end of gnunet-zoneimport.c */
diff --git a/src/namestore/namestore.h b/src/namestore/namestore.h
index 0fb5bea7c..6f45ab1c1 100644
--- a/src/namestore/namestore.h
+++ b/src/namestore/namestore.h
@@ -185,7 +185,6 @@ struct LabelLookupResponseMessage
};
-
/**
* Lookup a name for a zone hash
*/
@@ -340,7 +339,6 @@ struct ZoneMonitorNextMessage
};
-
/**
* Start a zone iteration for the given zone
*/
diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c
index a7046c940..ab6140328 100644
--- a/src/namestore/namestore_api_monitor.c
+++ b/src/namestore/namestore_api_monitor.c
@@ -384,4 +384,5 @@ GNUNET_NAMESTORE_zone_monitor_stop (struct GNUNET_NAMESTORE_ZoneMonitor *zm)
GNUNET_free (zm);
}
+
/* end of namestore_api_monitor.c */
diff --git a/src/namestore/plugin_namestore_flat.c b/src/namestore/plugin_namestore_flat.c
index 89cab6e52..dbceab45d 100644
--- a/src/namestore/plugin_namestore_flat.c
+++ b/src/namestore/plugin_namestore_flat.c
@@ -811,4 +811,5 @@ libgnunet_plugin_namestore_flat_done (void *cls)
return NULL;
}
+
/* end of plugin_namestore_flat.c */
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c
index 23893538b..d0fc33fe9 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -622,4 +622,5 @@ libgnunet_plugin_namestore_postgres_done (void *cls)
return NULL;
}
+
/* end of plugin_namestore_postgres.c */
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index fbf30567b..a909221e2 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -787,4 +787,5 @@ libgnunet_plugin_namestore_sqlite_done (void *cls)
return NULL;
}
+
/* end of plugin_namestore_sqlite.c */
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index 07b3840c5..d2a93a286 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -947,4 +947,5 @@ libgnunet_plugin_rest_namestore_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_namestore.c */
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c
index 976e8bc1e..b3946de34 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -305,6 +305,7 @@ run (void *cls,
}
}
+
#include "test_common.c"
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index f7271cd76..a23424d30 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -30,7 +30,6 @@
#define TEST_RECORD_TYPE GNUNET_DNSPARSER_TYPE_TXT
-
#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c
index 10160cd13..ff826804e 100644
--- a/src/namestore/test_namestore_api_remove.c
+++ b/src/namestore/test_namestore_api_remove.c
@@ -222,4 +222,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_namestore_api_remove.c */
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 5558696a8..217f8a51a 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -179,4 +179,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_namestore_api_remove_not_existing_record.c */
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 50c247b14..d37fb8cd3 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -455,4 +455,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_namestore_api_zone_iteration_specific_zone.c */
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 2f8ea9a97..81fb4de7e 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -473,4 +473,5 @@ main (int argc, char *argv[])
return res;
}
+
/* end of test_namestore_api_zone_iteration_stop.c */
diff --git a/src/namestore/test_namestore_api_zone_to_name.c b/src/namestore/test_namestore_api_zone_to_name.c
index 68f2461f1..65366e267 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -266,4 +266,5 @@ main (int argc,
return res;
}
+
/* end of test_namestore_api_zone_to_name.c */
diff --git a/src/namestore/test_plugin_namestore.c b/src/namestore/test_plugin_namestore.c
index 03b1a21e4..0f9ce97e4 100644
--- a/src/namestore/test_plugin_namestore.c
+++ b/src/namestore/test_plugin_namestore.c
@@ -201,4 +201,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_plugin_namestore.c */
diff --git a/src/nat-auto/gnunet-nat-auto_legacy.c b/src/nat-auto/gnunet-nat-auto_legacy.c
index 0a531d5cd..8ba50c184 100644
--- a/src/nat-auto/gnunet-nat-auto_legacy.c
+++ b/src/nat-auto/gnunet-nat-auto_legacy.c
@@ -593,4 +593,5 @@ GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst)
GNUNET_free (tst);
}
+
/* end of nat_test.c */
diff --git a/src/nat-auto/gnunet-nat-server.c b/src/nat-auto/gnunet-nat-server.c
index 5186cb8c0..499893c70 100644
--- a/src/nat-auto/gnunet-nat-server.c
+++ b/src/nat-auto/gnunet-nat-server.c
@@ -320,7 +320,6 @@ force_timeout (void *cls)
}
-
/**
* Callback called when a client connects to the service.
*
@@ -395,9 +394,9 @@ GNUNET_ARM_memory_init ()
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
-#endif
+#endif
/* end of gnunet-nat-server.c */
diff --git a/src/nat-auto/gnunet-service-nat-auto.c b/src/nat-auto/gnunet-service-nat-auto.c
index 2c7faae2e..51c82f6b3 100644
--- a/src/nat-auto/gnunet-service-nat-auto.c
+++ b/src/nat-auto/gnunet-service-nat-auto.c
@@ -481,6 +481,8 @@ GNUNET_ARM_memory_init ()
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
/* end of gnunet-service-nat.c */
diff --git a/src/nat-auto/nat-auto.h b/src/nat-auto/nat-auto.h
index bee8ecf26..ac0e7c2d5 100644
--- a/src/nat-auto/nat-auto.h
+++ b/src/nat-auto/nat-auto.h
@@ -29,7 +29,6 @@
#include "gnunet_util_lib.h"
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
diff --git a/src/nat-auto/nat_auto_api.c b/src/nat-auto/nat_auto_api.c
index f7a821a82..3c982f883 100644
--- a/src/nat-auto/nat_auto_api.c
+++ b/src/nat-auto/nat_auto_api.c
@@ -31,7 +31,6 @@
#include "nat-auto.h"
-
/**
* Handle to auto-configuration in progress.
*/
@@ -289,4 +288,5 @@ GNUNET_NAT_AUTO_autoconfig_cancel (struct GNUNET_NAT_AUTO_AutoHandle *ah)
GNUNET_free (ah);
}
+
/* end of nat_api_auto.c */
diff --git a/src/nat-auto/nat_auto_api_test.c b/src/nat-auto/nat_auto_api_test.c
index 0d35d869f..ec7557cd0 100644
--- a/src/nat-auto/nat_auto_api_test.c
+++ b/src/nat-auto/nat_auto_api_test.c
@@ -598,4 +598,5 @@ GNUNET_NAT_AUTO_test_stop (struct GNUNET_NAT_AUTO_Test *tst)
GNUNET_free (tst);
}
+
/* end of nat_auto_api_test.c */
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c
index 5d12092e7..12abfd2df 100644
--- a/src/nat/gnunet-helper-nat-client.c
+++ b/src/nat/gnunet-helper-nat-client.c
@@ -541,4 +541,5 @@ cleanup:
return global_ret;
}
+
/* end of gnunet-helper-nat-client.c */
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 59a340324..9a70622c4 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -1732,8 +1732,7 @@ handle_stun (void *cls,
removed again. The timeout frequency should be configurable
(with a sane default), so that the UDP plugin can tell how
often to re-request STUN.
- */
- struct StunExternalIP *se;
+ */struct StunExternalIP *se;
/* Check if we had a prior response from this STUN server */
for (se = se_head; NULL != se; se = se->next)
@@ -2077,6 +2076,8 @@ GNUNET_ARM_memory_init ()
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
/* end of gnunet-service-nat.c */
diff --git a/src/nat/gnunet-service-nat_externalip.c b/src/nat/gnunet-service-nat_externalip.c
index 0a251bdb2..c2625be2d 100644
--- a/src/nat/gnunet-service-nat_externalip.c
+++ b/src/nat/gnunet-service-nat_externalip.c
@@ -312,4 +312,5 @@ GN_external_ipv4_monitor_stop (struct GN_ExternalIPMonitor *mon)
GNUNET_free (mon);
}
+
/* end of gnunet-service-nat_externalip.c */
diff --git a/src/nat/gnunet-service-nat_mini.c b/src/nat/gnunet-service-nat_mini.c
index 1382010bd..ae94e3f5b 100644
--- a/src/nat/gnunet-service-nat_mini.c
+++ b/src/nat/gnunet-service-nat_mini.c
@@ -443,8 +443,7 @@ process_refresh_output (void *cls, const char *line)
*
* "%s TCP PORT->STRING:OURPORT *" or
* "%s UDP PORT->STRING:OURPORT *"
- */
- GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
+ */GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
if (NULL == (s = strstr (line, "->")))
return; /* skip */
if (NULL == strstr (s, pstr))
@@ -554,8 +553,7 @@ process_map_output (void *cls, const char *line)
* The upnpc output we're after looks like this:
*
* "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000"
- */
- if ((NULL == (ipaddr = strstr (line, " "))) ||
+ */if ((NULL == (ipaddr = strstr (line, " "))) ||
(NULL == (pstr = strstr (ipaddr, ":"))) ||
(1 != sscanf (pstr + 1, "%u", &port)))
{
diff --git a/src/nat/gnunet-service-nat_stun.c b/src/nat/gnunet-service-nat_stun.c
index 8a5311254..203728ebf 100644
--- a/src/nat/gnunet-service-nat_stun.c
+++ b/src/nat/gnunet-service-nat_stun.c
@@ -211,4 +211,5 @@ GNUNET_NAT_stun_handle_packet_ (const void *data,
return ret;
}
+
/* end of gnunet-service-nat_stun.c */
diff --git a/src/nat/nat.h b/src/nat/nat.h
index aac8db64c..1d8648aaf 100644
--- a/src/nat/nat.h
+++ b/src/nat/nat.h
@@ -29,7 +29,6 @@
#include "gnunet_util_lib.h"
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index f04cf5669..69a2f4218 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -188,4 +188,5 @@ main (int argc, char *const argv[])
return 0;
}
+
/* end of test_nat.c */
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c
index 49c801571..8cbd4131d 100644
--- a/src/nat/test_nat_mini.c
+++ b/src/nat/test_nat_mini.c
@@ -75,6 +75,7 @@ stop (void *cls)
GNUNET_NAT_mini_map_stop (mini);
}
+
#define PORT 10000
/**
@@ -129,4 +130,5 @@ main (int argc, char *const argv[])
return 0;
}
+
/* end of test_nat_mini.c */
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 1eabab50c..43998c97c 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -138,4 +138,5 @@ main (int argc, char *const argv[])
return ret;
}
+
/* end of test_nat_test.c */
diff --git a/src/nat/test_stun.c b/src/nat/test_stun.c
index 41e962ea0..a41734af1 100644
--- a/src/nat/test_stun.c
+++ b/src/nat/test_stun.c
@@ -35,7 +35,6 @@
#include "gnunet_nat_lib.h"
-
#define LOG(kind, ...) GNUNET_log_from (kind, "test-stun", __VA_ARGS__)
/**
@@ -310,4 +309,5 @@ main (int argc, char *const argv[])
return ret;
}
+
/* end of test_stun.c */
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c
index c97798772..81a16b245 100644
--- a/src/nse/gnunet-nse-profiler.c
+++ b/src/nse/gnunet-nse-profiler.c
@@ -917,4 +917,5 @@ main (int argc, char *const *argv)
return ok;
}
+
/* end of nse-profiler.c */
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index fe32dc30b..e31b07d14 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -1046,7 +1046,7 @@ handle_p2p_estimate (void *cls,
#if ENABLE_NSE_HISTOGRAM
peer_entry->received_messages++;
- if ((peer_entry->transmitted_messages > 0)&&
+ if ((peer_entry->transmitted_messages > 0) &&
(peer_entry->last_transmitted_size >= matching_bits) )
GNUNET_STATISTICS_update (stats, "# cross messages", 1, GNUNET_NO);
#endif
@@ -1253,6 +1253,8 @@ flush_comp_cb (void *cls, size_t size)
GNUNET_TESTBED_LOGGER_disconnect (lh);
lh = NULL;
}
+
+
#endif
@@ -1388,6 +1390,8 @@ status_cb (void *cls, int status)
GNUNET_SCHEDULER_shutdown ();
}
}
+
+
#endif
@@ -1581,12 +1585,15 @@ GNUNET_SERVICE_MAIN ("nse",
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_ARM_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
diff --git a/src/nse/nse_api.c b/src/nse/nse_api.c
index af6a2065b..5ed596bf2 100644
--- a/src/nse/nse_api.c
+++ b/src/nse/nse_api.c
@@ -205,4 +205,5 @@ GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h)
GNUNET_free (h);
}
+
/* end of nse_api.c */
diff --git a/src/nse/perf_kdf.c b/src/nse/perf_kdf.c
index a6c1432c8..ec6dc7ff3 100644
--- a/src/nse/perf_kdf.c
+++ b/src/nse/perf_kdf.c
@@ -29,7 +29,6 @@
#include <gauger.h>
-
/**
* Calculate the 'proof-of-work' hash (an expensive hash).
*
@@ -84,4 +83,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of perf_kdf.c */
diff --git a/src/nse/test_nse_api.c b/src/nse/test_nse_api.c
index 3b9682696..f1b7c652b 100644
--- a/src/nse/test_nse_api.c
+++ b/src/nse/test_nse_api.c
@@ -47,6 +47,7 @@ end_test (void *cls)
}
}
+
/**
* Callback to call when network size estimate is updated.
*
@@ -102,4 +103,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_nse_api.c */
diff --git a/src/nse/test_nse_multipeer.c b/src/nse/test_nse_multipeer.c
index 4c998373e..6ee03b3fa 100644
--- a/src/nse/test_nse_multipeer.c
+++ b/src/nse/test_nse_multipeer.c
@@ -231,4 +231,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_nse_multipeer.c */
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 7fa7ab2f5..4d4c4de33 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -408,6 +408,7 @@ print_peer_info (void *cls,
GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &print_address, pc);
}
+
/* ************************* DUMP Hello ************************** */
/**
@@ -858,4 +859,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-peerinfo.c */
diff --git a/src/peerinfo-tool/gnunet-peerinfo_plugins.c b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
index 9449dd67e..901ded014 100644
--- a/src/peerinfo-tool/gnunet-peerinfo_plugins.c
+++ b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
@@ -77,7 +77,6 @@ static struct TransportPlugin *plugins_head;
static struct TransportPlugin *plugins_tail;
-
/**
* Load and initialize all plugins. The respective functions will be
* invoked by the plugins when the respective events happen. The
diff --git a/src/peerinfo-tool/plugin_rest_peerinfo.c b/src/peerinfo-tool/plugin_rest_peerinfo.c
index 176e24e42..7544b5ede 100644
--- a/src/peerinfo-tool/plugin_rest_peerinfo.c
+++ b/src/peerinfo-tool/plugin_rest_peerinfo.c
@@ -614,6 +614,7 @@ peerinfo_list_iteration (void *cls,
pc);
}
+
/**
* Handle peerinfo GET request
*
@@ -669,7 +670,6 @@ peerinfo_get (struct GNUNET_REST_RequestHandle *con_handle,
}
-
/**
* Respond to OPTIONS request
*
@@ -818,4 +818,5 @@ libgnunet_plugin_rest_peerinfo_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_peerinfo.c */
diff --git a/src/peerinfo/peerinfo.h b/src/peerinfo/peerinfo.h
index 69992170f..7db923d4d 100644
--- a/src/peerinfo/peerinfo.h
+++ b/src/peerinfo/peerinfo.h
@@ -32,7 +32,6 @@
#include "gnunet_peerinfo_service.h"
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index 52d7b4192..b73d9d927 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -239,7 +239,6 @@ mq_error_handler (void *cls,
}
-
/**
* Function called when we receive an info message. Check it is
* well-formed.
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c
index 778fe2344..5f4c123ff 100644
--- a/src/peerinfo/peerinfo_api_notify.c
+++ b/src/peerinfo/peerinfo_api_notify.c
@@ -287,4 +287,5 @@ GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc)
GNUNET_free (nc);
}
+
/* end of peerinfo_api_notify.c */
diff --git a/src/peerinfo/perf_peerinfo_api.c b/src/peerinfo/perf_peerinfo_api.c
index 0c8c22345..055388d43 100644
--- a/src/peerinfo/perf_peerinfo_api.c
+++ b/src/peerinfo/perf_peerinfo_api.c
@@ -189,4 +189,5 @@ main (int argc,
return 0;
}
+
/* end of perf_peerinfo_api.c */
diff --git a/src/peerinfo/test_peerinfo_api.c b/src/peerinfo/test_peerinfo_api.c
index b13b9dc57..27df6e37b 100644
--- a/src/peerinfo/test_peerinfo_api.c
+++ b/src/peerinfo/test_peerinfo_api.c
@@ -81,6 +81,7 @@ address_generator (void *cls, size_t max, void *buf)
return ret;
}
+
struct GNUNET_PeerIdentity pid;
static void
@@ -167,4 +168,5 @@ main (int argc, char *argv[])
return global_ret;
}
+
/* end of test_peerinfo_api.c */
diff --git a/src/peerinfo/test_peerinfo_api_friend_only.c b/src/peerinfo/test_peerinfo_api_friend_only.c
index 8d50cf417..a5414e701 100644
--- a/src/peerinfo/test_peerinfo_api_friend_only.c
+++ b/src/peerinfo/test_peerinfo_api_friend_only.c
@@ -168,4 +168,5 @@ main (int argc,
return global_ret;
}
+
/* end of test_peerinfo_api_friend_only */
diff --git a/src/peerinfo/test_peerinfo_api_notify_friend_only.c b/src/peerinfo/test_peerinfo_api_notify_friend_only.c
index 7c5162102..6d5793dcf 100644
--- a/src/peerinfo/test_peerinfo_api_notify_friend_only.c
+++ b/src/peerinfo/test_peerinfo_api_notify_friend_only.c
@@ -108,6 +108,7 @@ done (void *cls)
GNUNET_break (0);
}
+
static ssize_t
address_generator (void *cls, size_t max, void *buf)
{
@@ -171,6 +172,7 @@ process_w_fo (void *cls,
}
}
+
static void
process_wo_fo (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_HELLO_Message *hello, const char *err_msg)
@@ -255,4 +257,5 @@ main (int argc, char *argv[])
return global_ret;
}
+
/* end of test_peerinfo_api_notify_friend_only.c */
diff --git a/src/peerinfo/test_peerinfo_shipped_hellos.c b/src/peerinfo/test_peerinfo_shipped_hellos.c
index 24cc26a94..45ea73be6 100644
--- a/src/peerinfo/test_peerinfo_shipped_hellos.c
+++ b/src/peerinfo/test_peerinfo_shipped_hellos.c
@@ -140,4 +140,5 @@ main (int argc,
return global_ret;
}
+
/* end of test_peerinfo_shipped_hellos.c */
diff --git a/src/peerstore/gnunet-peerstore.c b/src/peerstore/gnunet-peerstore.c
index 392318f84..11313b5d3 100644
--- a/src/peerstore/gnunet-peerstore.c
+++ b/src/peerstore/gnunet-peerstore.c
@@ -93,4 +93,5 @@ main (int argc, char *const *argv)
NULL)) ? ret : 1;
}
+
/* end of gnunet-peerstore.c */
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index e5881a6b4..17f73d70a 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -930,4 +930,5 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
return wc;
}
+
/* end of peerstore_api.c */
diff --git a/src/peerstore/perf_peerstore_store.c b/src/peerstore/perf_peerstore_store.c
index bdff19cb5..24c7e4f01 100644
--- a/src/peerstore/perf_peerstore_store.c
+++ b/src/peerstore/perf_peerstore_store.c
@@ -105,4 +105,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of perf_peerstore_store.c */
diff --git a/src/peerstore/plugin_peerstore_flat.c b/src/peerstore/plugin_peerstore_flat.c
index 224664685..6983ff2d8 100644
--- a/src/peerstore/plugin_peerstore_flat.c
+++ b/src/peerstore/plugin_peerstore_flat.c
@@ -146,6 +146,7 @@ peerstore_flat_delete_records (void *cls, const char *sub_system,
return plugin->deleted_entries;
}
+
static int
expire_entries (void *cls,
const struct GNUNET_HashCode *key,
@@ -163,7 +164,6 @@ expire_entries (void *cls,
}
-
/**
* Delete expired records (expiry < now)
*
@@ -222,6 +222,7 @@ iterate_entries (void *cls,
return GNUNET_YES;
}
+
/**
* Iterate over the records given an optional peer id
* and/or key.
@@ -478,6 +479,7 @@ database_setup (struct Plugin *plugin)
return GNUNET_OK;
}
+
static int
store_and_free_entries (void *cls,
const struct GNUNET_HashCode *key,
@@ -517,6 +519,7 @@ store_and_free_entries (void *cls,
return GNUNET_YES;
}
+
/**
* Shutdown database connection and associate data
* structures.
@@ -599,4 +602,5 @@ libgnunet_plugin_peerstore_flat_done (void *cls)
return NULL;
}
+
/* end of plugin_peerstore_sqlite.c */
diff --git a/src/peerstore/plugin_peerstore_sqlite.c b/src/peerstore/plugin_peerstore_sqlite.c
index 51cc651a2..cf499a5df 100644
--- a/src/peerstore/plugin_peerstore_sqlite.c
+++ b/src/peerstore/plugin_peerstore_sqlite.c
@@ -698,4 +698,5 @@ libgnunet_plugin_peerstore_sqlite_done (void *cls)
return NULL;
}
+
/* end of plugin_peerstore_sqlite.c */
diff --git a/src/peerstore/test_peerstore_api_iterate.c b/src/peerstore/test_peerstore_api_iterate.c
index 79d4a3b3c..b6cd51906 100644
--- a/src/peerstore/test_peerstore_api_iterate.c
+++ b/src/peerstore/test_peerstore_api_iterate.c
@@ -172,4 +172,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_peerstore_api_iterate.c */
diff --git a/src/peerstore/test_peerstore_api_store.c b/src/peerstore/test_peerstore_api_store.c
index c1ecc16bf..77e8a17c1 100644
--- a/src/peerstore/test_peerstore_api_store.c
+++ b/src/peerstore/test_peerstore_api_store.c
@@ -229,4 +229,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_peerstore_api_store.c */
diff --git a/src/peerstore/test_peerstore_api_sync.c b/src/peerstore/test_peerstore_api_sync.c
index bfeae6ed8..4c826c654 100644
--- a/src/peerstore/test_peerstore_api_sync.c
+++ b/src/peerstore/test_peerstore_api_sync.c
@@ -117,6 +117,7 @@ test_cont (void *cls)
NULL);
}
+
static void
disc_cont (void *cls)
{
@@ -127,6 +128,7 @@ disc_cont (void *cls)
NULL);
}
+
static void
store_cont (void *cls, int success)
{
@@ -135,11 +137,11 @@ store_cont (void *cls, int success)
a chance to actually finish the operation; otherwise,
the test may fail non-deterministically if the new
connection is faster than the cleanup routine of the
- old one. */
- GNUNET_SCHEDULER_add_now (&disc_cont,
+ old one. */GNUNET_SCHEDULER_add_now (&disc_cont,
NULL);
}
+
/**
* Actually run the test.
*/
@@ -192,4 +194,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_peerstore_api_sync.c */
diff --git a/src/peerstore/test_peerstore_api_watch.c b/src/peerstore/test_peerstore_api_watch.c
index b833a99a5..126b321df 100644
--- a/src/peerstore/test_peerstore_api_watch.c
+++ b/src/peerstore/test_peerstore_api_watch.c
@@ -98,4 +98,5 @@ main (int argc,
return ok;
}
+
/* end of test_peerstore_api_watch.c */
diff --git a/src/peerstore/test_plugin_peerstore.c b/src/peerstore/test_plugin_peerstore.c
index 8fce65e23..03e71ed63 100644
--- a/src/peerstore/test_plugin_peerstore.c
+++ b/src/peerstore/test_plugin_peerstore.c
@@ -220,4 +220,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_plugin_peerstore.c */
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 882df4f89..7d9a524b3 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -251,4 +251,5 @@ GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
GNUNET_free (db);
}
+
/* end of pq/pq_connect.c */
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c
index 675c71732..0d1a34441 100644
--- a/src/pt/gnunet-daemon-pt.c
+++ b/src/pt/gnunet-daemon-pt.c
@@ -179,7 +179,6 @@ struct CadetExit
};
-
/**
* State we keep for a request that is going out via CADET.
*/
@@ -738,8 +737,7 @@ timeout_request (void *cls)
avoid a prohibitively negative score (see
#get_channel_weight(), which checks for a certain
minimum number of transmissions before making
- up an opinion) */
- exit->num_transmitted = 5;
+ up an opinion) */exit->num_transmitted = 5;
exit->num_answered = 0;
dns_exit_available--;
/* now try to open an alternative exit */
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index a51320eae..96f0dc025 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -429,7 +429,6 @@ mhd_main ()
}
-
/**
* Open '/dev/null' and make the result the given
* file descriptor.
@@ -520,7 +519,6 @@ fork_and_exec (const char *file,
}
-
/**
* Method called to inform about the egos of this peer.
*
@@ -863,4 +861,5 @@ main (int argc,
return global_ret;
}
+
/* end of test_gns_vpn.c */
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index dcf3c5d93..42fd52c38 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -514,4 +514,5 @@ main (int argc, char *const *argv)
return global_ret;
}
+
/* end of test_gnunet_vpn.c */
diff --git a/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c
index 8b63fe856..bb60909d9 100644
--- a/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c
+++ b/src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c
@@ -177,4 +177,5 @@ libgnunet_plugin_reclaim_attribute_gnuid_done (void *cls)
return NULL;
}
+
/* end of plugin_reclaim_attribute_type_gnuid.c */
diff --git a/src/reclaim-attribute/reclaim_attribute.c b/src/reclaim-attribute/reclaim_attribute.c
index ac51a6b86..b81394ad2 100644
--- a/src/reclaim-attribute/reclaim_attribute.c
+++ b/src/reclaim-attribute/reclaim_attribute.c
@@ -520,4 +520,5 @@ GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char *data, size_t data_size)
return attr;
}
+
/* end of reclaim_attribute.c */
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c
index c5f0ed4fa..58f8cd6e2 100644
--- a/src/reclaim/gnunet-reclaim.c
+++ b/src/reclaim/gnunet-reclaim.c
@@ -191,6 +191,7 @@ do_cleanup (void *cls)
GNUNET_free (attr_to_delete);
}
+
static void
ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
{
@@ -209,6 +210,7 @@ ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
store_attr_cont (void *cls, int32_t success, const char *emsg)
{
@@ -220,6 +222,7 @@ store_attr_cont (void *cls, int32_t success, const char *emsg)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
process_attrs (void *cls,
const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
@@ -255,6 +258,7 @@ process_attrs (void *cls,
GNUNET_free (id);
}
+
static void
ticket_iter_err (void *cls)
{
@@ -263,6 +267,7 @@ ticket_iter_err (void *cls)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
ticket_iter_fin (void *cls)
{
@@ -270,6 +275,7 @@ ticket_iter_fin (void *cls)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
ticket_iter (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
{
@@ -292,6 +298,7 @@ ticket_iter (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
GNUNET_RECLAIM_ticket_iteration_next (ticket_iterator);
}
+
static void
iter_error (void *cls)
{
@@ -300,6 +307,7 @@ iter_error (void *cls)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
timeout_task (void *cls)
{
@@ -310,6 +318,7 @@ timeout_task (void *cls)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
process_rvk (void *cls, int success, const char *msg)
{
@@ -432,6 +441,7 @@ iter_finished (void *cls)
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
}
+
static void
iter_cb (void *cls,
const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
@@ -511,6 +521,7 @@ iter_cb (void *cls,
GNUNET_RECLAIM_get_attributes_next (attr_iterator);
}
+
static void
start_process ()
{
@@ -565,6 +576,7 @@ start_process ()
NULL);
}
+
static int init = GNUNET_YES;
static void
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c
index 440656343..a83ea05a6 100644
--- a/src/reclaim/gnunet-service-reclaim.c
+++ b/src/reclaim/gnunet-service-reclaim.c
@@ -712,7 +712,6 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im)
}
-
/**********************************************************
* Revocation
**********************************************************/
@@ -880,6 +879,7 @@ handle_consume_ticket_message (void *cls, const struct ConsumeTicketMessage *cm)
GNUNET_SERVICE_client_continue (idp->client);
}
+
/*****************************************
* Attribute store
*****************************************/
@@ -1355,6 +1355,7 @@ attr_iter_finished (void *cls)
GNUNET_free (ai);
}
+
/**
* Error iterating over attributes. Abort.
*
@@ -1512,6 +1513,7 @@ handle_iteration_next (void *cls,
GNUNET_SERVICE_client_continue (idp->client);
}
+
/******************************************************
* Ticket iteration
******************************************************/
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c
index 57c9e2167..4d1a26333 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/reclaim/gnunet-service-reclaim_tickets.c
@@ -330,7 +330,6 @@ static struct GNUNET_GNS_Handle *gns;
static struct GNUNET_STATISTICS_Handle *stats;
-
/**
* Cleanup revoke handle
*
@@ -1265,6 +1264,7 @@ issue_ticket (struct TicketIssueHandle *ih)
GNUNET_free (label);
}
+
/*************************************************
* Ticket iteration (finding a specific ticket)
*************************************************/
@@ -1359,7 +1359,7 @@ filter_tickets_cb (void *cls,
* If we found a matching ticket, return that to the caller and
* we are done.
*/
- if ((attr_cnt == found_attrs_cnt)&&(NULL != ticket))
+ if ((attr_cnt == found_attrs_cnt) && (NULL != ticket))
{
GNUNET_NAMESTORE_zone_iteration_stop (tih->ns_it);
tih->cb (tih->cb_cls, &tih->ticket, GNUNET_OK, NULL);
diff --git a/src/reclaim/json_reclaim.c b/src/reclaim/json_reclaim.c
index fa3901e43..e029fdfb6 100644
--- a/src/reclaim/json_reclaim.c
+++ b/src/reclaim/json_reclaim.c
@@ -102,6 +102,7 @@ parse_attr (void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
return GNUNET_OK;
}
+
/**
* Cleanup data left from parsing RSA public key.
*
@@ -121,6 +122,7 @@ clean_attr (void *cls, struct GNUNET_JSON_Specification *spec)
}
}
+
/**
* JSON Specification for Reclaim claims.
*
@@ -141,6 +143,8 @@ GNUNET_RECLAIM_JSON_spec_claim (struct GNUNET_RECLAIM_ATTRIBUTE_Claim **attr)
*attr = NULL;
return ret;
}
+
+
/**
* Parse given JSON object to a ticket
*
@@ -219,6 +223,7 @@ parse_ticket (void *cls, json_t *root, struct GNUNET_JSON_Specification *spec)
return GNUNET_OK;
}
+
/**
* Cleanup data left from parsing RSA public key.
*
@@ -238,6 +243,7 @@ clean_ticket (void *cls, struct GNUNET_JSON_Specification *spec)
}
}
+
/**
* JSON Specification for Reclaim tickets.
*
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 6bcae21d4..1c3d65f35 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -79,6 +79,7 @@ create_jwt_header (void)
return json_str;
}
+
static void
replace_char (char *str, char find, char replace)
{
@@ -91,6 +92,7 @@ replace_char (char *str, char find, char replace)
}
}
+
// RFC4648
static void
fix_base64 (char *str)
@@ -102,6 +104,7 @@ fix_base64 (char *str)
replace_char (str, '/', '_');
}
+
/**
* Create a JWT from attributes
*
@@ -229,6 +232,7 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key,
return result;
}
+
/* Converts a hex character to its integer value */
static char
from_hex (char ch)
@@ -236,6 +240,7 @@ from_hex (char ch)
return isdigit (ch) ? ch - '0' : tolower (ch) - 'a' + 10;
}
+
/* Converts an integer value to its hex character*/
static char
to_hex (char code)
@@ -245,6 +250,7 @@ to_hex (char code)
return hex[code & 15];
}
+
/* Returns a url-encoded version of str */
/* IMPORTANT: be sure to free() the returned string after use */
static char *
@@ -307,6 +313,7 @@ url_decode (const char *str)
return buf;
}
+
/**
* Returns base64 encoded string urlencoded
*
@@ -440,6 +447,7 @@ encrypt_payload (const struct GNUNET_CRYPTO_EcdsaPublicKey *ecdsa_pub,
GNUNET_CRYPTO_symmetric_encrypt (payload, payload_len, &key, &iv, buf));
}
+
/**
* Builds an OIDC authorization code including
* a reclaim ticket and nonce
@@ -481,7 +489,7 @@ OIDC_build_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
// Assign nonce
nonce = 0;
payload_len = sizeof(struct OIDC_Parameters);
- if ((NULL != nonce_str)&& (strcmp ("", nonce_str) != 0))
+ if ((NULL != nonce_str) && (strcmp ("", nonce_str) != 0))
{
if ((1 != sscanf (nonce_str, "%u", &nonce)) || (nonce > UINT32_MAX))
{
@@ -753,6 +761,7 @@ OIDC_build_token_response (const char *access_token,
json_decref (root_json);
}
+
/**
* Generate a new access token
*/
diff --git a/src/reclaim/oidc_helper.h b/src/reclaim/oidc_helper.h
index fa3d7f2d9..1774618e8 100644
--- a/src/reclaim/oidc_helper.h
+++ b/src/reclaim/oidc_helper.h
@@ -109,6 +109,7 @@ OIDC_build_token_response (const char *access_token,
const char *id_token,
const struct GNUNET_TIME_Relative *expiration_time,
char **token_response);
+
/**
* Generate a new access token
*/
diff --git a/src/reclaim/plugin_gnsrecord_reclaim.c b/src/reclaim/plugin_gnsrecord_reclaim.c
index e4d1adfde..d530ef01d 100644
--- a/src/reclaim/plugin_gnsrecord_reclaim.c
+++ b/src/reclaim/plugin_gnsrecord_reclaim.c
@@ -194,4 +194,5 @@ libgnunet_plugin_gnsrecord_reclaim_done (void *cls)
return NULL;
}
+
/* end of plugin_gnsrecord_dns.c */
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index a4a368ab5..92a1de621 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -576,6 +576,7 @@ cleanup_handle (struct RequestHandle *handle)
GNUNET_free (handle);
}
+
static void
cleanup_handle_delayed (void *cls)
{
@@ -667,6 +668,7 @@ do_redirect_error (void *cls)
GNUNET_free (redirect);
}
+
/**
* Task run on timeout, sends error message. Cleans up everything.
*
@@ -681,6 +683,7 @@ do_timeout (void *cls)
do_error (handle);
}
+
/**
* Return attributes for claim
*
@@ -817,6 +820,7 @@ cookie_identity_interpretation (struct RequestHandle *handle)
GNUNET_free (cookies);
}
+
/**
* Redirects to login page stored in configuration file
*/
@@ -868,6 +872,7 @@ login_redirect (void *cls)
GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
}
+
/**
* Does internal server error when iteration failed.
*/
@@ -943,6 +948,7 @@ oidc_ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
GNUNET_free (code_string);
}
+
static void
oidc_collect_finished_cb (void *cls)
{
@@ -1226,6 +1232,7 @@ client_redirect (void *cls)
handle);
}
+
static char *
get_url_parameter_copy (const struct RequestHandle *handle, const char *key)
{
@@ -1358,6 +1365,7 @@ build_authz_response (void *cls)
GNUNET_SCHEDULER_add_now (&client_redirect, handle);
}
+
/**
* Iterate over tlds in config
*/
@@ -1377,6 +1385,7 @@ tld_iter (void *cls, const char *section, const char *option, const char *value)
handle->tld = GNUNET_strdup (option + 1);
}
+
/**
* Responds to authorization GET and url-encoded POST request
*
@@ -1452,6 +1461,7 @@ authorize_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
GNUNET_SCHEDULER_add_now (&build_authz_response, handle);
}
+
/**
* Combines an identity with a login time and responds OK to login request
*
@@ -1522,6 +1532,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle,
GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
}
+
static int
check_authorization (struct RequestHandle *handle,
struct GNUNET_CRYPTO_EcdsaPublicKey *cid)
@@ -1640,6 +1651,7 @@ check_authorization (struct RequestHandle *handle,
return GNUNET_OK;
}
+
const struct EgoEntry *
find_ego (struct RequestHandle *handle,
struct GNUNET_CRYPTO_EcdsaPublicKey *test_key)
@@ -1657,6 +1669,7 @@ find_ego (struct RequestHandle *handle,
return NULL;
}
+
static void
persist_access_token (const struct RequestHandle *handle,
const char *access_token,
@@ -1676,6 +1689,7 @@ persist_access_token (const struct RequestHandle *handle,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
+
/**
* Responds to token url-encoded POST request
*
@@ -1841,6 +1855,7 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
}
+
/**
* Collects claims and stores them in handle
*/
@@ -1866,6 +1881,7 @@ consume_ticket (void *cls,
GNUNET_free (tmp_value);
}
+
/**
* Responds to userinfo GET and url-encoded POST request
*
@@ -2002,6 +2018,7 @@ init_cont (struct RequestHandle *handle)
}
}
+
/**
* If listing is enabled, prints information about the egos.
*
@@ -2108,6 +2125,7 @@ list_ego (void *cls,
}
}
+
static void
rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
GNUNET_REST_ResultProcessor proc,
@@ -2140,6 +2158,7 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");
}
+
/**
* Entry point for the plugin.
*
@@ -2213,4 +2232,5 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_openid_connect.c */
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c
index fd35059d7..9a75b2d16 100644
--- a/src/reclaim/plugin_rest_reclaim.c
+++ b/src/reclaim/plugin_rest_reclaim.c
@@ -287,6 +287,7 @@ cleanup_handle (struct RequestHandle *handle)
GNUNET_free (handle);
}
+
static void
cleanup_handle_delayed (void *cls)
{
@@ -342,6 +343,7 @@ collect_error_cb (void *cls)
do_error (handle);
}
+
static void
finished_cont (void *cls, int32_t success, const char *emsg)
{
@@ -379,6 +381,7 @@ return_response (void *cls)
cleanup_handle (handle);
}
+
static void
collect_finished_cb (void *cls)
{
@@ -818,6 +821,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle,
GNUNET_JSON_parse_free (tktspec);
}
+
static void
consume_cont (void *cls,
const struct GNUNET_CRYPTO_EcdsaPublicKey *identity,
@@ -850,6 +854,7 @@ consume_cont (void *cls,
GNUNET_free (val_str);
}
+
static void
consume_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle,
const char *url,
@@ -943,6 +948,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
return;
}
+
/**
* Handle rest request
*
@@ -982,6 +988,7 @@ init_cont (struct RequestHandle *handle)
}
}
+
/**
* If listing is enabled, prints information about the egos.
*
@@ -1044,6 +1051,7 @@ list_ego (void *cls,
}
}
+
static void
rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
GNUNET_REST_ResultProcessor proc,
@@ -1068,6 +1076,7 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n");
}
+
/**
* Entry point for the plugin.
*
@@ -1124,4 +1133,5 @@ libgnunet_plugin_rest_reclaim_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_reclaim.c */
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c
index 3e03d973b..7d4d7588a 100644
--- a/src/reclaim/reclaim_api.c
+++ b/src/reclaim/reclaim_api.c
@@ -370,6 +370,7 @@ free_it (struct GNUNET_RECLAIM_AttributeIterator *it)
GNUNET_free (it);
}
+
/**
* Free @a op
*
@@ -832,6 +833,7 @@ GNUNET_RECLAIM_disconnect (struct GNUNET_RECLAIM_Handle *h)
GNUNET_free (h);
}
+
/**
* Store an attribute. If the attribute is already present,
* it is replaced with the new attribute.
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index a23336808..fb061acc1 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -101,7 +101,6 @@ static unsigned int rounds = 3;
static struct GNUNET_CRYPTO_EddsaPrivateKey *my_private_key;
-
/**
* Task run during shutdown.
*
@@ -157,7 +156,7 @@ reannounce_regex (void *cls)
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Announcing regex: %s\n", regex);
GNUNET_STATISTICS_update (stats_handle, "# regexes announced", 1, GNUNET_NO);
- if ((NULL == announce_handle)&&(NULL != regex))
+ if ((NULL == announce_handle) && (NULL != regex))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"First time, creating regex: %s\n",
@@ -196,7 +195,7 @@ announce_regex (const char *regex)
{
char *copy;
- if ((NULL == regex)||(0 == strlen (regex)))
+ if ((NULL == regex) || (0 == strlen (regex)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot announce empty regex\n");
return;
@@ -393,12 +392,15 @@ main (int argc, char *const *argv)
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_ARM_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c
index 16b7a7f0e..695d66144 100644
--- a/src/regex/gnunet-regex-profiler.c
+++ b/src/regex/gnunet-regex-profiler.c
@@ -417,7 +417,7 @@ do_shutdown (void *cls)
{
peer = &peers[peer_cnt];
- if ((GNUNET_YES != peer->search_str_matched) &&(NULL != data_file) )
+ if ((GNUNET_YES != peer->search_str_matched) && (NULL != data_file) )
{
prof_time = GNUNET_TIME_absolute_get_duration (peer->prof_start_time);
size =
@@ -650,7 +650,7 @@ stats_connect_cb (void *cls,
{
struct RegexPeer *peer = cls;
- if ((NULL == ca_result)||(NULL != emsg))
+ if ((NULL == ca_result) || (NULL != emsg))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to connect to statistics service on peer %u: %s\n",
@@ -1043,7 +1043,7 @@ dht_connect_cb (void *cls,
{
struct RegexPeer *peer = (struct RegexPeer *) cls;
- if ((NULL != emsg)||(NULL == op)||(NULL == ca_result))
+ if ((NULL != emsg) || (NULL == op) || (NULL == ca_result))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "DHT connect failed: %s\n", emsg);
GNUNET_assert (0);
@@ -1170,6 +1170,7 @@ test_master (void *cls,
GNUNET_SCHEDULER_add_delayed (search_timeout_time, &search_timed_out, NULL);
}
+
/**
* Function that will be called whenever something in the testbed changes.
*
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c
index 6637bafed..9adde99bd 100644
--- a/src/regex/gnunet-regex-simulation-profiler.c
+++ b/src/regex/gnunet-regex-simulation-profiler.c
@@ -305,6 +305,7 @@ do_abort (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Iterator over all states that inserts each state into the MySQL db.
*
@@ -369,7 +370,7 @@ regex_iterator (void *cls,
return;
}
- if ((-1 != total) &&(total > 0) )
+ if ((-1 != total) && (total > 0) )
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Total: %llu (%s, %s)\n",
(unsigned long long) total,
@@ -409,7 +410,7 @@ regex_iterator (void *cls,
num_merged_states++;
}
- if ((GNUNET_SYSERR == result) || ((1 != result) &&(0 != result) ))
+ if ((GNUNET_SYSERR == result) || ((1 != result) && (0 != result) ))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Error executing prepared mysql statement for edge: Affected rows: %i, expected 0 or 1!\n",
@@ -433,7 +434,7 @@ regex_iterator (void *cls,
stmt_handle,
params_stmt);
- if ((1 != result) &&(0 != result) )
+ if ((1 != result) && (0 != result) )
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Error executing prepared mysql statement for edge: Affected rows: %i, expected 0 or 1!\n",
diff --git a/src/regex/perf-regex.c b/src/regex/perf-regex.c
index d41887f6b..6155501f2 100644
--- a/src/regex/perf-regex.c
+++ b/src/regex/perf-regex.c
@@ -125,4 +125,5 @@ main (int argc, char *const *argv)
return 0;
}
+
/* end of prof-regex.c */
diff --git a/src/regex/plugin_block_regex.c b/src/regex/plugin_block_regex.c
index e8ff158dd..9c7aa9119 100644
--- a/src/regex/plugin_block_regex.c
+++ b/src/regex/plugin_block_regex.c
@@ -408,4 +408,5 @@ libgnunet_plugin_block_regex_done (void *cls)
return NULL;
}
+
/* end of plugin_block_regex.c */
diff --git a/src/regex/regex_api_announce.c b/src/regex/regex_api_announce.c
index 318d73263..ad8a4fab9 100644
--- a/src/regex/regex_api_announce.c
+++ b/src/regex/regex_api_announce.c
@@ -63,7 +63,6 @@ struct GNUNET_REGEX_Announcement
};
-
/**
* (Re)connect to the REGEX service with the given announcement @a a.
*
@@ -183,4 +182,5 @@ GNUNET_REGEX_announce_cancel (struct GNUNET_REGEX_Announcement *a)
GNUNET_free (a);
}
+
/* end of regex_api_announce.c */
diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c
index 2c6752e09..a309c2305 100644
--- a/src/regex/regex_block_lib.c
+++ b/src/regex/regex_block_lib.c
@@ -218,7 +218,7 @@ REGEX_BLOCK_check (const struct RegexBlock *block,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- if ((NULL != query)&&
+ if ((NULL != query) &&
(0 != GNUNET_memcmp (&key,
query)) )
{
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c
index 78c2de8ab..1dd4f6a97 100644
--- a/src/regex/regex_internal.c
+++ b/src/regex/regex_internal.c
@@ -121,7 +121,7 @@ state_add_transition (struct REGEX_INTERNAL_Context *ctx,
/* Do not add duplicate state transitions */
for (t = from_state->transitions_head; NULL != t; t = t->next)
{
- if ((t->to_state == to_state) &&(0 == nullstrcmp (t->label, label)) &&
+ if ((t->to_state == to_state) && (0 == nullstrcmp (t->label, label)) &&
(t->from_state == from_state) )
return;
}
@@ -162,7 +162,7 @@ static void
state_remove_transition (struct REGEX_INTERNAL_State *state,
struct REGEX_INTERNAL_Transition *transition)
{
- if ((NULL == state)||(NULL == transition))
+ if ((NULL == state) || (NULL == transition))
return;
if (transition->from_state != state)
@@ -247,7 +247,7 @@ state_set_compare (struct REGEX_INTERNAL_StateSet *sset1,
int result;
unsigned int i;
- if ((NULL == sset1)||(NULL == sset2))
+ if ((NULL == sset1) || (NULL == sset2))
return 1;
result = sset1->off - sset2->off;
@@ -339,7 +339,7 @@ automaton_remove_state (struct REGEX_INTERNAL_Automaton *a,
struct REGEX_INTERNAL_Transition *t_check;
struct REGEX_INTERNAL_Transition *t_check_next;
- if ((NULL == a)||(NULL == s))
+ if ((NULL == a) || (NULL == s))
return;
/* remove all transitions leading to this state */
@@ -399,7 +399,7 @@ automaton_merge_states (struct REGEX_INTERNAL_Context *ctx,
is_dup = GNUNET_NO;
for (t = t_check->from_state->transitions_head; NULL != t; t = t->next)
{
- if ((t->to_state == s1) &&(0 == strcmp (t_check->label, t->label)) )
+ if ((t->to_state == s1) && (0 == strcmp (t_check->label, t->label)) )
is_dup = GNUNET_YES;
}
if (GNUNET_NO == is_dup)
@@ -487,7 +487,7 @@ automaton_state_traverse (struct REGEX_INTERNAL_State *s,
for (t = s->transitions_head; NULL != t; t = t->next)
{
if ((NULL == check) ||
- ((NULL != check) &&(GNUNET_YES == check (check_cls, s, t)) ))
+ ((NULL != check) && (GNUNET_YES == check (check_cls, s, t)) ))
{
automaton_state_traverse (t->to_state,
marks,
@@ -525,7 +525,7 @@ REGEX_INTERNAL_automaton_traverse (const struct REGEX_INTERNAL_Automaton *a,
unsigned int count;
struct REGEX_INTERNAL_State *s;
- if ((NULL == a)||(0 == a->state_count))
+ if ((NULL == a) || (0 == a->state_count))
return;
int marks[a->state_count];
@@ -1197,9 +1197,7 @@ automaton_create_proofs_simplify (const struct StringBuffer *R_last_ij,
* R_cur_ij = R_cur_l | R_cur_r
* R_cur_l == R^{(k-1)}_{ij}
* R_cur_r == R^{(k-1)}_{ik} ( R^{(k-1)}_{kk} )^* R^{(k-1)}_{kj}
- */
-
- if ((GNUNET_YES == R_last_ij->null_flag) &&
+ */if ((GNUNET_YES == R_last_ij->null_flag) &&
((GNUNET_YES == R_last_ik->null_flag) ||
(GNUNET_YES == R_last_kj->null_flag)))
{
@@ -1283,8 +1281,7 @@ automaton_create_proofs_simplify (const struct StringBuffer *R_last_ij,
* (e|a)|(e|a)a*a = a*
* (e|a)|(e|a)a*(e|a) = a*
* (e|a)|(e|a)(e|a)*(e|a) = a*
- */
- if (GNUNET_YES == needs_parentheses (&R_temp_ij))
+ */if (GNUNET_YES == needs_parentheses (&R_temp_ij))
sb_printf1 (R_cur_r, "(%.*s)*", 3, &R_temp_ij);
else
sb_printf1 (R_cur_r, "%.*s*", 1, &R_temp_ij);
@@ -1297,8 +1294,7 @@ automaton_create_proofs_simplify (const struct StringBuffer *R_last_ij,
* a|aa*(e|a) = a+
* a|(e|a)(e|a)*a = a+
* a|a(e|a)*(e|a) = a+
- */
- if (GNUNET_YES == needs_parentheses (&R_temp_ij))
+ */if (GNUNET_YES == needs_parentheses (&R_temp_ij))
sb_printf1 (R_cur_r, "(%.*s)+", 3, &R_temp_ij);
else
sb_printf1 (R_cur_r, "%.*s+", 1, &R_temp_ij);
@@ -1435,8 +1431,7 @@ automaton_create_proofs_simplify (const struct StringBuffer *R_last_ij,
* aa*(e|a) = a+
* a(e|a)*(e|a) = a+
* (e|a)a*a = a+
- */
- else
+ */else
{
eps_check = (has_epsilon (R_last_ik) + has_epsilon (R_last_kk)
+ has_epsilon (R_last_kj));
@@ -1922,7 +1917,7 @@ dfa_remove_dead_states (struct REGEX_INTERNAL_Automaton *a)
dead = 1;
for (t = s->transitions_head; NULL != t; t = t->next)
{
- if ((NULL != t->to_state) &&(t->to_state != s) )
+ if ((NULL != t->to_state) && (t->to_state != s) )
{
dead = 0;
break;
@@ -2201,7 +2196,7 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx,
struct REGEX_INTERNAL_Transition *t;
struct REGEX_INTERNAL_Transition *t_next;
- if ((1 > stride_len)||(GNUNET_YES == dfa->is_multistrided))
+ if ((1 > stride_len) || (GNUNET_YES == dfa->is_multistrided))
return;
/* Compute the new transitions of given stride_len */
@@ -2226,6 +2221,7 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx,
dfa->is_multistrided = GNUNET_YES;
}
+
/**
* Recursive Helper function for DFA path compression. Does DFS on the DFA graph
* and adds new transitions to the given transitions DLL and marks states that
@@ -2252,11 +2248,14 @@ dfa_compress_paths_helper (struct REGEX_INTERNAL_Automaton *dfa,
char *new_label;
- if ((NULL != label)&&
- (((cur->incoming_transition_count > 1)||(GNUNET_YES == cur->accepting)||
+ if ((NULL != label) &&
+ (((cur->incoming_transition_count > 1) || (GNUNET_YES ==
+ cur->accepting) ||
(GNUNET_YES == cur->marked) ) ||
- ((start != dfa->start)&&(max_len > 0)&&(max_len == strlen (label))) ||
- ((start == dfa->start)&&(GNUNET_REGEX_INITIAL_BYTES == strlen (label)))))
+ ((start != dfa->start) && (max_len > 0) && (max_len == strlen (
+ label))) ||
+ ((start == dfa->start) && (GNUNET_REGEX_INITIAL_BYTES == strlen (
+ label)))))
{
t = GNUNET_new (struct REGEX_INTERNAL_Transition);
t->label = GNUNET_strdup (label);
@@ -2279,7 +2278,7 @@ dfa_compress_paths_helper (struct REGEX_INTERNAL_Automaton *dfa,
else if (cur != start)
cur->contained = GNUNET_YES;
- if ((GNUNET_YES == cur->marked)&&(cur != start))
+ if ((GNUNET_YES == cur->marked) && (cur != start))
return;
cur->marked = GNUNET_YES;
@@ -2398,7 +2397,7 @@ nfa_fragment_create (struct REGEX_INTERNAL_State *start,
n->end = NULL;
n->state_count = 0;
- if ((NULL == start)||(NULL == end))
+ if ((NULL == start) || (NULL == end))
return n;
automaton_add_state (n, end);
@@ -2427,7 +2426,7 @@ nfa_add_states (struct REGEX_INTERNAL_Automaton *n,
{
struct REGEX_INTERNAL_State *s;
- if ((NULL == n)||(NULL == states_head))
+ if ((NULL == n) || (NULL == states_head))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not add states\n");
return;
@@ -2820,7 +2819,7 @@ REGEX_INTERNAL_construct_nfa (const char *regex, const size_t len)
int atomcount;
} *p;
- if ((NULL == regex)||(0 == strlen (regex))||(0 == len))
+ if ((NULL == regex) || (0 == strlen (regex)) || (0 == len))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Could not parse regex. Empty regex string provided.\n");
@@ -3009,7 +3008,7 @@ construct_dfa_states (struct REGEX_INTERNAL_Context *ctx,
for (ctran = dfa_state->transitions_head; NULL != ctran; ctran = ctran->next)
{
- if ((NULL == ctran->label) ||(NULL != ctran->to_state) )
+ if ((NULL == ctran->label) || (NULL != ctran->to_state) )
continue;
nfa_closure_set_create (&tmp, nfa, &dfa_state->nfa_set, ctran->label);
@@ -3173,7 +3172,7 @@ evaluate_dfa (struct REGEX_INTERNAL_Automaton *a, const char *string)
s = a->start;
/* If the string is empty but the starting state is accepting, we accept. */
- if (((NULL == string)||(0 == strlen (string))) && s->accepting)
+ if (((NULL == string) || (0 == strlen (string))) && s->accepting)
return 0;
for (strp = string; NULL != strp && *strp; strp += step_len)
@@ -3184,7 +3183,7 @@ evaluate_dfa (struct REGEX_INTERNAL_Automaton *a, const char *string)
break;
}
- if ((NULL != s)&& s->accepting)
+ if ((NULL != s) && s->accepting)
return 0;
return 1;
@@ -3218,7 +3217,7 @@ evaluate_nfa (struct REGEX_INTERNAL_Automaton *a, const char *string)
}
/* If the string is empty but the starting state is accepting, we accept. */
- if (((NULL == string)||(0 == strlen (string))) && a->start->accepting)
+ if (((NULL == string) || (0 == strlen (string))) && a->start->accepting)
return 0;
result = 1;
@@ -3644,7 +3643,7 @@ reachability_iterator (void *cls,
/* already visited and marked */
return GNUNET_YES;
- if ((GNUNET_REGEX_INITIAL_BYTES > strlen (state->proof))&&
+ if ((GNUNET_REGEX_INITIAL_BYTES > strlen (state->proof)) &&
(GNUNET_NO == state->accepting) )
/* not directly reachable */
return GNUNET_YES;
@@ -3685,6 +3684,7 @@ iterate_reachables (void *cls, const struct GNUNET_HashCode *key, void *value)
return GNUNET_YES;
}
+
/**
* Iterate over all edges of automaton 'a' that are reachable from a state with
* a proof of at least GNUNET_REGEX_INITIAL_BYTES characters.
diff --git a/src/regex/regex_internal.h b/src/regex/regex_internal.h
index 1e0722136..17b038f21 100644
--- a/src/regex/regex_internal.h
+++ b/src/regex/regex_internal.h
@@ -446,7 +446,6 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx,
const unsigned int stride_len);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/regex/regex_internal_lib.h b/src/regex/regex_internal_lib.h
index 531f998cc..cd955e68b 100644
--- a/src/regex/regex_internal_lib.h
+++ b/src/regex/regex_internal_lib.h
@@ -157,7 +157,6 @@ REGEX_INTERNAL_iterate_reachable_edges (struct REGEX_INTERNAL_Automaton *a,
void *iterator_cls);
-
/**
* Handle to store cached data about a regex announce.
*/
diff --git a/src/regex/regex_test_graph.c b/src/regex/regex_test_graph.c
index c988b5aae..8e1e00fd4 100644
--- a/src/regex/regex_test_graph.c
+++ b/src/regex/regex_test_graph.c
@@ -282,7 +282,7 @@ REGEX_TEST_automaton_save_graph (struct REGEX_INTERNAL_Automaton *a,
return;
}
- if ((NULL == filename)||(strlen (filename) < 1))
+ if ((NULL == filename) || (strlen (filename) < 1))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No Filename given!");
return;
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index 15d6c653a..05001b5d2 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -72,11 +72,11 @@ c2i (char c, int size)
break;
case 16:
- if ((c >= '0') &&(c <= '9') )
+ if ((c >= '0') && (c <= '9') )
return c - '0';
- else if ((c >= 'A') &&(c <= 'F') )
+ else if ((c >= 'A') && (c <= 'F') )
return c - 'A' + 10;
- else if ((c >= 'a') &&(c <= 'f') )
+ else if ((c >= 'a') && (c <= 'f') )
return c - 'a' + 10;
else
{
@@ -324,6 +324,7 @@ get_longest_prefix (struct RegexCombineCtx *ctx, const char *regex)
return best;
}
+
static void
regex_add_multiple (struct RegexCombineCtx *ctx,
const char *regex,
@@ -347,7 +348,7 @@ regex_add_multiple (struct RegexCombineCtx *ctx,
count = 0;
for (i = 1UL; i < l; i++)
{
- if ((regex[i] != '|') &&(regex[i] != ')') )
+ if ((regex[i] != '|') && (regex[i] != ')') )
{
count++;
}
@@ -361,7 +362,7 @@ regex_add_multiple (struct RegexCombineCtx *ctx,
tmp[1] = '\0';
for (i = 1UL; i < l; i++)
{
- if ((regex[i] != '|') &&(regex[i] != ')') )
+ if ((regex[i] != '|') && (regex[i] != ')') )
{
tmp[0] = regex[i];
newctx = new_regex_ctx (ctx->size);
@@ -375,6 +376,7 @@ regex_add_multiple (struct RegexCombineCtx *ctx,
}
}
+
/**
* Add a single regex to a context, splitting the exisiting state.
*
@@ -482,7 +484,7 @@ regex_add (struct RegexCombineCtx *ctx, const char *regex)
/* There is no prefix match, add new */
idx = c2i (regex[0], ctx->size);
- if ((NULL == ctx->children[idx])&&(NULL != ctx->s))
+ if ((NULL == ctx->children[idx]) && (NULL != ctx->s))
{
/* this was the end before, add empty string */
newctx = new_regex_ctx (ctx->size);
@@ -652,4 +654,5 @@ REGEX_TEST_free_from_file (char **regexes)
GNUNET_free (regexes);
}
+
/* end of regex_test_lib.c */
diff --git a/src/regex/regex_test_lib.h b/src/regex/regex_test_lib.h
index a0ad0723a..98f60d317 100644
--- a/src/regex/regex_test_lib.h
+++ b/src/regex/regex_test_lib.h
@@ -147,7 +147,6 @@ REGEX_TEST_automaton_save_graph (struct REGEX_INTERNAL_Automaton *a,
enum REGEX_TEST_GraphSavingOptions options);
-
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
diff --git a/src/regex/regex_test_random.c b/src/regex/regex_test_random.c
index 29b5315db..02d59f5dc 100644
--- a/src/regex/regex_test_random.c
+++ b/src/regex/regex_test_random.c
@@ -123,8 +123,8 @@ REGEX_TEST_generate_random_regex (size_t rx_length, char *matching_str)
}
if ((NULL != matching_strp) &&
- ((current_char != '+') &&(current_char != '*') &&(current_char !=
- '?') &&
+ ((current_char != '+') && (current_char != '*') && (current_char !=
+ '?') &&
(current_char != '|') ))
{
*matching_strp = current_char;
diff --git a/src/regex/test_regex_api.c b/src/regex/test_regex_api.c
index eaae8c682..734fbdbf3 100644
--- a/src/regex/test_regex_api.c
+++ b/src/regex/test_regex_api.c
@@ -128,4 +128,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_regex_api.c */
diff --git a/src/regex/test_regex_eval_api.c b/src/regex/test_regex_eval_api.c
index f6078c7ef..767571156 100644
--- a/src/regex/test_regex_eval_api.c
+++ b/src/regex/test_regex_eval_api.c
@@ -119,8 +119,8 @@ test_random (unsigned int rx_length, unsigned int max_str_len,
/* We only want to match the whole string, because that's what our DFA does,
* too. */
if ((eval_check == 0) &&
- ((matchptr[0].rm_so != 0) ||(matchptr[0].rm_eo != strlen (
- matching_str)) ))
+ ((matchptr[0].rm_so != 0) || (matchptr[0].rm_eo != strlen (
+ matching_str)) ))
eval_check = 1;
/* Match canonical regex */
@@ -150,12 +150,12 @@ test_random (unsigned int rx_length, unsigned int max_str_len,
/* We only want to match the whole string, because that's what our DFA does,
* too. */
if ((eval_canonical_check == 0) &&
- ((matchptr[0].rm_so != 0) ||(matchptr[0].rm_eo != strlen (
- matching_str)) ))
+ ((matchptr[0].rm_so != 0) || (matchptr[0].rm_eo != strlen (
+ matching_str)) ))
eval_canonical_check = 1;
/* compare results */
- if ((eval_check != eval) ||(eval_canonical != eval_canonical_check) )
+ if ((eval_check != eval) || (eval_canonical != eval_canonical_check) )
{
regerror (eval_check, &rx, error, sizeof error);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -184,6 +184,7 @@ error:
return -1;
}
+
/**
* Automaton test that compares the result of matching regular expression 'rx'
* with the strings and expected results in 'rxstr' with the result of matching
@@ -227,10 +228,10 @@ test_automaton (struct REGEX_INTERNAL_Automaton *a, regex_t *rx,
(matchptr[0].rm_eo != strlen (rxstr->strings[i])) ))
eval_check = 1;
- if (((rxstr->expected_results[i] == match) && ((0 != eval) ||(0 !=
- eval_check) ))
+ if (((rxstr->expected_results[i] == match) && ((0 != eval) || (0 !=
+ eval_check) ))
|| ((rxstr->expected_results[i] == nomatch) &&
- ((0 == eval) ||(0 == eval_check) )))
+ ((0 == eval) || (0 == eval_check) )))
{
result = 1;
regerror (eval_check, rx, error, sizeof error);
@@ -247,6 +248,7 @@ test_automaton (struct REGEX_INTERNAL_Automaton *a, regex_t *rx,
return result;
}
+
int
main (int argc, char *argv[])
{
diff --git a/src/regex/test_regex_integration.c b/src/regex/test_regex_integration.c
index c7a7e38b5..2e6874e4d 100644
--- a/src/regex/test_regex_integration.c
+++ b/src/regex/test_regex_integration.c
@@ -208,4 +208,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_regex_integration.c */
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c
index 2456ad50c..02a2c6daf 100644
--- a/src/rest/gnunet-rest-server.c
+++ b/src/rest/gnunet-rest-server.c
@@ -185,6 +185,7 @@ run_mhd_now ()
httpd_task = GNUNET_SCHEDULER_add_now (&do_httpd, NULL);
}
+
/**
* Plugin result callback
*
@@ -242,6 +243,7 @@ cleanup_handle (struct MhdConnectionHandle *handle)
GNUNET_free (handle);
}
+
static int
header_iterator (void *cls,
enum MHD_ValueKind kind,
@@ -299,6 +301,7 @@ url_iterator (void *cls,
return MHD_YES;
}
+
static int
post_data_iter (void *cls,
enum MHD_ValueKind kind,
@@ -334,6 +337,7 @@ post_data_iter (void *cls,
return MHD_YES;
}
+
/* ********************************* MHD response generation ******************* */
/**
@@ -641,6 +645,7 @@ schedule_httpd ()
GNUNET_NETWORK_fdset_destroy (wws);
}
+
/**
* Task run whenever HTTP server operations are pending.
*
@@ -1050,4 +1055,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-rest-server.c */
diff --git a/src/rest/plugin_rest_config.c b/src/rest/plugin_rest_config.c
index 16f5d2ec1..d89c858ee 100644
--- a/src/rest/plugin_rest_config.c
+++ b/src/rest/plugin_rest_config.c
@@ -124,6 +124,7 @@ add_sections (void *cls,
json_object_set_new (sections_obj, section, sec_obj);
}
+
static void
add_section_contents (void *cls,
const char *section,
@@ -135,6 +136,7 @@ add_section_contents (void *cls,
json_object_set_new (section_obj, option, json_string (value));
}
+
/**
* Handle rest request
*
@@ -179,6 +181,7 @@ get_cont (struct GNUNET_REST_RequestHandle *con_handle,
json_decref (result);
}
+
struct GNUNET_CONFIGURATION_Handle *
set_value (struct GNUNET_CONFIGURATION_Handle *config,
const char *section,
@@ -202,6 +205,7 @@ set_value (struct GNUNET_CONFIGURATION_Handle *config,
return config; // for error handling (0 -> success, 1 -> error)
}
+
/**
* Handle REST POST request
*
@@ -308,6 +312,7 @@ set_cont (struct GNUNET_REST_RequestHandle *con_handle,
cleanup_handle (handle);
}
+
/**
* Handle rest request
*
@@ -416,4 +421,5 @@ libgnunet_plugin_rest_config_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_config.c */
diff --git a/src/rest/plugin_rest_copying.c b/src/rest/plugin_rest_copying.c
index eabe96c63..e601e505e 100644
--- a/src/rest/plugin_rest_copying.c
+++ b/src/rest/plugin_rest_copying.c
@@ -120,7 +120,6 @@ get_cont (struct GNUNET_REST_RequestHandle *con_handle,
}
-
/**
* Handle rest request
*
@@ -231,4 +230,5 @@ libgnunet_plugin_rest_copying_done (void *cls)
return NULL;
}
+
/* end of plugin_rest_copying.c */
diff --git a/src/rest/rest.c b/src/rest/rest.c
index b83530ee1..0dfd44ce7 100644
--- a/src/rest/rest.c
+++ b/src/rest/rest.c
@@ -46,6 +46,7 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace)
return 0 == strncmp (namespace, url, strlen (namespace));
}
+
/**
* Create MHD response
*
@@ -71,6 +72,7 @@ GNUNET_REST_create_response (const char *data)
return resp;
}
+
int
GNUNET_REST_handle_request (struct GNUNET_REST_RequestHandle *conn,
const struct GNUNET_REST_RequestHandler *handlers,
@@ -106,4 +108,5 @@ GNUNET_REST_handle_request (struct GNUNET_REST_RequestHandle *conn,
return GNUNET_NO;
}
+
/* end of rest.c */
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c
index 652c1e62d..f5aa2d17e 100644
--- a/src/revocation/gnunet-revocation.c
+++ b/src/revocation/gnunet-revocation.c
@@ -531,4 +531,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-revocation.c */
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 8be2d3926..456b3834a 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -960,6 +960,7 @@ GNUNET_REVOCATION_memory_init ()
malloc_trim (0);
}
+
#endif
diff --git a/src/revocation/plugin_block_revocation.c b/src/revocation/plugin_block_revocation.c
index 124524209..3d0b55a0d 100644
--- a/src/revocation/plugin_block_revocation.c
+++ b/src/revocation/plugin_block_revocation.c
@@ -252,4 +252,5 @@ libgnunet_plugin_block_revocation_done (void *cls)
return NULL;
}
+
/* end of plugin_block_revocation.c */
diff --git a/src/revocation/revocation.h b/src/revocation/revocation.h
index 60cc05457..b6e7a07ec 100644
--- a/src/revocation/revocation.h
+++ b/src/revocation/revocation.h
@@ -132,5 +132,4 @@ struct RevocationResponseMessage
GNUNET_NETWORK_STRUCT_END
-
#endif
diff --git a/src/revocation/test_revocation.c b/src/revocation/test_revocation.c
index 44d6c6ec8..012bac09e 100644
--- a/src/revocation/test_revocation.c
+++ b/src/revocation/test_revocation.c
@@ -406,4 +406,5 @@ main (int argc, char *argv[])
return ok;
}
+
/* end of test_revocation.c */
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index 03b96f264..af43a0fa1 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -160,7 +160,8 @@ struct STATcls
*
* @return corresponding enum
*/
-enum STAT_TYPE stat_str_2_type (const char *stat_str)
+enum STAT_TYPE
+stat_str_2_type (const char *stat_str)
{
if (0 == strncmp (stat_type_strings[STAT_TYPE_BLOCKS_NO_PULL],
stat_str,
@@ -890,9 +891,7 @@ tofile_ (const char *file_name, const char *line)
"Failed to write string to buffer (size: %i)\n",
size);
return;
- } */
-
- size = strlen (line) * sizeof(char);
+ } */size = strlen (line) * sizeof(char);
size2 = GNUNET_DISK_file_write (f, line, size);
if (size != size2)
@@ -916,6 +915,7 @@ tofile_ (const char *file_name, const char *line)
}
}
+
/**
* This function is used to facilitate writing important information to disk
*/
@@ -1000,7 +1000,8 @@ make_oplist_entry ()
* @return #GNUNET_YES if so
* #GNUNET_NO otherwise
*/
-static int check_statistics_collect_completed_single_peer (
+static int
+check_statistics_collect_completed_single_peer (
const struct RPSPeer *rps_peer)
{
if (cur_test_run.stat_collect_flags !=
@@ -1011,6 +1012,8 @@ static int check_statistics_collect_completed_single_peer (
}
return GNUNET_YES;
}
+
+
/**
* @brief Checks if all peers already received their statistics value from the
* statistics service.
@@ -1018,7 +1021,8 @@ static int check_statistics_collect_completed_single_peer (
* @return #GNUNET_YES if so
* #GNUNET_NO otherwise
*/
-static int check_statistics_collect_completed ()
+static int
+check_statistics_collect_completed ()
{
uint32_t i;
@@ -1039,6 +1043,7 @@ static int check_statistics_collect_completed ()
return GNUNET_YES;
}
+
static void
rps_disconnect_adapter (void *cls,
void *op_result);
@@ -1059,6 +1064,7 @@ cancel_pending_req (struct PendingRequest *pending_req)
GNUNET_free (pending_req);
}
+
static void
cancel_request (struct PendingReply *pending_rep)
{
@@ -1078,6 +1084,7 @@ cancel_request (struct PendingReply *pending_rep)
pending_rep = NULL;
}
+
void
clean_peer (unsigned peer_index)
{
@@ -1111,6 +1118,7 @@ clean_peer (unsigned peer_index)
}
}
+
/**
* Task run on timeout to shut everything down.
*/
@@ -1158,6 +1166,7 @@ shutdown_op (void *cls)
close_all_files ();
}
+
static void
trigger_shutdown (void *cls)
{
@@ -1209,7 +1218,7 @@ post_test_op (void *cls)
}
}
/* If we do not collect statistics, shut down directly */
- if ((NO_COLLECT_STATISTICS == cur_test_run.have_collect_statistics)||
+ if ((NO_COLLECT_STATISTICS == cur_test_run.have_collect_statistics) ||
(GNUNET_YES == check_statistics_collect_completed ()) )
{
GNUNET_SCHEDULER_cancel (shutdown_task);
@@ -1255,12 +1264,12 @@ info_cb (void *cb_cls,
(void) op;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
- if ((NULL == pinfo)||(NULL != emsg))
+ if ((NULL == pinfo) || (NULL != emsg))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Got Error: %s\n", emsg);
GNUNET_TESTBED_operation_done (entry->op);
@@ -1309,7 +1318,7 @@ rps_connect_complete_cb (void *cls,
struct RPSPeer *rps_peer = cls;
struct GNUNET_RPS_Handle *rps = ca_result;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1361,6 +1370,7 @@ rps_connect_adapter (void *cls,
return h;
}
+
/**
* Called to open a connection to the peer's statistics
*
@@ -1380,6 +1390,7 @@ stat_connect_adapter (void *cls,
return peer->stats_h;
}
+
/**
* Called to disconnect from peer's statistics service
*
@@ -1401,6 +1412,7 @@ stat_disconnect_adapter (void *cls, void *op_result)
peer->stats_h = NULL;
}
+
/**
* Called after successfully opening a connection to a peer's statistics
* service; we register statistics monitoring for CORE and NSE here.
@@ -1551,7 +1563,7 @@ request_peers (void *cls)
rps_peer->pending_req_tail,
pending_req);
rps_peer->num_pending_reqs--;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
return;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Requesting one peer\n");
@@ -1604,6 +1616,7 @@ schedule_missing_requests (struct RPSPeer *rps_peer)
}
}
+
void
cancel_pending_req_rep (struct RPSPeer *rps_peer)
{
@@ -1617,6 +1630,7 @@ cancel_pending_req_rep (struct RPSPeer *rps_peer)
GNUNET_assert (0 == rps_peer->num_pending_reps);
}
+
/***********************************
* MALICIOUS
***********************************/
@@ -1624,7 +1638,8 @@ cancel_pending_req_rep (struct RPSPeer *rps_peer)
/**
* Initialise only non-mal RPSPeers
*/
-static void mal_init_peer (struct RPSPeer *rps_peer)
+static void
+mal_init_peer (struct RPSPeer *rps_peer)
{
if (rps_peer->index >= round (portion * num_peers))
rps_peer->num_ids_to_request = 1;
@@ -1664,12 +1679,13 @@ mal_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
#endif /* ENABLE_MALICIOUS */
}
+
static void
mal_cb (struct RPSPeer *rps_peer)
{
uint32_t num_mal_peers;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1690,6 +1706,7 @@ mal_cb (struct RPSPeer *rps_peer)
#endif /* ENABLE_MALICIOUS */
}
+
/***********************************
* CHURN
***********************************/
@@ -1711,13 +1728,13 @@ churn (void *cls);
static void
churn_test_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
/* Start churn */
- if ((HAVE_CHURN == cur_test_run.have_churn)&&(NULL == churn_task))
+ if ((HAVE_CHURN == cur_test_run.have_churn) && (NULL == churn_task))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting churn task\n");
@@ -1735,6 +1752,7 @@ churn_test_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/***********************************
* PROFILER
***********************************/
@@ -1756,7 +1774,7 @@ churn_cb (void *cls,
(void) op;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1828,6 +1846,7 @@ churn_cb (void *cls,
// run_round ();
}
+
/**
* @brief Set the rps-service up or down for a specific peer
*
@@ -1895,7 +1914,7 @@ churn (void *cls)
(void) cls;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1956,7 +1975,8 @@ churn (void *cls)
/**
* Initialise given RPSPeer
*/
-static void profiler_init_peer (struct RPSPeer *rps_peer)
+static void
+profiler_init_peer (struct RPSPeer *rps_peer)
{
rps_peer->num_ids_to_request = cur_test_run.num_requests;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "peer shall request %i peers\n",
@@ -2111,13 +2131,13 @@ profiler_reply_handle_info (void *cls,
static void
profiler_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
/* Start churn */
- if ((HAVE_CHURN == cur_test_run.have_churn)&&(NULL == churn_task))
+ if ((HAVE_CHURN == cur_test_run.have_churn) && (NULL == churn_task))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting churn task\n");
@@ -2139,6 +2159,7 @@ profiler_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/**
* Function called from #profiler_eval with a filename.
*
@@ -2175,6 +2196,7 @@ file_name_cb (void *cls, const char *filename)
return GNUNET_OK;
}
+
/**
* This is run after the test finished.
*
@@ -2202,7 +2224,8 @@ profiler_eval (void)
*
* @return
*/
-static int is_in_view (uint32_t a, uint32_t b)
+static int
+is_in_view (uint32_t a, uint32_t b)
{
uint32_t i;
@@ -2218,7 +2241,9 @@ static int is_in_view (uint32_t a, uint32_t b)
return GNUNET_NO;
}
-static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
+
+static uint32_t
+get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
{
uint32_t i;
@@ -2238,6 +2263,7 @@ static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
GNUNET_assert (0);
}
+
/**
* @brief Counts number of peers in view of a that have b in their view
*
@@ -2246,7 +2272,8 @@ static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
*
* @return
*/
-static uint32_t count_containing_views (uint32_t a, uint32_t b)
+static uint32_t
+count_containing_views (uint32_t a, uint32_t b)
{
uint32_t i;
uint32_t peer_idx;
@@ -2263,13 +2290,15 @@ static uint32_t count_containing_views (uint32_t a, uint32_t b)
return count;
}
+
/**
* @brief Computes the probability for each other peer to be selected by the
* sampling process based on the views of all peers
*
* @param peer_idx index of the peer that is about to sample
*/
-static void compute_probabilities (uint32_t peer_idx)
+static void
+compute_probabilities (uint32_t peer_idx)
{
// double probs[num_peers] = { 0 };
double probs[num_peers];
@@ -2427,6 +2456,7 @@ static void compute_probabilities (uint32_t peer_idx)
GNUNET_free (probs_as_str);
}
+
/**
* @brief This counts the number of peers in which views a given peer occurs.
*
@@ -2436,7 +2466,8 @@ static void compute_probabilities (uint32_t peer_idx)
*
* @return the number of occurrences
*/
-static uint32_t count_peer_in_views_2 (uint32_t peer_idx)
+static uint32_t
+count_peer_in_views_2 (uint32_t peer_idx)
{
uint32_t i, j;
uint32_t count = 0;
@@ -2458,7 +2489,9 @@ static uint32_t count_peer_in_views_2 (uint32_t peer_idx)
return count;
}
-static uint32_t cumulated_view_sizes ()
+
+static uint32_t
+cumulated_view_sizes ()
{
uint32_t i;
@@ -2470,7 +2503,9 @@ static uint32_t cumulated_view_sizes ()
return view_sizes;
}
-static void count_peer_in_views (uint32_t *count_peers)
+
+static void
+count_peer_in_views (uint32_t *count_peers)
{
uint32_t i, j;
@@ -2488,7 +2523,9 @@ static void count_peer_in_views (uint32_t *count_peers)
}
}
-void compute_diversity ()
+
+void
+compute_diversity ()
{
uint32_t i;
/* ith entry represents the numer of occurrences in other peer's views */
@@ -2531,7 +2568,9 @@ void compute_diversity ()
GNUNET_free (deviation);
}
-void print_view_sizes ()
+
+void
+print_view_sizes ()
{
uint32_t i;
@@ -2545,15 +2584,19 @@ void print_view_sizes ()
}
}
-void all_views_updated_cb ()
+
+void
+all_views_updated_cb ()
{
compute_diversity ();
print_view_sizes ();
}
-void view_update_cb (void *cls,
- uint64_t view_size,
- const struct GNUNET_PeerIdentity *peers)
+
+void
+view_update_cb (void *cls,
+ uint64_t view_size,
+ const struct GNUNET_PeerIdentity *peers)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"View was updated (%" PRIu64 ")\n", view_size);
@@ -2602,6 +2645,7 @@ void view_update_cb (void *cls,
all_views_updated_cb ();
}
+
static void
pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
{
@@ -2612,7 +2656,9 @@ pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
GNUNET_RPS_view_request (h, 0, view_update_cb, rps_peer);
}
-void write_final_stats (void)
+
+void
+write_final_stats (void)
{
uint64_t sums[STAT_TYPE_MAX] = { 0 };
@@ -2732,6 +2778,7 @@ void write_final_stats (void)
sums[STAT_TYPE_VIEW_SIZE_AIM]);
}
+
/**
* Continuation called by #GNUNET_STATISTICS_get() functions.
*
@@ -2766,7 +2813,7 @@ post_test_shutdown_ready_cb (void *cls,
return;
}
- if ((NULL != rps_peer->stat_op)&&
+ if ((NULL != rps_peer->stat_op) &&
(GNUNET_YES == check_statistics_collect_completed_single_peer (
rps_peer)) )
{
@@ -2788,6 +2835,7 @@ post_test_shutdown_ready_cb (void *cls,
}
}
+
/**
* Callback function to process statistic values.
*
@@ -2907,7 +2955,7 @@ test_run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RUN was called\n");
/* Check whether we timed out */
- if ((n_peers != num_peers)||
+ if ((n_peers != num_peers) ||
(NULL == peers) ||
(0 == links_succeeded) )
{
@@ -3127,6 +3175,7 @@ run (void *cls,
NULL);
}
+
/**
* Entry point for the testcase, sets up the testbed.
*
@@ -3204,4 +3253,5 @@ main (int argc, char *argv[])
return ret_value;
}
+
/* end of test_rps.c */
diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c
index 6c1c96cc9..33c03f006 100644
--- a/src/rps/gnunet-rps.c
+++ b/src/rps/gnunet-rps.c
@@ -106,6 +106,7 @@ reply_handle (void *cls,
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Callback called on receipt view update.
* Prints view.
@@ -249,6 +250,7 @@ run (void *cls,
}
}
+
/**
* The main function to rps.
*
@@ -288,4 +290,5 @@ main (int argc, char *const *argv)
options, &run, NULL)) ? ret : 1;
}
+
/* end of gnunet-rps.c */
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 66ffd173a..58fbd6a18 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -85,7 +85,6 @@
#define unset_channel_flag(channel_flags, mask) ((*channel_flags) &= ~(mask))
-
/**
* Pending operation on peer consisting of callback and closure
*
@@ -623,6 +622,7 @@ get_peer_ctx (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map,
return ctx;
}
+
/**
* @brief Check whether we have information about the given peer.
*
@@ -856,6 +856,7 @@ add_valid_peer (const struct GNUNET_PeerIdentity *peer,
return ret;
}
+
static void
remove_pending_message (struct PendingMessage *pending_msg, int cancel);
@@ -900,6 +901,7 @@ set_peer_online (struct PeerContext *peer_ctx)
GNUNET_array_grow (peer_ctx->pending_ops, peer_ctx->num_pending_ops, 0);
}
+
static void
cleanup_destroyed_channel (void *cls,
const struct GNUNET_CADET_Channel *channel);
@@ -1048,6 +1050,7 @@ get_mq (struct PeerContext *peer_ctx)
return peer_ctx->mq;
}
+
/**
* @brief Add an envelope to a message passed to mq to list of pending messages
*
@@ -1124,6 +1127,7 @@ mq_online_check_successful (void *cls)
}
}
+
/**
* Issue a check whether peer is online
*
@@ -1758,6 +1762,7 @@ check_peer_flag (const struct GNUNET_CONTAINER_MultiPeerMap *peer_map,
return check_peer_flag_set (peer_ctx, flags);
}
+
/**
* @brief Try connecting to a peer to see whether it is online
*
@@ -1969,6 +1974,7 @@ destroy_sending_channel (struct PeerContext *peer_ctx)
return GNUNET_NO;
}
+
/**
* @brief Send a message to another peer.
*
@@ -1999,6 +2005,7 @@ send_message (struct PeerContext *peer_ctx,
GNUNET_MQ_send (mq, ev);
}
+
/**
* @brief Schedule a operation on given peer
*
@@ -2035,6 +2042,7 @@ schedule_operation (struct PeerContext *peer_ctx,
return GNUNET_NO;
}
+
/***********************************************************************
* /Old gnunet-service-rps_peers.c
***********************************************************************/
@@ -2122,9 +2130,6 @@ struct ClientContext *cli_ctx_tail;
***********************************************************************/
-
-
-
/***********************************************************************
* Util functions
***********************************************************************/
@@ -2383,7 +2388,7 @@ clients_notify_stream_peer (const struct Sub *sub,
cli_ctx_iter = cli_ctx_iter->next)
{
if ((GNUNET_YES == cli_ctx_iter->stream_update) &&
- ((sub == cli_ctx_iter->sub) ||(sub == msub) ))
+ ((sub == cli_ctx_iter->sub) || (sub == msub) ))
{
send_stream_peers (cli_ctx_iter, num_peers, peers);
}
@@ -2828,7 +2833,7 @@ cleanup_destroyed_channel (void *cls,
channel_ctx->channel = NULL;
remove_channel_ctx (channel_ctx);
- if ((NULL != peer_ctx)&&
+ if ((NULL != peer_ctx) &&
(peer_ctx->send_channel_ctx == channel_ctx) &&
(GNUNET_YES == check_sending_channel_needed (channel_ctx->peer_ctx)) )
{
@@ -2836,12 +2841,12 @@ cleanup_destroyed_channel (void *cls,
}
}
+
/***********************************************************************
* /Util functions
***********************************************************************/
-
/***********************************************************************
* Sub
***********************************************************************/
@@ -3016,6 +3021,8 @@ write_histogram_to_file (const uint32_t hist_array[],
collect_str);
GNUNET_free (file_name_full);
}
+
+
#endif /* TO_FILE */
@@ -3148,6 +3155,7 @@ core_disconnects (void *cls,
GNUNET_CONTAINER_multipeermap_remove_all (map_single_hop, peer);
}
+
/***********************************************************************
* /Core handlers
***********************************************************************/
@@ -3442,7 +3450,7 @@ handle_client_start_sub (void *cls,
struct ClientContext *cli_ctx = cls;
LOG (GNUNET_ERROR_TYPE_DEBUG, "Client requested start of a new sub.\n");
- if ((NULL != cli_ctx->sub)&&
+ if ((NULL != cli_ctx->sub) &&
(0 != memcmp (&cli_ctx->sub->hash,
&msg->hash,
sizeof(struct GNUNET_HashCode))) )
@@ -3633,7 +3641,7 @@ handle_peer_pull_request (void *cls,
#if ENABLE_MALICIOUS
if ((1 == mal_type)
- ||(3 == mal_type))
+ || (3 == mal_type))
{ /* Try to maximise representation */
send_pull_reply (peer_ctx, mal_peers, num_mal_peers);
}
@@ -3774,13 +3782,13 @@ handle_peer_pull_reply (void *cls,
#if ENABLE_MALICIOUS
if ((NULL != att_peer_set) &&
- ((1 == mal_type) ||(3 == mal_type) ))
+ ((1 == mal_type) || (3 == mal_type) ))
{ /* Add attacked peer to local list */
// TODO check if we sent a request and this was the first reply
if ((GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (att_peer_set,
&peers[i]))
- &&(GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mal_peer_set,
- &peers[i])) )
+ && (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mal_peer_set,
+ &peers[i])) )
{
tmp_att_peer = GNUNET_new (struct AttackedPeer);
tmp_att_peer->peer_id = peers[i];
@@ -3988,6 +3996,7 @@ check_client_act_malicious (void *cls,
return GNUNET_OK;
}
+
/**
* Turn RPS service to act malicious.
*
@@ -4236,6 +4245,8 @@ do_mal_round (void *cls)
&do_mal_round, sub);
LOG (GNUNET_ERROR_TYPE_DEBUG, "Finished round\n");
}
+
+
#endif /* ENABLE_MALICIOUS */
@@ -4785,6 +4796,7 @@ client_connect_cb (void *cls,
return cli_ctx;
}
+
/**
* Callback called when a client disconnected from the service
*
diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c
index 8fcfc5558..54e361d32 100644
--- a/src/rps/gnunet-service-rps_custommap.c
+++ b/src/rps/gnunet-service-rps_custommap.c
@@ -87,6 +87,7 @@ CustomPeerMap_create (unsigned int len)
return c_peer_map;
}
+
/**
* Get the size of the custom peer map
*
@@ -102,6 +103,7 @@ CustomPeerMap_size (const struct CustomPeerMap *c_peer_map)
return GNUNET_CONTAINER_multipeermap_size (c_peer_map->peer_map);
}
+
/**
* Insert peer into the custom peer map
*
@@ -149,6 +151,7 @@ CustomPeerMap_put (const struct CustomPeerMap *c_peer_map,
return GNUNET_NO;
}
+
/**
* Check whether custom peer map contains a peer
*
@@ -165,6 +168,7 @@ CustomPeerMap_contains_peer (const struct CustomPeerMap *c_peer_map,
return GNUNET_CONTAINER_multipeermap_contains (c_peer_map->peer_map, peer);
}
+
/**
* Get index of peer in custom peer map
*
@@ -184,6 +188,7 @@ CustomPeerMap_get_index_pointer (const struct CustomPeerMap *c_peer_map,
return index;
}
+
/**
* Remove peer from custom peer map
*
@@ -243,6 +248,7 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_peer_map,
return GNUNET_OK;
}
+
/**
* Get a peer by index
*
@@ -264,6 +270,7 @@ CustomPeerMap_get_peer_by_index (const struct CustomPeerMap *c_peer_map,
return NULL;
}
+
/**
* Remove peer from custom peer map by index
*
@@ -301,6 +308,7 @@ CustomPeerMap_remove_peer_by_index (const struct CustomPeerMap *c_peer_map,
return GNUNET_OK;
}
+
/**
* Clear the custom peer map
*
@@ -326,6 +334,7 @@ CustomPeerMap_clear (const struct CustomPeerMap *c_peer_map)
GNUNET_assert (0 == CustomPeerMap_size (c_peer_map));
}
+
/**
* Destroy peermap.
*
@@ -340,4 +349,5 @@ CustomPeerMap_destroy (struct CustomPeerMap *c_peer_map)
GNUNET_free (c_peer_map);
}
+
/* end of gnunet-service-rps_custommap.c */
diff --git a/src/rps/gnunet-service-rps_sampler.c b/src/rps/gnunet-service-rps_sampler.c
index 7573fd4eb..598cc887e 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -216,6 +216,7 @@ RPS_sampler_init (size_t init_size,
return sampler;
}
+
/**
* Get one random peer out of the sampled peers.
*
diff --git a/src/rps/gnunet-service-rps_sampler_elem.c b/src/rps/gnunet-service-rps_sampler_elem.c
index 17b3be6d2..aa8b72445 100644
--- a/src/rps/gnunet-service-rps_sampler_elem.c
+++ b/src/rps/gnunet-service-rps_sampler_elem.c
@@ -152,6 +152,7 @@ RPS_sampler_elem_next (struct RPS_SamplerElement *sampler_elem,
sampler_elem->is_empty = NOT_EMPTY;
}
+
/**
* Set the min-wise independent function of the given sampler element.
*
@@ -165,4 +166,5 @@ RPS_sampler_elem_set (struct RPS_SamplerElement *sampler_elem,
sampler_elem->auth_key = auth_key;
}
+
/* end of gnunet-service-rps.c */
diff --git a/src/rps/gnunet-service-rps_view.c b/src/rps/gnunet-service-rps_view.c
index 5de7c84dc..d58b995a3 100644
--- a/src/rps/gnunet-service-rps_view.c
+++ b/src/rps/gnunet-service-rps_view.c
@@ -290,4 +290,5 @@ View_destroy (struct View *view)
GNUNET_free (view);
}
+
/* end of gnunet-service-rps_view.c */
diff --git a/src/rps/rps-sampler_common.c b/src/rps/rps-sampler_common.c
index ab8c65f17..488ed8e01 100644
--- a/src/rps/rps-sampler_common.c
+++ b/src/rps/rps-sampler_common.c
@@ -354,7 +354,7 @@ RPS_sampler_count_id (struct RPS_Sampler *sampler,
for (i = 0; i < sampler->sampler_size; i++)
{
if ((0 == GNUNET_memcmp (&sampler->sampler_elements[i]->peer_id, id))
- &&(EMPTY != sampler->sampler_elements[i]->is_empty) )
+ && (EMPTY != sampler->sampler_elements[i]->is_empty) )
count++;
}
return count;
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index 66f93d86f..d2cdd3aa7 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -61,7 +61,6 @@ static unsigned num_bits_buf_unaligned;
static struct GNUNET_CONTAINER_MultiHashMap *open_files;
-
/**
* @brief Get file handle
*
@@ -162,7 +161,6 @@ close_all_files ()
}
-
void
to_file_raw (const char *file_name, const char *buf, size_t size_buf)
{
@@ -206,6 +204,7 @@ to_file_raw (const char *file_name, const char *buf, size_t size_buf)
"Unable to close file\n");
}
+
void
to_file_raw_unaligned (const char *file_name,
const char *buf,
@@ -372,6 +371,7 @@ to_file_raw_unaligned (const char *file_name,
LOG (GNUNET_ERROR_TYPE_DEBUG, "\n");
}
+
char *
auth_key_to_string (struct GNUNET_CRYPTO_AuthKey auth_key)
{
@@ -414,6 +414,7 @@ auth_key_to_string (struct GNUNET_CRYPTO_AuthKey auth_key)
return name_buf;
}
+
#endif /* TO_FILE */
@@ -470,7 +471,7 @@ store_prefix_file_name (const unsigned int index,
64,
"%u",
index);
- if ((64 < out_size)||
+ if ((64 < out_size) ||
(0 > out_size) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -488,7 +489,7 @@ store_prefix_file_name (const unsigned int index,
"/tmp/rps/%s-%s",
prefix,
index_str);
- if ((len_file_name < out_size)||
+ if ((len_file_name < out_size) ||
(0 > out_size) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -507,7 +508,8 @@ store_prefix_file_name (const unsigned int index,
*
* @return Factorial of @a x
*/
-uint32_t fac (uint32_t x)
+uint32_t
+fac (uint32_t x)
{
if (1 >= x)
{
@@ -516,6 +518,7 @@ uint32_t fac (uint32_t x)
return x * fac (x - 1);
}
+
/**
* @brief Binomial coefficient (n choose k)
*
@@ -524,7 +527,8 @@ uint32_t fac (uint32_t x)
*
* @return Binomial coefficient of @a n and @a k
*/
-uint32_t binom (uint32_t n, uint32_t k)
+uint32_t
+binom (uint32_t n, uint32_t k)
{
// GNUNET_assert (n >= k);
if (k > n)
diff --git a/src/rps/rps.h b/src/rps/rps.h
index 32e5d07af..9d42a6104 100644
--- a/src/rps/rps.h
+++ b/src/rps/rps.h
@@ -56,7 +56,6 @@ struct GNUNET_RPS_P2P_PullReplyMessage
};
-
/***********************************************************************
* Client-Service Messages
***********************************************************************/
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index 19cbdcf8a..da24ca4c9 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -857,7 +857,7 @@ GNUNET_RPS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
GNUNET_free (h);
return NULL;
}
- if ((0 > h->desired_probability)||
+ if ((0 > h->desired_probability) ||
(1 < h->desired_probability) )
{
LOG (GNUNET_ERROR_TYPE_ERROR,
@@ -876,7 +876,7 @@ GNUNET_RPS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
GNUNET_free (h);
return NULL;
}
- if ((0 > h->desired_probability)||
+ if ((0 > h->desired_probability) ||
(1 < h->desired_probability) )
{
LOG (GNUNET_ERROR_TYPE_ERROR,
@@ -1186,6 +1186,8 @@ GNUNET_RPS_act_malicious (struct GNUNET_RPS_Handle *h,
GNUNET_MQ_send (h->mq, ev);
}
+
+
#endif /* ENABLE_MALICIOUS */
diff --git a/src/rps/test_rps.c b/src/rps/test_rps.c
index 3a01e73ff..81cf63c72 100644
--- a/src/rps/test_rps.c
+++ b/src/rps/test_rps.c
@@ -623,9 +623,7 @@ tofile_ (const char *file_name, const char *line)
"Failed to write string to buffer (size: %i)\n",
size);
return;
- } */
-
- size = strlen (line) * sizeof(char);
+ } */size = strlen (line) * sizeof(char);
size2 = GNUNET_DISK_file_write (f, line, size);
if (size != size2)
@@ -649,6 +647,7 @@ tofile_ (const char *file_name, const char *line)
}
}
+
/**
* This function is used to facilitate writing important information to disk
*/
@@ -740,7 +739,8 @@ make_oplist_entry ()
* @return #GNUNET_YES if so
* #GNUNET_NO otherwise
*/
-static int check_statistics_collect_completed_single_peer (
+static int
+check_statistics_collect_completed_single_peer (
const struct RPSPeer *rps_peer)
{
if (cur_test_run.stat_collect_flags !=
@@ -760,7 +760,8 @@ static int check_statistics_collect_completed_single_peer (
* @return #GNUNET_YES if so
* #GNUNET_NO otherwise
*/
-static int check_statistics_collect_completed ()
+static int
+check_statistics_collect_completed ()
{
uint32_t i;
@@ -853,7 +854,7 @@ post_test_op (void *cls)
}
}
/* If we do not collect statistics, shut down directly */
- if ((NO_COLLECT_STATISTICS == cur_test_run.have_collect_statistics)||
+ if ((NO_COLLECT_STATISTICS == cur_test_run.have_collect_statistics) ||
(GNUNET_YES == check_statistics_collect_completed ()) )
{
GNUNET_SCHEDULER_shutdown ();
@@ -871,7 +872,7 @@ seed_peers (void *cls)
unsigned int amount;
unsigned int i;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -925,6 +926,7 @@ seed_peers_big (void *cls)
GNUNET_RPS_seed_ids (peer->rps_handle, amount, ids_to_seed);
}
+
/**
* Get the id of peer i.
*/
@@ -938,12 +940,12 @@ info_cb (void *cb_cls,
(void) op;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
- if ((NULL == pinfo)||(NULL != emsg))
+ if ((NULL == pinfo) || (NULL != emsg))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Got Error: %s\n", emsg);
GNUNET_TESTBED_operation_done (entry->op);
@@ -994,7 +996,7 @@ rps_connect_complete_cb (void *cls,
GNUNET_assert (NULL != ca_result);
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1046,6 +1048,7 @@ rps_connect_adapter (void *cls,
return h;
}
+
/**
* Called to open a connection to the peer's statistics
*
@@ -1065,6 +1068,7 @@ stat_connect_adapter (void *cls,
return peer->stats_h;
}
+
/**
* Called to disconnect from peer's statistics service
*
@@ -1086,6 +1090,7 @@ stat_disconnect_adapter (void *cls, void *op_result)
peer->stats_h = NULL;
}
+
/**
* Called after successfully opening a connection to a peer's statistics
* service; we register statistics monitoring for CORE and NSE here.
@@ -1156,20 +1161,24 @@ default_eval_cb (void)
return evaluate ();
}
+
static int
no_eval (void)
{
return 0;
}
+
/**
* Initialise given RPSPeer
*/
-static void default_init_peer (struct RPSPeer *rps_peer)
+static void
+default_init_peer (struct RPSPeer *rps_peer)
{
rps_peer->num_ids_to_request = 1;
}
+
/**
* Callback to call on receipt of a reply
*
@@ -1206,7 +1215,7 @@ default_reply_handle (void *cls,
rps_peer->num_recv_ids++;
}
- if ((0 == evaluate ())&&(HAVE_QUICK_QUIT == cur_test_run.have_quick_quit))
+ if ((0 == evaluate ()) && (HAVE_QUICK_QUIT == cur_test_run.have_quick_quit))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test succeeded before timeout\n");
GNUNET_assert (NULL != post_test_task);
@@ -1216,6 +1225,7 @@ default_reply_handle (void *cls,
}
}
+
/**
* Request random peers.
*/
@@ -1226,7 +1236,7 @@ request_peers (void *cls)
struct RPSPeer *rps_peer;
struct PendingReply *pending_rep;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
return;
rps_peer = pending_req->rps_peer;
GNUNET_assert (1 <= rps_peer->num_pending_reqs);
@@ -1248,6 +1258,7 @@ request_peers (void *cls)
rps_peer->num_pending_reqs--;
}
+
static void
cancel_pending_req (struct PendingRequest *pending_req)
{
@@ -1264,6 +1275,7 @@ cancel_pending_req (struct PendingRequest *pending_req)
GNUNET_free (pending_req);
}
+
static void
cancel_request (struct PendingReply *pending_rep)
{
@@ -1280,6 +1292,7 @@ cancel_request (struct PendingReply *pending_rep)
GNUNET_free (pending_rep);
}
+
/**
* Cancel a request.
*/
@@ -1289,7 +1302,7 @@ cancel_request_cb (void *cls)
struct RPSPeer *rps_peer = cls;
struct PendingReply *pending_rep;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
return;
pending_rep = rps_peer->pending_rep_head;
GNUNET_assert (1 <= rps_peer->num_pending_reps);
@@ -1330,6 +1343,7 @@ schedule_missing_requests (struct RPSPeer *rps_peer)
}
}
+
void
cancel_pending_req_rep (struct RPSPeer *rps_peer)
{
@@ -1343,6 +1357,7 @@ cancel_pending_req_rep (struct RPSPeer *rps_peer)
GNUNET_assert (0 == rps_peer->num_pending_reps);
}
+
/***********************************
* MALICIOUS
***********************************/
@@ -1350,7 +1365,8 @@ cancel_pending_req_rep (struct RPSPeer *rps_peer)
/**
* Initialise only non-mal RPSPeers
*/
-static void mal_init_peer (struct RPSPeer *rps_peer)
+static void
+mal_init_peer (struct RPSPeer *rps_peer)
{
if (rps_peer->index >= round (portion * num_peers))
rps_peer->num_ids_to_request = 1;
@@ -1390,12 +1406,13 @@ mal_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
#endif /* ENABLE_MALICIOUS */
}
+
static void
mal_cb (struct RPSPeer *rps_peer)
{
uint32_t num_mal_peers;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1423,7 +1440,7 @@ mal_cb (struct RPSPeer *rps_peer)
static void
single_req_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1431,13 +1448,14 @@ single_req_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/***********************************
* DELAYED_REQUESTS
***********************************/
static void
delay_req_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1445,13 +1463,14 @@ delay_req_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/***********************************
* SEED
***********************************/
static void
seed_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1461,13 +1480,14 @@ seed_cb (struct RPSPeer *rps_peer)
seed_peers, rps_peer);
}
+
/***********************************
* SEED_BIG
***********************************/
static void
seed_big_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1478,6 +1498,7 @@ seed_big_cb (struct RPSPeer *rps_peer)
seed_peers_big, rps_peer);
}
+
/***********************************
* SINGLE_PEER_SEED
***********************************/
@@ -1488,13 +1509,14 @@ single_peer_seed_cb (struct RPSPeer *rps_peer)
// TODO
}
+
/***********************************
* SEED_REQUEST
***********************************/
static void
seed_req_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1505,6 +1527,7 @@ seed_req_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
// TODO start big mal
/***********************************
@@ -1513,7 +1536,7 @@ seed_req_cb (struct RPSPeer *rps_peer)
static void
req_cancel_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1525,6 +1548,7 @@ req_cancel_cb (struct RPSPeer *rps_peer)
cancel_request_cb, rps_peer);
}
+
/***********************************
* CHURN
***********************************/
@@ -1546,13 +1570,13 @@ churn (void *cls);
static void
churn_test_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
/* Start churn */
- if ((HAVE_CHURN == cur_test_run.have_churn)&&(NULL == churn_task))
+ if ((HAVE_CHURN == cur_test_run.have_churn) && (NULL == churn_task))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting churn task\n");
@@ -1570,6 +1594,7 @@ churn_test_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/***********************************
* SUB
***********************************/
@@ -1633,6 +1658,7 @@ sub_pre (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
rps_peer);
}
+
/***********************************
* PROFILER
***********************************/
@@ -1653,7 +1679,7 @@ churn_cb (void *cls,
// FIXME
struct OpListEntry *entry = cls;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1725,6 +1751,7 @@ churn_cb (void *cls,
// run_round ();
}
+
/**
* @brief Set the rps-service up or down for a specific peer
*
@@ -1791,7 +1818,7 @@ churn (void *cls)
double portion_go_online;
double portion_go_offline;
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
@@ -1852,7 +1879,8 @@ churn (void *cls)
/**
* Initialise given RPSPeer
*/
-static void profiler_init_peer (struct RPSPeer *rps_peer)
+static void
+profiler_init_peer (struct RPSPeer *rps_peer)
{
if (num_peers - 1 == rps_peer->index)
rps_peer->num_ids_to_request = cur_test_run.num_requests;
@@ -1907,13 +1935,13 @@ profiler_reply_handle (void *cls,
static void
profiler_cb (struct RPSPeer *rps_peer)
{
- if ((GNUNET_YES == in_shutdown)||(GNUNET_YES == post_test))
+ if ((GNUNET_YES == in_shutdown) || (GNUNET_YES == post_test))
{
return;
}
/* Start churn */
- if ((HAVE_CHURN == cur_test_run.have_churn)&&(NULL == churn_task))
+ if ((HAVE_CHURN == cur_test_run.have_churn) && (NULL == churn_task))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting churn task\n");
@@ -1935,6 +1963,7 @@ profiler_cb (struct RPSPeer *rps_peer)
schedule_missing_requests (rps_peer);
}
+
/**
* Function called from #profiler_eval with a filename.
*
@@ -1972,6 +2001,7 @@ file_name_cb (void *cls, const char *filename)
return GNUNET_OK;
}
+
/**
* This is run after the test finished.
*
@@ -1998,7 +2028,8 @@ profiler_eval (void)
*
* @return
*/
-static int is_in_view (uint32_t a, uint32_t b)
+static int
+is_in_view (uint32_t a, uint32_t b)
{
uint32_t i;
@@ -2014,7 +2045,9 @@ static int is_in_view (uint32_t a, uint32_t b)
return GNUNET_NO;
}
-static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
+
+static uint32_t
+get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
{
uint32_t i;
@@ -2034,6 +2067,7 @@ static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
GNUNET_assert (0);
}
+
/**
* @brief Counts number of peers in view of a that have b in their view
*
@@ -2042,7 +2076,8 @@ static uint32_t get_idx_of_pid (const struct GNUNET_PeerIdentity *pid)
*
* @return
*/
-static uint32_t count_containing_views (uint32_t a, uint32_t b)
+static uint32_t
+count_containing_views (uint32_t a, uint32_t b)
{
uint32_t i;
uint32_t peer_idx;
@@ -2059,13 +2094,15 @@ static uint32_t count_containing_views (uint32_t a, uint32_t b)
return count;
}
+
/**
* @brief Computes the probability for each other peer to be selected by the
* sampling process based on the views of all peers
*
* @param peer_idx index of the peer that is about to sample
*/
-static void compute_probabilities (uint32_t peer_idx)
+static void
+compute_probabilities (uint32_t peer_idx)
{
// double probs[num_peers] = { 0 };
double probs[num_peers];
@@ -2197,6 +2234,7 @@ static void compute_probabilities (uint32_t peer_idx)
GNUNET_free (probs_as_str);
}
+
/**
* @brief This counts the number of peers in which views a given peer occurs.
*
@@ -2206,7 +2244,8 @@ static void compute_probabilities (uint32_t peer_idx)
*
* @return the number of occurrences
*/
-static uint32_t count_peer_in_views_2 (uint32_t peer_idx)
+static uint32_t
+count_peer_in_views_2 (uint32_t peer_idx)
{
uint32_t i, j;
uint32_t count = 0;
@@ -2228,7 +2267,9 @@ static uint32_t count_peer_in_views_2 (uint32_t peer_idx)
return count;
}
-static uint32_t cumulated_view_sizes ()
+
+static uint32_t
+cumulated_view_sizes ()
{
uint32_t i;
@@ -2240,7 +2281,9 @@ static uint32_t cumulated_view_sizes ()
return view_sizes;
}
-static void count_peer_in_views (uint32_t *count_peers)
+
+static void
+count_peer_in_views (uint32_t *count_peers)
{
uint32_t i, j;
@@ -2258,7 +2301,9 @@ static void count_peer_in_views (uint32_t *count_peers)
}
}
-void compute_diversity ()
+
+void
+compute_diversity ()
{
uint32_t i;
/* ith entry represents the numer of occurrences in other peer's views */
@@ -2301,7 +2346,9 @@ void compute_diversity ()
GNUNET_free (deviation);
}
-void print_view_sizes ()
+
+void
+print_view_sizes ()
{
uint32_t i;
@@ -2315,15 +2362,19 @@ void print_view_sizes ()
}
}
-void all_views_updated_cb ()
+
+void
+all_views_updated_cb ()
{
compute_diversity ();
print_view_sizes ();
}
-void view_update_cb (void *cls,
- uint64_t view_size,
- const struct GNUNET_PeerIdentity *peers)
+
+void
+view_update_cb (void *cls,
+ uint64_t view_size,
+ const struct GNUNET_PeerIdentity *peers)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"View was updated (%" PRIu64 ")\n", view_size);
@@ -2372,6 +2423,7 @@ void view_update_cb (void *cls,
all_views_updated_cb ();
}
+
static void
pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
{
@@ -2380,7 +2432,9 @@ pre_profiler (struct RPSPeer *rps_peer, struct GNUNET_RPS_Handle *h)
GNUNET_RPS_view_request (h, 0, view_update_cb, rps_peer);
}
-void write_final_stats (void)
+
+void
+write_final_stats (void)
{
uint32_t i;
@@ -2416,6 +2470,7 @@ void write_final_stats (void)
}
}
+
/**
* Continuation called by #GNUNET_STATISTICS_get() functions.
*
@@ -2448,7 +2503,7 @@ post_test_shutdown_ready_cb (void *cls,
GNUNET_break (0);
}
- if ((NULL != rps_peer->stat_op)&&
+ if ((NULL != rps_peer->stat_op) &&
(GNUNET_YES == check_statistics_collect_completed_single_peer (
rps_peer)) )
{
@@ -2470,6 +2525,7 @@ post_test_shutdown_ready_cb (void *cls,
}
}
+
/**
* @brief Converts string representation to the corresponding #STAT_TYPE enum.
*
@@ -2477,7 +2533,8 @@ post_test_shutdown_ready_cb (void *cls,
*
* @return corresponding enum
*/
-enum STAT_TYPE stat_str_2_type (const char *stat_str)
+enum STAT_TYPE
+stat_str_2_type (const char *stat_str)
{
if (0 == strncmp ("# rounds blocked - no pull replies", stat_str, strlen (
"# rounds blocked - no pull replies")))
@@ -2571,7 +2628,8 @@ enum STAT_TYPE stat_str_2_type (const char *stat_str)
*
* @return string representation that matches statistics value
*/
-char*stat_type_2_str (enum STAT_TYPE stat_type)
+char*
+stat_type_2_str (enum STAT_TYPE stat_type)
{
switch (stat_type)
{
@@ -2630,6 +2688,7 @@ char*stat_type_2_str (enum STAT_TYPE stat_type)
}
}
+
/**
* Callback function to process statistic values.
*
@@ -2735,7 +2794,9 @@ stat_iterator (void *cls,
return GNUNET_OK;
}
-void post_profiler (struct RPSPeer *rps_peer)
+
+void
+post_profiler (struct RPSPeer *rps_peer)
{
if (COLLECT_STATISTICS != cur_test_run.have_collect_statistics)
{
@@ -2808,7 +2869,7 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "RUN was called\n");
/* Check whether we timed out */
- if ((n_peers != num_peers)||
+ if ((n_peers != num_peers) ||
(NULL == peers) ||
(0 == links_succeeded) )
{
diff --git a/src/rps/test_rps_api.c b/src/rps/test_rps_api.c
index 6fca7ea12..06dad2887 100644
--- a/src/rps/test_rps_api.c
+++ b/src/rps/test_rps_api.c
@@ -83,4 +83,5 @@ main (int argc, char *argv[])
return check ();
}
+
/* end of test_rps_api.c */
diff --git a/src/rps/test_service_rps_custommap.c b/src/rps/test_service_rps_custommap.c
index 6f6f6b0d3..05590b097 100644
--- a/src/rps/test_service_rps_custommap.c
+++ b/src/rps/test_service_rps_custommap.c
@@ -123,4 +123,5 @@ main (int argc, char *argv[])
return check ();
}
+
/* end of test_service_rps_custommap.c */
diff --git a/src/rps/test_service_rps_sampler_elem.c b/src/rps/test_service_rps_sampler_elem.c
index 706abf4f9..8fef5adaf 100644
--- a/src/rps/test_service_rps_sampler_elem.c
+++ b/src/rps/test_service_rps_sampler_elem.c
@@ -209,4 +209,5 @@ main (int argc, char *argv[])
return check ();
}
+
/* end of test_service_rps_peers.c */
diff --git a/src/rps/test_service_rps_view.c b/src/rps/test_service_rps_view.c
index 5b668efe1..5a8c00849 100644
--- a/src/rps/test_service_rps_view.c
+++ b/src/rps/test_service_rps_view.c
@@ -141,4 +141,5 @@ main ()
return check ();
}
+
/* end of test_service_rps_view.c */
diff --git a/src/scalarproduct/gnunet-scalarproduct.c b/src/scalarproduct/gnunet-scalarproduct.c
index 76320dbba..7dc8ff5c3 100644
--- a/src/scalarproduct/gnunet-scalarproduct.c
+++ b/src/scalarproduct/gnunet-scalarproduct.c
@@ -398,4 +398,5 @@ main (int argc, char *const *argv)
options, &run, NULL)) ? ret : 1;
}
+
/* end of gnunet-scalarproduct.c */
diff --git a/src/scalarproduct/gnunet-service-scalarproduct.h b/src/scalarproduct/gnunet-service-scalarproduct.h
index f2592bacf..4e79afa2f 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct.h
+++ b/src/scalarproduct/gnunet-service-scalarproduct.h
@@ -136,7 +136,6 @@ struct BobCryptodataMultipartMessage
};
-
GNUNET_NETWORK_STRUCT_END
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
index 66b01c89e..44534c850 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
@@ -623,6 +623,7 @@ check_bobs_cryptodata_multipart (
return GNUNET_OK;
}
+
/**
* Handle a multipart chunk of a response we got from another service
* we wanted to calculate a scalarproduct with.
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_bob.c b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
index 23d59a36a..c000749af 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_bob.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_bob.c
@@ -202,7 +202,6 @@ struct BobServiceSession
};
-
/**
* GNUnet configuration handle
*/
@@ -524,6 +523,8 @@ transmit_bobs_cryptodata_message (struct BobServiceSession *s)
e);
transmit_bobs_cryptodata_message_multipart (s);
}
+
+
#undef ELEMENT_CAPACITY
diff --git a/src/scalarproduct/test_ecc_scalarproduct.c b/src/scalarproduct/test_ecc_scalarproduct.c
index 1117f0811..eced3ef6a 100644
--- a/src/scalarproduct/test_ecc_scalarproduct.c
+++ b/src/scalarproduct/test_ecc_scalarproduct.c
@@ -173,4 +173,5 @@ main (int argc, char *argv[])
return 0;
}
+
/* end of test_ecc_scalarproduct.c */
diff --git a/src/secretsharing/gnunet-secretsharing-profiler.c b/src/secretsharing/gnunet-secretsharing-profiler.c
index 38163e2c2..3465e0167 100644
--- a/src/secretsharing/gnunet-secretsharing-profiler.c
+++ b/src/secretsharing/gnunet-secretsharing-profiler.c
@@ -207,8 +207,9 @@ decrypt_connect_complete (void *cls,
* @param cls Plaintext
* @param plaintext Plaintext
*/
-static void decrypt_cb (void *cls,
- const struct GNUNET_SECRETSHARING_Plaintext *plaintext)
+static void
+decrypt_cb (void *cls,
+ const struct GNUNET_SECRETSHARING_Plaintext *plaintext)
{
struct GNUNET_SECRETSHARING_DecryptionHandle **dhp = cls;
unsigned int n = dhp - decrypt_handles;
@@ -244,7 +245,6 @@ static void decrypt_cb (void *cls,
}
-
/**
* Adapter function called to establish a connection to
* a service.
@@ -383,7 +383,6 @@ session_connect_adapter (void *cls,
}
-
/**
* Adapter function called to destroy a connection to
* a service.
diff --git a/src/secretsharing/gnunet-service-secretsharing.c b/src/secretsharing/gnunet-service-secretsharing.c
index bf7f35920..1aec5000e 100644
--- a/src/secretsharing/gnunet-service-secretsharing.c
+++ b/src/secretsharing/gnunet-service-secretsharing.c
@@ -662,7 +662,6 @@ cleanup_task (void *cls)
}
-
/**
* Generate the random coefficients of our pre-secret polynomial
*
@@ -884,7 +883,6 @@ keygen_round2_conclude (void *cls)
}
-
static void
restore_fair (const struct GNUNET_CRYPTO_PaillierPublicKey *ppub,
const struct GNUNET_SECRETSHARING_FairEncryption *fe,
diff --git a/src/secretsharing/secretsharing.h b/src/secretsharing/secretsharing.h
index 01d7dcf6b..af6263c46 100644
--- a/src/secretsharing/secretsharing.h
+++ b/src/secretsharing/secretsharing.h
@@ -81,7 +81,6 @@ struct GNUNET_SECRETSHARING_CreateMessage
};
-
struct GNUNET_SECRETSHARING_ShareHeaderNBO
{
/**
diff --git a/src/secretsharing/secretsharing_api.c b/src/secretsharing/secretsharing_api.c
index 4e35bf87a..b29109da9 100644
--- a/src/secretsharing/secretsharing_api.c
+++ b/src/secretsharing/secretsharing_api.c
@@ -514,4 +514,5 @@ GNUNET_SECRETSHARING_decrypt_cancel (struct
GNUNET_free (dh);
}
+
/* end of secretsharing_api.c */
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 6e49599a2..8b46f68de 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -1775,8 +1775,7 @@ handle_client_cancel (void *cls, const struct GNUNET_SET_CancelMessage *msg)
* the other peer disconnecting. The client may not know about this
* yet and try to cancel the (just barely non-existent) operation.
* So this is not a hard error.
- */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ */GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Client canceled non-existent op %u\n",
(uint32_t) ntohl (msg->request_id));
}
diff --git a/src/set/gnunet-service-set.h b/src/set/gnunet-service-set.h
index 402281da4..e118828be 100644
--- a/src/set/gnunet-service-set.h
+++ b/src/set/gnunet-service-set.h
@@ -154,7 +154,6 @@ typedef void
(*OpChannelDeathImpl) (struct Operation *op);
-
/**
* Dispatch table for a specific set operation. Every set operation
* has to implement the callback in this struct.
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index ca4ef2092..87c6faf98 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -2168,8 +2168,7 @@ handle_union_p2p_done (void *cls,
* We should notify the active peer once
* all our demands are satisfied, so that the active
* peer can quit if we gave it everything.
- */
- GNUNET_CADET_receive_done (op->channel);
+ */GNUNET_CADET_receive_done (op->channel);
maybe_finish (op);
return;
@@ -2182,8 +2181,7 @@ handle_union_p2p_done (void *cls,
*
* We'll close the channel
* to the other peer once our demands are met.
- */
- op->state->phase = PHASE_FINISH_CLOSING;
+ */op->state->phase = PHASE_FINISH_CLOSING;
GNUNET_CADET_receive_done (op->channel);
maybe_finish (op);
return;
@@ -2195,6 +2193,7 @@ handle_union_p2p_done (void *cls,
}
}
+
/**
* Handle a over message from a remote peer
*
diff --git a/src/set/gnunet-service-set_union.h b/src/set/gnunet-service-set_union.h
index 5da5b7254..2c0262f07 100644
--- a/src/set/gnunet-service-set_union.h
+++ b/src/set/gnunet-service-set_union.h
@@ -151,7 +151,6 @@ handle_union_p2p_inquiry (void *cls,
const struct InquiryMessage *msg);
-
/**
* Handle a request for full set transmission.
*
@@ -163,7 +162,6 @@ handle_union_p2p_request_full (void *cls,
const struct GNUNET_MessageHeader *mh);
-
/**
* Handle a "full done" message.
*
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c
index 81263966a..3014861a6 100644
--- a/src/set/gnunet-set-profiler.c
+++ b/src/set/gnunet-set-profiler.c
@@ -138,7 +138,7 @@ statistics_done (void *cls,
static void
check_all_done (void)
{
- if ((info1.done == GNUNET_NO)||(info2.done == GNUNET_NO))
+ if ((info1.done == GNUNET_NO) || (info2.done == GNUNET_NO))
return;
GNUNET_CONTAINER_multihashmap_iterate (info1.received, map_remove_iterator,
diff --git a/src/set/ibf.c b/src/set/ibf.c
index 7c7adaa3c..1532afceb 100644
--- a/src/set/ibf.c
+++ b/src/set/ibf.c
@@ -45,6 +45,7 @@ ibf_key_from_hashcode (const struct GNUNET_HashCode *hash)
return *(struct IBF_Key *) hash;
}
+
/**
* Create a hashcode from a key, by replicating the key
* until the hascode is filled
diff --git a/src/set/ibf_sim.c b/src/set/ibf_sim.c
index 226a9d751..6415d00e1 100644
--- a/src/set/ibf_sim.c
+++ b/src/set/ibf_sim.c
@@ -93,8 +93,7 @@ main (int argc, char **argv)
get 990/1000 elements on average over 1 million runs; key
idea being to stop short of the 'last' possible IBF as
otherwise a "lowball" per-chance would unduely influence the
- result */
- if ((j > 0) &&
+ result */if ((j > 0) &&
(buckets[j - 1] > MAX_IBF_DECODE))
{
ret *= (1 << (j + 1));
@@ -136,6 +135,7 @@ main (int argc, char **argv)
return 0;
}
+
/* TODO: should calculate stddev of the results to also be able to
say something about the stability of the results, outside of
large-scale averages -- gaining 8% precision at the expense of
diff --git a/src/set/plugin_block_set_test.c b/src/set/plugin_block_set_test.c
index a9da9d549..1de086092 100644
--- a/src/set/plugin_block_set_test.c
+++ b/src/set/plugin_block_set_test.c
@@ -119,4 +119,5 @@ libgnunet_plugin_block_set_test_done (void *cls)
return NULL;
}
+
/* end of plugin_block_set_test.c */
diff --git a/src/set/set_api.c b/src/set/set_api.c
index 961bfdba9..ce4b1c965 100644
--- a/src/set/set_api.c
+++ b/src/set/set_api.c
@@ -1257,4 +1257,5 @@ GNUNET_SET_element_hash (const struct GNUNET_SET_Element *element,
GNUNET_CRYPTO_hash_context_finish (ctx, ret_hash);
}
+
/* end of set_api.c */
diff --git a/src/sq/sq_exec.c b/src/sq/sq_exec.c
index 1dfa535d9..8c47c22b4 100644
--- a/src/sq/sq_exec.c
+++ b/src/sq/sq_exec.c
@@ -44,7 +44,6 @@ GNUNET_SQ_make_execute (const char *sql)
}
-
/**
* Create a `struct GNUNET_SQ_ExecuteStatement` where errors should
* be tolerated.
@@ -110,4 +109,5 @@ GNUNET_SQ_exec_statements (sqlite3 *dbh,
return GNUNET_OK;
}
+
/* end of sq_exec */
diff --git a/src/sq/sq_prepare.c b/src/sq/sq_prepare.c
index 5d232fd17..e1e1834b7 100644
--- a/src/sq/sq_prepare.c
+++ b/src/sq/sq_prepare.c
@@ -46,7 +46,6 @@ GNUNET_SQ_make_prepare (const char *sql,
}
-
/**
* Prepare all statements given in the (NULL,NULL)-terminated
* array at @a ps
@@ -82,4 +81,5 @@ GNUNET_SQ_prepare (sqlite3 *dbh,
return GNUNET_OK;
}
+
/* end of sq_prepare.c */
diff --git a/src/sq/sq_query_helper.c b/src/sq/sq_query_helper.c
index ce317a656..c9e4bf031 100644
--- a/src/sq/sq_query_helper.c
+++ b/src/sq/sq_query_helper.c
@@ -438,6 +438,7 @@ bind_u32 (void *cls,
return GNUNET_OK;
}
+
/**
* Generate query parameter for an uint32_t in host byte order.
*
@@ -505,4 +506,5 @@ GNUNET_SQ_query_param_uint64 (const uint64_t *x)
return qp;
}
+
/* end of sq_query_helper.c */
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c
index 3de481e77..ba6a614c8 100644
--- a/src/statistics/gnunet-service-statistics.c
+++ b/src/statistics/gnunet-service-statistics.c
@@ -1048,12 +1048,15 @@ GNUNET_SERVICE_MAIN (
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_STATISTICS_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_STATISTICS_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index aba80ab36..e004a0f1c 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -192,6 +192,7 @@ new_value_set (const char *subsystem,
return value_set;
}
+
/**
* @brief Print the (collected) values.
*
@@ -258,6 +259,7 @@ printer (void *cls, const struct GNUNET_HashCode *key, void *value)
return GNUNET_YES;
}
+
/**
* Callback function to process statistic values.
*
@@ -318,6 +320,7 @@ printer_watch (void *cls,
return GNUNET_OK;
}
+
/**
* @brief Clean all data structures related to given node.
*
@@ -372,6 +375,7 @@ clean_node (void *cls)
}
}
+
/**
* @brief Print and shutdown
*
@@ -384,6 +388,7 @@ print_finish (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* @brief Called once all statistic values are available.
*
@@ -422,6 +427,7 @@ continuation_print (void *cls, int success)
}
}
+
/**
* Function called last by the statistics code.
*
@@ -450,6 +456,7 @@ cleanup (void *cls, int success)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* @brief Iterate over statistics values and store them in #values.
* They will be printed once all are available.
@@ -500,6 +507,7 @@ collector (void *cls,
return GNUNET_OK;
}
+
/**
* Main task that does the actual work.
*
@@ -582,6 +590,7 @@ main_task (void *cls)
GNUNET_SCHEDULER_add_shutdown (&clean_node, &nodes[index_node].index_node);
}
+
/**
* @brief Iter over content of a node's directory to check for existence of a
* config file.
@@ -617,6 +626,7 @@ iter_check_config (void *cls, const char *filename)
}
}
+
/**
* @brief Iterates over filenames in testbed directory.
*
@@ -649,6 +659,7 @@ iter_testbed_path (void *cls, const char *filename)
return GNUNET_OK;
}
+
/**
* @brief Count the number of nodes running in the testbed
*
@@ -671,6 +682,7 @@ discover_testbed_nodes (const char *path_testbed)
return 0;
}
+
/**
* Main function that will be run by the scheduler.
*
@@ -857,4 +869,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-statistics.c */
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index 1f3dfcfa6..869d51544 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -739,8 +739,7 @@ reconnect_later (struct GNUNET_STATISTICS_Handle *h)
* Chances are that it's down for good and we are not going to connect to
* it anymore.
* Give up and don't sync the rest of the data.
- */
- loss = GNUNET_NO;
+ */loss = GNUNET_NO;
for (gh = h->action_head; NULL != gh; gh = gh->next)
if ((gh->make_persistent) &&
(ACTION_SET == gh->type))
@@ -762,7 +761,6 @@ reconnect_later (struct GNUNET_STATISTICS_Handle *h)
}
-
/**
* Transmit a GET request (and if successful, start to receive
* the response).
diff --git a/src/statistics/test_statistics_api.c b/src/statistics/test_statistics_api.c
index 9ff02d510..fcdeccad6 100644
--- a/src/statistics/test_statistics_api.c
+++ b/src/statistics/test_statistics_api.c
@@ -249,4 +249,5 @@ main (int argc, char *argv_ign[])
return ok;
}
+
/* end of test_statistics_api.c */
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c
index 54de96107..50507bdc4 100644
--- a/src/statistics/test_statistics_api_loop.c
+++ b/src/statistics/test_statistics_api_loop.c
@@ -118,4 +118,5 @@ main (int argc, char *argv_ign[])
return ok;
}
+
/* end of test_statistics_api_loop.c */
diff --git a/src/statistics/test_statistics_api_watch_zero_value.c b/src/statistics/test_statistics_api_watch_zero_value.c
index 67cfb4c46..80ca57c18 100644
--- a/src/statistics/test_statistics_api_watch_zero_value.c
+++ b/src/statistics/test_statistics_api_watch_zero_value.c
@@ -192,4 +192,5 @@ main (int argc, char *argv_ign[])
return 1;
}
+
/* end of test_statistics_api_watch_zero_value.c */
diff --git a/src/template/gnunet-template.c b/src/template/gnunet-template.c
index 20d286d3c..b33cbcc64 100644
--- a/src/template/gnunet-template.c
+++ b/src/template/gnunet-template.c
@@ -82,4 +82,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-template.c */
diff --git a/src/template/test_template_api.c b/src/template/test_template_api.c
index 68fe8b879..196edec2d 100644
--- a/src/template/test_template_api.c
+++ b/src/template/test_template_api.c
@@ -29,6 +29,7 @@ check ()
return 0;
}
+
int
main (int argc, char *argv[])
{
@@ -39,4 +40,5 @@ main (int argc, char *argv[])
return ret;
}
+
/* end of test_template_api.c */
diff --git a/src/testbed-logger/testbed_logger_api.c b/src/testbed-logger/testbed_logger_api.c
index 58f3d36ce..1d6074d13 100644
--- a/src/testbed-logger/testbed_logger_api.c
+++ b/src/testbed-logger/testbed_logger_api.c
@@ -341,4 +341,5 @@ GNUNET_TESTBED_LOGGER_flush_cancel (struct GNUNET_TESTBED_LOGGER_Handle *h)
h->cb_cls = NULL;
}
+
/* End of testbed_logger_api.c */
diff --git a/src/testbed/gnunet-daemon-latency-logger.c b/src/testbed/gnunet-daemon-latency-logger.c
index c35282048..be6efaedf 100644
--- a/src/testbed/gnunet-daemon-latency-logger.c
+++ b/src/testbed/gnunet-daemon-latency-logger.c
@@ -150,6 +150,7 @@ do_shutdown (void *cls)
}
}
+
/**
* Signature of a function that is called with QoS information about an address.
*
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c
index f7d089d93..4c1637db6 100644
--- a/src/testbed/gnunet-helper-testbed.c
+++ b/src/testbed/gnunet-helper-testbed.c
@@ -616,4 +616,5 @@ main (int argc, char **argv)
return (GNUNET_OK == status) ? 0 : 1;
}
+
/* end of gnunet-helper-testbed.c */
diff --git a/src/testbed/gnunet-service-test-barriers.c b/src/testbed/gnunet-service-test-barriers.c
index b28f343a1..c6c42cd1f 100644
--- a/src/testbed/gnunet-service-test-barriers.c
+++ b/src/testbed/gnunet-service-test-barriers.c
@@ -130,7 +130,6 @@ run (void *cls,
}
-
/**
* Main
*/
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index b34550339..21a9d0a51 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -836,8 +836,7 @@ client_disconnect_cb (void *cls,
* from stdin, but if stdin fails for some reason, this shouldn't
* hurt for now --- might need to revise this later if we ever
* decide that master connections might be temporarily down
- * for some reason */
- // GNUNET_SCHEDULER_shutdown ();
+ * for some reason */// GNUNET_SCHEDULER_shutdown ();
}
}
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h
index 032dd54ed..03955327c 100644
--- a/src/testbed/gnunet-service-testbed.h
+++ b/src/testbed/gnunet-service-testbed.h
@@ -757,8 +757,6 @@ handle_manage_peer_service (void *cls,
GNUNET_TESTBED_ManagePeerServiceMessage *msg);
-
-
/**
* Check #GNUNET_MESSAGE_TYPDE_TESTBED_RECONFIGURE_PEER type messages.
*
diff --git a/src/testbed/gnunet-service-testbed_barriers.c b/src/testbed/gnunet-service-testbed_barriers.c
index 7ea1df662..ac89abc88 100644
--- a/src/testbed/gnunet-service-testbed_barriers.c
+++ b/src/testbed/gnunet-service-testbed_barriers.c
@@ -616,7 +616,6 @@ fwd_tout_barrier_init (void *cls)
}
-
/**
* Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
*
@@ -923,4 +922,5 @@ handle_barrier_status (void *cls,
}
}
+
/* end of gnunet-service-testbed_barriers.c */
diff --git a/src/testbed/gnunet-service-testbed_cache.c b/src/testbed/gnunet-service-testbed_cache.c
index 4afa06645..f87f39067 100644
--- a/src/testbed/gnunet-service-testbed_cache.c
+++ b/src/testbed/gnunet-service-testbed_cache.c
@@ -265,4 +265,5 @@ GST_cache_add_hello (const unsigned int peer_id,
entry->hello = GNUNET_copy_message (hello);
}
+
/* end of gnunet-service-testbed_hc.c */
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c
index ae6450176..f38b9aee6 100644
--- a/src/testbed/gnunet-service-testbed_cpustatus.c
+++ b/src/testbed/gnunet-service-testbed_cpustatus.c
@@ -118,6 +118,8 @@ initMachCpuStats ()
(vm_size_t) (cpu_msg_count * sizeof(*cpu_load)));
return GNUNET_OK;
}
+
+
#endif
/**
@@ -464,6 +466,7 @@ updateAgedLoad ()
}
}
+
/**
* Get the load of the CPU relative to what is allowed.
* @return the CPU load as a percentage of allowed
@@ -489,6 +492,7 @@ disk_get_load ()
return (int) agedIOLoad;
}
+
/**
* Get the percentage of memory used
*
@@ -531,6 +535,8 @@ get_nproc ()
closedir (dir);
return nproc;
}
+
+
#endif
@@ -654,4 +660,5 @@ GST_stats_destroy ()
bw = NULL;
}
+
/* end of cpustatus.c */
diff --git a/src/testbed/gnunet-service-testbed_meminfo.c b/src/testbed/gnunet-service-testbed_meminfo.c
index 5afce288b..1a513db6c 100644
--- a/src/testbed/gnunet-service-testbed_meminfo.c
+++ b/src/testbed/gnunet-service-testbed_meminfo.c
@@ -102,13 +102,15 @@ typedef struct mem_table_struct
unsigned long *slot; /* slot in return struct */
} mem_table_struct;
-static int compare_mem_table_structs (const void *a, const void *b)
+static int
+compare_mem_table_structs (const void *a, const void *b)
{
return strcmp (((const mem_table_struct*) a)->name, ((const
mem_table_struct*) b)->
name);
}
+
/* example data, following junk, with comments added:
*
* MemTotal: 61768 kB old
@@ -186,7 +188,8 @@ static unsigned long kb_nfs_unstable;
static unsigned long kb_swap_reclaimable;
static unsigned long kb_swap_unreclaimable;
-void meminfo (void)
+void
+meminfo (void)
{
char namebuf[16]; /* big enough to hold any row name */
mem_table_struct findme = { namebuf, NULL };
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c
index 817a8b2fc..262fcfc00 100644
--- a/src/testbed/gnunet-service-testbed_oc.c
+++ b/src/testbed/gnunet-service-testbed_oc.c
@@ -515,6 +515,7 @@ cleanup_occ_rp2c (struct RemotePeer2Context *rp2c)
}
}
+
/**
* Condition for checking if given peer is ready to be destroyed
*
@@ -645,8 +646,6 @@ GST_notify_client_disconnect_oc (struct GNUNET_SERVICE_Client *client)
}
-
-
/**
* FIXME.
*/
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c
index 836f05464..d3d597d4f 100644
--- a/src/testbed/gnunet-service-testbed_peers.c
+++ b/src/testbed/gnunet-service-testbed_peers.c
@@ -148,7 +148,6 @@ static struct PeerReconfigureContext *prc_head;
static struct PeerReconfigureContext *prc_tail;
-
/**
* DLL head for queue of manage service requests
*/
diff --git a/src/testbed/test_gnunet_helper_testbed.c b/src/testbed/test_gnunet_helper_testbed.c
index caf33c71b..7c4d4bad5 100644
--- a/src/testbed/test_gnunet_helper_testbed.c
+++ b/src/testbed/test_gnunet_helper_testbed.c
@@ -251,4 +251,5 @@ main (int argc, char **argv)
return (GNUNET_OK == result) ? 0 : 1;
}
+
/* end of test_gnunet_helper_testbed.c */
diff --git a/src/testbed/test_testbed_api.c b/src/testbed/test_testbed_api.c
index ad71aa35e..dd270df17 100644
--- a/src/testbed/test_testbed_api.c
+++ b/src/testbed/test_testbed_api.c
@@ -262,7 +262,6 @@ service_connect_comp_cb (void *cls,
}
-
/**
* Callback to be called when the requested peer information is available
*
@@ -460,7 +459,6 @@ status_cb (void *cls,
}
-
/**
* Main run function.
*
@@ -513,4 +511,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api.c */
diff --git a/src/testbed/test_testbed_api_2peers_1controller.c b/src/testbed/test_testbed_api_2peers_1controller.c
index de56ec88a..c854d1ccc 100644
--- a/src/testbed/test_testbed_api_2peers_1controller.c
+++ b/src/testbed/test_testbed_api_2peers_1controller.c
@@ -487,7 +487,6 @@ status_cb (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg_, int
}
-
/**
* Main run function.
*
@@ -537,4 +536,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_2peers_1controller.c */
diff --git a/src/testbed/test_testbed_api_3peers_3controllers.c b/src/testbed/test_testbed_api_3peers_3controllers.c
index 1de635fd9..bf9011941 100644
--- a/src/testbed/test_testbed_api_3peers_3controllers.c
+++ b/src/testbed/test_testbed_api_3peers_3controllers.c
@@ -960,4 +960,5 @@ main (int argc, char **argv)
}
}
+
/* end of test_testbed_api_3peers_3controllers.c */
diff --git a/src/testbed/test_testbed_api_controllerlink.c b/src/testbed/test_testbed_api_controllerlink.c
index 55ec184ea..16a3f7b91 100644
--- a/src/testbed/test_testbed_api_controllerlink.c
+++ b/src/testbed/test_testbed_api_controllerlink.c
@@ -725,6 +725,7 @@ registration_cont (void *cls, const char *emsg)
}
}
+
/**
* Callback to signal successfull startup of the controller process
*
@@ -876,4 +877,5 @@ main (int argc, char **argv)
}
}
+
/* end of test_testbed_api_controllerlink.c */
diff --git a/src/testbed/test_testbed_api_hosts.c b/src/testbed/test_testbed_api_hosts.c
index 9c2a96fb7..9e49debf7 100644
--- a/src/testbed/test_testbed_api_hosts.c
+++ b/src/testbed/test_testbed_api_hosts.c
@@ -179,4 +179,5 @@ main (int argc, char **argv)
return (GNUNET_OK == status) ? 0 : 1;
}
+
/* end of test_testbed_api_hosts.c */
diff --git a/src/testbed/test_testbed_api_operations.c b/src/testbed/test_testbed_api_operations.c
index 832a42576..aed213d49 100644
--- a/src/testbed/test_testbed_api_operations.c
+++ b/src/testbed/test_testbed_api_operations.c
@@ -564,4 +564,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_operations.c */
diff --git a/src/testbed/test_testbed_api_sd.c b/src/testbed/test_testbed_api_sd.c
index f7c60ea4d..816f8e9a6 100644
--- a/src/testbed/test_testbed_api_sd.c
+++ b/src/testbed/test_testbed_api_sd.c
@@ -107,4 +107,5 @@ main (int argc, char **argv)
return ret;
}
+
/* end of test_testbed_api_sd.c */
diff --git a/src/testbed/test_testbed_api_test.c b/src/testbed/test_testbed_api_test.c
index f0d8d1d25..d3fec78d9 100644
--- a/src/testbed/test_testbed_api_test.c
+++ b/src/testbed/test_testbed_api_test.c
@@ -82,6 +82,7 @@ do_shutdown (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* shortcut to exit during failure
*/
@@ -246,4 +247,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_test.c */
diff --git a/src/testbed/test_testbed_api_test_timeout.c b/src/testbed/test_testbed_api_test_timeout.c
index 65cda0b33..d2f73df14 100644
--- a/src/testbed/test_testbed_api_test_timeout.c
+++ b/src/testbed/test_testbed_api_test_timeout.c
@@ -122,4 +122,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_test.c */
diff --git a/src/testbed/test_testbed_api_testbed_run.c b/src/testbed/test_testbed_api_testbed_run.c
index 66f857222..fda5c3223 100644
--- a/src/testbed/test_testbed_api_testbed_run.c
+++ b/src/testbed/test_testbed_api_testbed_run.c
@@ -238,4 +238,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_testbed_run.c */
diff --git a/src/testbed/test_testbed_api_topology.c b/src/testbed/test_testbed_api_topology.c
index 1fa13bf4f..dada7286f 100644
--- a/src/testbed/test_testbed_api_topology.c
+++ b/src/testbed/test_testbed_api_topology.c
@@ -76,6 +76,7 @@ do_shutdown (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Controller event callback
*
@@ -184,4 +185,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_topology.c */
diff --git a/src/testbed/test_testbed_api_topology_clique.c b/src/testbed/test_testbed_api_topology_clique.c
index 33569a2b9..33c21a69c 100644
--- a/src/testbed/test_testbed_api_topology_clique.c
+++ b/src/testbed/test_testbed_api_topology_clique.c
@@ -76,6 +76,7 @@ do_shutdown (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/**
* Controller event callback
*
@@ -180,4 +181,5 @@ main (int argc, char **argv)
return 0;
}
+
/* end of test_testbed_api_topology.c */
diff --git a/src/testbed/test_testbed_underlay.c b/src/testbed/test_testbed_underlay.c
index e0434379b..8b706ff83 100644
--- a/src/testbed/test_testbed_underlay.c
+++ b/src/testbed/test_testbed_underlay.c
@@ -86,7 +86,6 @@ overlay_connect_status (void *cls,
}
-
/**
* Signature of a main function for a testcase.
*
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index 38913509b..9fe5bccdc 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -1320,8 +1320,7 @@ cleanup:
* required at the chained testbed controller setup to ensure the only the
* test-driver echos the status and the controller hierarchy properly
* propagates the status.
- */
- if ((NULL != barrier) && (GNUNET_YES == barrier->echo))
+ */if ((NULL != barrier) && (GNUNET_YES == barrier->echo))
GNUNET_TESTBED_barrier_remove_ (barrier);
}
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h
index 023d772a0..17cd38df3 100644
--- a/src/testbed/testbed_api.h
+++ b/src/testbed/testbed_api.h
@@ -105,7 +105,6 @@ enum OperationType
};
-
/**
* Enumeration of states of OperationContext
*/
@@ -309,7 +308,6 @@ struct GNUNET_TESTBED_Barrier
};
-
/**
* Queues a message in send queue for sending to the service
*
@@ -484,7 +482,6 @@ GNUNET_TESTBED_get_slave_config_ (void *op_cls,
uint32_t slave_host_id);
-
/**
* Initialise a barrier and call the given callback when the required percentage
* of peers (quorum) reach the barrier OR upon error.
@@ -520,6 +517,5 @@ void
GNUNET_TESTBED_barrier_remove_ (struct GNUNET_TESTBED_Barrier *barrier);
-
#endif
/* end of testbed_api.h */
diff --git a/src/testbed/testbed_api_barriers.c b/src/testbed/testbed_api_barriers.c
index 988fa7a1e..61578c1e6 100644
--- a/src/testbed/testbed_api_barriers.c
+++ b/src/testbed/testbed_api_barriers.c
@@ -72,7 +72,6 @@ struct GNUNET_TESTBED_BarrierWaitHandle
};
-
/**
* Check if barrier status message is well-formed.
*
@@ -261,4 +260,5 @@ GNUNET_TESTBED_barrier_wait_cancel (struct GNUNET_TESTBED_BarrierWaitHandle *h)
GNUNET_free (h);
}
+
/* end of testbed_api_barriers.c */
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index fdff952a0..95463e44d 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -1570,4 +1570,5 @@ GNUNET_TESTBED_host_resolve_ (struct GNUNET_TESTBED_Host *host)
host->hostname = GNUNET_strdup (host->hostname);
}
+
/* end of testbed_api_hosts.c */
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c
index 185f62aa8..a406c0e0b 100644
--- a/src/testbed/testbed_api_operations.c
+++ b/src/testbed/testbed_api_operations.c
@@ -746,7 +746,6 @@ merge_ops (struct GNUNET_TESTBED_Operation ***old,
}
-
/**
* Checks for the readiness of an operation and schedules a operation start task
*
@@ -1383,4 +1382,6 @@ GNUNET_TESTBED_operations_fini ()
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Be disciplined. Some operations were not marked as done.\n");
}
+
+
/* end of testbed_api_operations.c */
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c
index 8d74d956f..7bd895871 100644
--- a/src/testbed/testbed_api_peers.c
+++ b/src/testbed/testbed_api_peers.c
@@ -85,7 +85,6 @@ GNUNET_TESTBED_cleanup_peers_ (void)
}
-
/**
* Function to call to start a peer_create type operation once all
* queues the operation is part of declare that the
@@ -1014,5 +1013,4 @@ GNUNET_TESTBED_peer_manage_service (void *op_cls,
}
-
/* end of testbed_api_peers.c */
diff --git a/src/testbed/testbed_api_sd.c b/src/testbed/testbed_api_sd.c
index 9a40464d7..59c7a3ebd 100644
--- a/src/testbed/testbed_api_sd.c
+++ b/src/testbed/testbed_api_sd.c
@@ -209,4 +209,5 @@ GNUNET_TESTBED_SD_deviation_factor_ (struct SDHandle *h, unsigned int amount,
return GNUNET_OK;
}
+
/* end of testbed_api_sd.c */
diff --git a/src/testbed/testbed_api_services.c b/src/testbed/testbed_api_services.c
index 692fe505f..2c9a90fd4 100644
--- a/src/testbed/testbed_api_services.c
+++ b/src/testbed/testbed_api_services.c
@@ -287,4 +287,5 @@ GNUNET_TESTBED_service_connect (void *op_cls, struct GNUNET_TESTBED_Peer *peer,
return data->operation;
}
+
/* end of testbed_api_services.c */
diff --git a/src/testbed/testbed_api_test.c b/src/testbed/testbed_api_test.c
index 5b57826ba..6179a23ef 100644
--- a/src/testbed/testbed_api_test.c
+++ b/src/testbed/testbed_api_test.c
@@ -159,4 +159,5 @@ GNUNET_TESTBED_test_run (const char *testname,
return ret;
}
+
/* end of testbed_api_test.c */
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c
index 3c56dd024..7be8054ca 100644
--- a/src/testbed/testbed_api_testbed.c
+++ b/src/testbed/testbed_api_testbed.c
@@ -446,6 +446,7 @@ remove_rcop (struct GNUNET_TESTBED_RunHandle *rc, struct
rcop));
}
+
/**
* Assuming all peers have been destroyed cleanup run handle
*
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c
index 191dbab66..9ffe7f47d 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -407,7 +407,6 @@ overlay_link_completed (void *cls,
}
-
/**
* Function called when a overlay connect operation is ready
*
@@ -1658,4 +1657,5 @@ GNUNET_TESTBED_underlay_construct_ (int num_peers,
return ret;
}
+
/* end of testbed_api_topology.c */
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index a13a32f77..b850d6b13 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -440,4 +440,5 @@ main (int argc, char *const *argv)
return ret;
}
+
/* end of gnunet-testing.c */
diff --git a/src/testing/test_testing_peerstartup.c b/src/testing/test_testing_peerstartup.c
index cfc79e618..4e21fedc9 100644
--- a/src/testing/test_testing_peerstartup.c
+++ b/src/testing/test_testing_peerstartup.c
@@ -122,7 +122,8 @@ end:
}
-int main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
@@ -138,4 +139,5 @@ int main (int argc, char *argv[])
return (GNUNET_OK == status) ? 0 : 1;
}
+
/* end of test_testing_peerstartup.c */
diff --git a/src/testing/test_testing_peerstartup2.c b/src/testing/test_testing_peerstartup2.c
index 316a55951..26948b7c5 100644
--- a/src/testing/test_testing_peerstartup2.c
+++ b/src/testing/test_testing_peerstartup2.c
@@ -201,7 +201,8 @@ end:
}
-int main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
@@ -217,4 +218,5 @@ int main (int argc, char *argv[])
return (GNUNET_OK == status) ? 0 : 1;
}
+
/* end of test_testing_peerstartup.c */
diff --git a/src/testing/test_testing_portreservation.c b/src/testing/test_testing_portreservation.c
index d810ad8cf..df3d8d523 100644
--- a/src/testing/test_testing_portreservation.c
+++ b/src/testing/test_testing_portreservation.c
@@ -80,7 +80,8 @@ end:
}
-int main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
@@ -100,4 +101,5 @@ int main (int argc, char *argv[])
return (GNUNET_OK == status) ? 0 : 1;
}
+
/* end of test_testing_portreservation.c */
diff --git a/src/testing/test_testing_servicestartup.c b/src/testing/test_testing_servicestartup.c
index d25c16167..83458898b 100644
--- a/src/testing/test_testing_servicestartup.c
+++ b/src/testing/test_testing_servicestartup.c
@@ -59,7 +59,8 @@ test_run (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg,
/**
* The main point of execution
*/
-int main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
test_success = GNUNET_NO;
GNUNET_assert (0 == GNUNET_TESTING_service_run ("test-testing-servicestartup",
@@ -70,4 +71,5 @@ int main (int argc, char *argv[])
return (GNUNET_YES == test_success) ? 0 : 1;
}
+
/* end of test_testing_servicestartup.c */
diff --git a/src/testing/test_testing_sharedservices.c b/src/testing/test_testing_sharedservices.c
index 13219bf5d..77def3453 100644
--- a/src/testing/test_testing_sharedservices.c
+++ b/src/testing/test_testing_sharedservices.c
@@ -143,7 +143,8 @@ end:
}
-int main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
@@ -162,4 +163,5 @@ int main (int argc, char *argv[])
return (GNUNET_OK == status) ? 0 : 3;
}
+
/* end of test_testing_sharedservices.c */
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 362a24af5..3e447e1ff 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -595,8 +595,7 @@ GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system)
address families are considered open.
On system with either IPv4 or IPv6. A port is considered open if it's
open in the respective address family
- */
- hint.ai_family = AF_UNSPEC; /* IPv4 and IPv6 */
+ */hint.ai_family = AF_UNSPEC; /* IPv4 and IPv6 */
hint.ai_socktype = 0;
hint.ai_protocol = 0;
hint.ai_addrlen = 0;
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 9e662ca0b..1b6004392 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -388,8 +388,7 @@ setup_filter (struct Peer *peer)
* of the data structure and would only really become
* "useless" once a HELLO has been passed on to ~100
* other peers, which is likely more than enough in
- * any case; hence 64, 5 as bloomfilter parameters. */
- peer->filter = GNUNET_CONTAINER_bloomfilter_init (NULL, 64, 5);
+ * any case; hence 64, 5 as bloomfilter parameters. */peer->filter = GNUNET_CONTAINER_bloomfilter_init (NULL, 64, 5);
peer->filter_expiration =
GNUNET_TIME_relative_to_absolute (HELLO_ADVERTISEMENT_MIN_REPEAT_FREQUENCY);
/* never send a peer its own HELLO */
@@ -1142,12 +1141,15 @@ main (int argc, char *const *argv)
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_ARM_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
/* end of gnunet-daemon-topology.c */
diff --git a/src/topology/test_gnunet_daemon_topology.c b/src/topology/test_gnunet_daemon_topology.c
index f6d0e2c2b..a7dace383 100644
--- a/src/topology/test_gnunet_daemon_topology.c
+++ b/src/topology/test_gnunet_daemon_topology.c
@@ -98,6 +98,7 @@ shutdown_task (void *cls)
GNUNET_SCHEDULER_cancel (timeout_tid);
}
+
static void
timeout_task (void *cls)
{
@@ -109,6 +110,7 @@ timeout_task (void *cls)
GNUNET_SCHEDULER_shutdown ();
}
+
/*
* The function is called every time the topology of connected
* peers to a peer changes.
@@ -131,7 +133,7 @@ statistics_iterator (void *cls,
if (p_ctx->connections < value)
p_ctx->connections = value;
- if ((THRESHOLD <= value)&&(GNUNET_NO == p_ctx->reported))
+ if ((THRESHOLD <= value) && (GNUNET_NO == p_ctx->reported))
{
p_ctx->reported = GNUNET_YES;
checked_peers++;
@@ -153,6 +155,7 @@ statistics_iterator (void *cls,
return GNUNET_YES;
}
+
static void *
ca_statistics (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
@@ -203,6 +206,7 @@ service_connect_complete (void *cls,
"call to GNUNET_STATISTICS_watch() failed\n");
}
+
static void
notify_connect_complete (void *cls,
struct GNUNET_TESTBED_Operation *op,
@@ -219,6 +223,7 @@ notify_connect_complete (void *cls,
connect_left--;
}
+
static void
do_connect (void *cls,
struct GNUNET_TESTBED_RunHandle *h,
@@ -286,4 +291,5 @@ main (int argc, char *argv[])
return (GNUNET_OK != result) ? 1 : 0;
}
+
/* end of test_gnunet_daemon_topology.c */
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index f3ccbd262..098bb9523 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -1052,8 +1052,7 @@ queue_read (void *cls)
wrong key for everything after the rekey; in that case, we have
to re-do the decryption at 'total' instead of at 'max'. If there
is no rekey and the last message is incomplete (max > total),
- it is safe to keep the decryption so we shift by 'max' */
- if (GNUNET_YES == queue->rekeyed)
+ it is safe to keep the decryption so we shift by 'max' */if (GNUNET_YES == queue->rekeyed)
{
max = total;
queue->rekeyed = GNUNET_NO;
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 2d9fabfec..80fc4142b 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -2526,8 +2526,7 @@ iface_proc (void *cls,
* group in the normal IPv6 routing table and using the resulting
* interface; we do this for each interface, so no need to use
* zero (anymore...).
- */
- bi->mcreq.ipv6mr_interface = s6->sin6_scope_id;
+ */bi->mcreq.ipv6mr_interface = s6->sin6_scope_id;
/* Join the multicast group */
if (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (udp_sock,
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c
index d8205addb..2cfb802e3 100644
--- a/src/transport/gnunet-communicator-unix.c
+++ b/src/transport/gnunet-communicator-unix.c
@@ -1111,12 +1111,15 @@ main (int argc, char *const *argv)
/**
* MINIMIZE heap size (way below 128k) since this process doesn't need much.
*/
-void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
+void __attribute__ ((constructor))
+GNUNET_ARM_memory_init ()
{
mallopt (M_TRIM_THRESHOLD, 4 * 1024);
mallopt (M_TOP_PAD, 1 * 1024);
malloc_trim (0);
}
+
+
#endif
/* end of gnunet-communicator-unix.c */
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c
index c0e0d9673..9b56d0922 100644
--- a/src/transport/gnunet-helper-transport-bluetooth.c
+++ b/src/transport/gnunet-helper-transport-bluetooth.c
@@ -446,6 +446,7 @@ do_align:
return ret;
}
+
/**
* Destroys a tokenizer.
*
@@ -458,6 +459,7 @@ mst_destroy (struct MessageStreamTokenizer *mst)
free (mst);
}
+
/**
* Calculate crc32, the start of the calculation
*
@@ -558,14 +560,13 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
crc = calc_crc_osdep (buf, len);
buf += len;
- if ((((crc) & 0xFF) == buf[0])&&(((crc >> 8) & 0xFF) == buf[1])&&
- ( ((crc >> 16) & 0xFF) == buf[2]) &&( ((crc >> 24) & 0xFF) == buf[3]) )
+ if ((((crc) & 0xFF) == buf[0]) && (((crc >> 8) & 0xFF) == buf[1]) &&
+ ( ((crc >> 16) & 0xFF) == buf[2]) && ( ((crc >> 24) & 0xFF) == buf[3]) )
return 0;
return 1;
}
-
/* ************** end of clone ***************** */
#ifdef LINUX
/**
@@ -593,6 +594,8 @@ bind_socket (int socket, struct sockaddr_rc *addr)
return -1;
}
+
+
#endif
/**
@@ -613,8 +616,7 @@ register_service (struct HardwareInfos *dev, int rc_channel)
* 5. set the name, provider and description
* 6. register the service record to the local SDP server
* 7. cleanup
- */
- uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ */uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
dev->pl_mac.mac[5], dev->pl_mac.mac[4],
dev->pl_mac.mac[3],
dev->pl_mac.mac[2], dev->pl_mac.mac[1],
@@ -688,6 +690,7 @@ register_service (struct HardwareInfos *dev, int rc_channel)
return 0;
}
+
/**
* Function used for searching and browsing for a service. This will return the
* port number on which the service is running.
@@ -706,8 +709,7 @@ get_channel (struct HardwareInfos *dev, bdaddr_t dest)
* 2.2. get a list of service records with the specific UUID
* 2.3. for each service record get a list of the protocol sequences and get
* the port number
- */
- uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ */uint8_t svc_uuid_int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
dest.b[5], dest.b[4], dest.b[3],
dest.b[2], dest.b[1], dest.b[0] };
sdp_session_t *session = 0;
@@ -763,6 +765,7 @@ get_channel (struct HardwareInfos *dev, bdaddr_t dest)
return channel;
}
+
/**
* Read from the socket and put the result into the buffer for transmission to 'stdout'.
*
@@ -954,7 +957,6 @@ open_device (struct HardwareInfos *dev)
(void) close (fd_hci);
-
/* Bind the rfcomm socket to the interface */
memset (&rc_addr, 0, sizeof(rc_addr));
rc_addr.rc_family = AF_BLUETOOTH;
@@ -1010,6 +1012,7 @@ mac_set (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader,
taIeeeHeader->addr2 = dev->pl_mac;
}
+
#ifdef LINUX
/**
* Test if the given interface name really corresponds to a bluetooth
@@ -1038,6 +1041,8 @@ test_bluetooth_interface (const char *iface)
}
return 0;
}
+
+
#endif
/**
@@ -1112,6 +1117,7 @@ stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr)
write_pout.size = sendsize;
}
+
#ifdef LINUX
/**
* Broadcast a HELLO message for peer discovery
@@ -1127,7 +1133,7 @@ send_broadcast (struct HardwareInfos *dev, int *sendsocket)
int loops = 0;
search_for_devices:
- if (((neighbours.size == neighbours.pos)&&(new_device == 1)) ||
+ if (((neighbours.size == neighbours.pos) && (new_device == 1)) ||
(neighbours.size == 0) )
{
inquiry_devices: // skip the conditions and force a inquiry for new devices
@@ -1359,6 +1365,8 @@ inquiry_devices: // skip the conditions and force a inquiry for new devices
return 0;
}
+
+
#endif
/**
@@ -1606,9 +1614,9 @@ main (int argc, char *argv[])
connect_retry:
status = connect (sendsocket, (struct sockaddr *) &addr,
sizeof(addr));
- if ((0 != status) &&(errno != EAGAIN) )
+ if ((0 != status) && (errno != EAGAIN) )
{
- if ((errno == ECONNREFUSED) &&(tries < 2) )
+ if ((errno == ECONNREFUSED) && (tries < 2) )
{
fprintf (stderr, "LOG : %.*s failed to connect. Trying again!\n",
IFNAMSIZ, dev.iface);
@@ -1668,7 +1676,7 @@ connect_retry:
int retval = select (maxfd + 1, &rfds, &wfds, NULL, NULL);
if ((-1 == retval) && (EINTR == errno))
continue;
- if ((0 > retval) &&(errno != EBADF) ) // we handle BADF errors later
+ if ((0 > retval) && (errno != EBADF) ) // we handle BADF errors later
{
fprintf (stderr, "select failed: %s\n", strerror (errno));
break;
diff --git a/src/transport/gnunet-helper-transport-wlan.c b/src/transport/gnunet-helper-transport-wlan.c
index 7ad6c5175..68adadbe8 100644
--- a/src/transport/gnunet-helper-transport-wlan.c
+++ b/src/transport/gnunet-helper-transport-wlan.c
@@ -176,7 +176,6 @@
#define MAXLINE 4096
-
/* ********* structure of messages of type ARPHRD_IEEE80211_PRISM *********** */
/**
@@ -465,7 +464,6 @@ enum RadiotapType
#define IEEE80211_RADIOTAP_PRESENT_EXTEND_MASK (1 << IEEE80211_RADIOTAP_EXT)
-
/**
* Bit in IEEE80211_RADIOTAP_FLAGS (which we might get
* as part of a 'struct Ieee80211RadiotapHeader' extension
@@ -651,7 +649,6 @@ struct RadiotapTransmissionHeader
IEEE80211_RADIOTAP_TX_FLAGS))
-
/**
* struct Ieee80211RadiotapHeaderIterator - tracks walk through present radiotap arguments
* in the radiotap header. Used when we parse radiotap packets received from the kernel.
@@ -770,7 +767,6 @@ static struct SendBuffer write_pout;
static struct SendBuffer write_std;
-
/* *********** specialized version of server_mst.c begins here ********** */
/**
@@ -1031,6 +1027,7 @@ mst_destroy (struct MessageStreamTokenizer *mst)
free (mst);
}
+
/* ***************** end of server_mst.c clone ***************** **/
@@ -1091,8 +1088,7 @@ ieee80211_radiotap_iterator_init (struct
* check for insanity where the present bitmaps
* keep claiming to extend up to or even beyond the
* stated radiotap header length
- */
- if (iterator->arg - ((uint8_t*) iterator->rtheader) >
+ */if (iterator->arg - ((uint8_t*) iterator->rtheader) >
iterator->max_length)
return -1;
}
@@ -1101,8 +1097,7 @@ ieee80211_radiotap_iterator_init (struct
* no need to check again for blowing past stated radiotap
* header length, becuase ieee80211_radiotap_iterator_next
* checks it before it is dereferenced
- */
- }
+ */}
/* we are all initialized happily */
return 0;
}
@@ -1137,9 +1132,7 @@ ieee80211_radiotap_iterator_next (struct
*
* upper nybble: content alignment for arg
* lower nybble: content length for arg
- */
-
- static const uint8_t rt_sizes[] = {
+ */static const uint8_t rt_sizes[] = {
[IEEE80211_RADIOTAP_TSFT] = 0x88,
[IEEE80211_RADIOTAP_FLAGS] = 0x11,
[IEEE80211_RADIOTAP_RATE] = 0x11,
@@ -1198,8 +1191,7 @@ ieee80211_radiotap_iterator_next (struct
* radiotap header. There is no guarantee that the radiotap
* header itself is aligned on any kind of boundary, thus we
* need to really look at the delta here.
- */
- wanted_alignment = rt_sizes[iterator->arg_index] >> 4;
+ */wanted_alignment = rt_sizes[iterator->arg_index] >> 4;
unalignment = (((void *) iterator->arg) - ((void *) iterator->rtheader))
& (wanted_alignment - 1);
if (0 != unalignment)
@@ -1224,8 +1216,7 @@ ieee80211_radiotap_iterator_next (struct
* claims to have more arg content than the length of the
* radiotap section. We will normally end up equalling this
* max_length on the last arg, never exceeding it.
- */
- if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
+ */if ((((void *) iterator->arg) - ((void *) iterator->rtheader)) >
iterator->max_length)
return -1;
}
@@ -1365,8 +1356,8 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
crc = calc_crc_osdep (buf, len);
buf += len;
- if ((((crc) & 0xFF) == buf[0])&&(((crc >> 8) & 0xFF) == buf[1])&&
- ( ((crc >> 16) & 0xFF) == buf[2]) &&( ((crc >> 24) & 0xFF) == buf[3]) )
+ if ((((crc) & 0xFF) == buf[0]) && (((crc >> 8) & 0xFF) == buf[1]) &&
+ ( ((crc >> 16) & 0xFF) == buf[2]) && ( ((crc >> 24) & 0xFF) == buf[3]) )
return 0;
return 1;
}
@@ -1386,11 +1377,11 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
static int
get_channel_from_frequency (int32_t frequency)
{
- if ((frequency >= 2412)&&(frequency <= 2472))
+ if ((frequency >= 2412) && (frequency <= 2472))
return (frequency - 2407) / 5;
if (frequency == 2484)
return 14;
- if ((frequency >= 5000)&&(frequency <= 6100))
+ if ((frequency >= 5000) && (frequency <= 6100))
return (frequency - 5000) / 5;
return -1;
}
@@ -2191,4 +2182,5 @@ main (int argc, char *argv[])
return 1; /* we never exit 'normally' */
}
+
/* end of gnunet-helper-transport-wlan.c */
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 66a836b84..8d68d90a6 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -4734,8 +4734,7 @@ consider_sending_fc (void *cls)
then. See vl->last_fc_rtt! NOTE: to do this properly, we also
need an estimate for the bandwidth-delay-product for the entire
VL, as that determines "significantly". We have the delay, but
- the bandwidth statistics need to be added for the VL!*/
- (void) duration;
+ the bandwidth statistics need to be added for the VL!*/(void) duration;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending FC seq %u to %s with new window %llu\n",
@@ -5218,8 +5217,7 @@ handle_raw_message (void *cls, const struct GNUNET_MessageHeader *mh)
we pass this on, CORE would be confused (link down, messages
arrive). We should investigate more if this happens often,
or in a persistent manner, and possibly do "something" about
- it. Thus logging as error for now. */
- GNUNET_break_op (0);
+ it. Thus logging as error for now. */GNUNET_break_op (0);
GNUNET_STATISTICS_update (GST_stats,
"# CORE messages droped (virtual link still down)",
1,
@@ -8643,8 +8641,7 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc,
given message fits _this_ queue, and do not consider how well other
queues might suit the message. Taking other queues into consideration
may further improve the result, but could also be expensive
- in terms of CPU time. */
- long long sc_score = sc->frag * 40 + sc->relb * 20 + sc->real_overhead;
+ in terms of CPU time. */long long sc_score = sc->frag * 40 + sc->relb * 20 + sc->real_overhead;
long long pm_score = frag * 40 + relb * 20 + real_overhead;
long long time_delta =
(sc->best->next_attempt.abs_value_us - pos->next_attempt.abs_value_us)
@@ -8848,8 +8845,7 @@ transmit_on_queue (void *cls)
via DV (and thus the ultimate target of the pending message is for
a different virtual link than the one of the queue), then we need
to use up not only the window of the direct link but also the
- flow control window for the DV link! */
- pm->vl->outbound_fc_window_size_used += pm->bytes_msg;
+ flow control window for the DV link! */pm->vl->outbound_fc_window_size_used += pm->bytes_msg;
if (pm->vl != queue->neighbour->vl)
{
@@ -8888,8 +8884,7 @@ transmit_on_queue (void *cls)
OPTIMIZE: Note that in the future this heuristic should likely
be improved further (measure RTT stability, consider message
- urgency and size when delaying ACKs, etc.) */
- update_pm_next_attempt (pm,
+ urgency and size when delaying ACKs, etc.) */update_pm_next_attempt (pm,
GNUNET_TIME_relative_to_absolute (
GNUNET_TIME_relative_multiply (queue->pd.aged_rtt,
4)));
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 853a61127..7638839cc 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -2390,9 +2390,7 @@ test_blacklisted (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
* If (NULL != transport_name) we look for a transport specific entry:
* if (transport_name == be) forbidden
*
- */
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ */GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Comparing BL request for peer `%4s':`%s' with BL entry: `%s'\n",
GNUNET_i2s (key),
(NULL == transport_name) ? "unspecified" : transport_name,
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h
index 3c2ca5a08..acb1de395 100644
--- a/src/transport/gnunet-service-transport.h
+++ b/src/transport/gnunet-service-transport.h
@@ -133,7 +133,6 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
struct GST_BlacklistCheck;
-
/**
* Test if a peer/transport combination is blacklisted.
*
@@ -231,7 +230,5 @@ void
GST_clients_broadcast_disconnect (const struct GNUNET_PeerIdentity *peer);
-
-
#endif
/* end of file gnunet-service-transport_plugins.h */
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c
index 9c262dbdf..130311e15 100644
--- a/src/transport/gnunet-service-transport_ats.c
+++ b/src/transport/gnunet-service-transport_ats.c
@@ -333,7 +333,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
return; /* our own, ignore! */
ai = find_ai (address,
session);
- if ((NULL == ai)||(NULL == ai->ar))
+ if ((NULL == ai) || (NULL == ai->ar))
{
/* The address is already gone/blocked, this can happen during a blacklist
* callback. */
@@ -366,8 +366,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
above played out: it was either freed in
#GNUNET_ATS_address_del_session() because it was
incoming, or explicitly in
- #GNUNET_ATS_address_del_session(). */
- ai->ar = NULL;
+ #GNUNET_ATS_address_del_session(). */ai->ar = NULL;
/* determine when the address should come back to life */
ai->blocked = GNUNET_TIME_relative_to_absolute (ai->back_off);
@@ -559,8 +558,7 @@ GST_ats_new_session (const struct GNUNET_HELLO_Address *address,
other part of the code could not tell if it just created a new
session or just got one recycled from the plugin; hence, we may
be called with "new" session even for an "old" session; in that
- case, check that this is the case, but just ignore it. */
- GNUNET_assert (NULL != (find_ai (address, session)));
+ case, check that this is the case, but just ignore it. */GNUNET_assert (NULL != (find_ai (address, session)));
return;
}
GNUNET_assert (NULL == ai->session);
@@ -679,8 +677,7 @@ GST_ats_del_session (const struct GNUNET_HELLO_Address *address,
above played out: it was either freed in
#GNUNET_ATS_address_del_session() because it was
incoming, or explicitly in
- #GNUNET_ATS_address_del_session(). */
- ai->ar = NULL;
+ #GNUNET_ATS_address_del_session(). */ai->ar = NULL;
}
destroy_ai (ai);
return;
@@ -919,4 +916,5 @@ GST_ats_done ()
p2a = NULL;
}
+
/* end of gnunet-service-transport_ats.c */
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index 47ae5b981..04d1774c0 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -582,4 +582,5 @@ GST_manipulation_stop ()
}
}
+
/* end of file gnunet-service-transport_manipulation.c */
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 3de10d108..9c6cebc24 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -3568,9 +3568,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
We expect a ACK:
- If a remote peer has sent a SYN, we responded with a SYN_ACK and
now wait for the ACK to finally be connected
- - If we sent a SYN_ACK to this peer before */
-
- if (((GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) &&
+ - If we sent a SYN_ACK to this peer before */if (((GNUNET_TRANSPORT_PS_SYN_RECV_ACK != n->state) &&
(ACK_SEND_ACK != n->ack_state)) ||
(NULL == n->primary_address.address))
{
@@ -3606,8 +3604,7 @@ GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
* an ACK.
* That suggests that the primary_address used to be non-NULL, but maybe it
* got reset to NULL without the state being changed appropriately?
- */
- GNUNET_break (0);
+ */GNUNET_break (0);
return GNUNET_OK;
}
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index ec8600b7f..631b0a8f8 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -81,8 +81,6 @@ enum GNUNET_TRANSPORT_ValidationState
};
-
-
/**
* How long is a PONG signature valid? We'll recycle a signature until
* 1/4 of this time is remaining. PONGs should expire so that if our
@@ -993,9 +991,7 @@ GST_validation_start (unsigned int max_fds)
* - "fast start": run validation immediately
* - have delay of (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2)
* (300 sec / ~150 == ~2 sec.) between two validations
- */
-
- validation_next = GNUNET_TIME_absolute_get ();
+ */validation_next = GNUNET_TIME_absolute_get ();
validation_delay.rel_value_us =
(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us) / (max_fds / 2);
validations_fast_start_threshold = (max_fds / 2);
diff --git a/src/transport/gnunet-transport-profiler.c b/src/transport/gnunet-transport-profiler.c
index b09361d14..6c13cf059 100644
--- a/src/transport/gnunet-transport-profiler.c
+++ b/src/transport/gnunet-transport-profiler.c
@@ -621,4 +621,5 @@ main (int argc, char *const *argv)
return 1;
}
+
/* end of gnunet-transport-profiler.c */
diff --git a/src/transport/gnunet-transport-wlan-sender.c b/src/transport/gnunet-transport-wlan-sender.c
index 191ea8619..5256ec7be 100644
--- a/src/transport/gnunet-transport-wlan-sender.c
+++ b/src/transport/gnunet-transport-wlan-sender.c
@@ -65,6 +65,7 @@ getRadiotapHeader (struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *header,
return GNUNET_YES;
}
+
/**
* function to generate the wlan hardware header for one packet
* @param Header address to write the header to
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index f0d9d30c3..5a437b660 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -1433,4 +1433,5 @@ main (int argc, char *const *argv)
return 1;
}
+
/* end of gnunet-transport.c */
diff --git a/src/transport/ieee80211_radiotap.h b/src/transport/ieee80211_radiotap.h
index 9bdfa02f5..1a79cf214 100644
--- a/src/transport/ieee80211_radiotap.h
+++ b/src/transport/ieee80211_radiotap.h
@@ -272,4 +272,5 @@ ieee80211_get_radiotap_len (unsigned char *data)
return get_unaligned_le16 ((const u8 *) &hdr->it_len);
}
+
#endif /* IEEE80211_RADIOTAP_H */
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 98ab6544f..87cd7ead2 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -703,6 +703,8 @@ client_log (CURL *curl,
text);
return 0;
}
+
+
#endif
/**
@@ -1504,6 +1506,8 @@ open_tcp_stealth_socket_cb (void *clientp,
return CURL_SOCKET_BAD;
}
}
+
+
#endif
@@ -2528,4 +2532,5 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
return api;
}
+
/* end of plugin_transport_http_client.c */
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index 6d3ee3429..2bcab42b4 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -173,6 +173,7 @@ http_split_address (const char *addr)
return sp;
}
+
/**
* Closure for #append_port().
*/
@@ -640,6 +641,7 @@ http_common_plugin_address_to_string (const char *plugin,
return NULL;
}
+
/**
* Function called to convert a string address to
* a binary address.
@@ -943,5 +945,4 @@ http_common_get_network_for_address (struct
}
-
/* end of plugin_transport_http_common.c */
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 6e106fe78..20bdb6273 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -35,7 +35,6 @@
#include <regex.h>
-
#if BUILD_HTTPS
#define PLUGIN_NAME "https_server"
#define LIBGNUNET_PLUGIN_TRANSPORT_INIT \
@@ -2115,6 +2114,8 @@ server_load_file (const char *file)
GNUNET_DISK_file_close (gn_file);
return text;
}
+
+
#endif
@@ -2242,6 +2243,8 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
"TLS certificate loaded\n");
return res;
}
+
+
#endif
@@ -2358,7 +2361,6 @@ server_start (struct HTTP_Server_Plugin *plugin)
#endif
-
plugin->server_v4 = NULL;
if (GNUNET_YES == plugin->use_ipv4)
{
@@ -2557,7 +2559,6 @@ server_remove_address (void *cls,
}
-
/**
* Our external IP address/port mapping has changed.
*
@@ -3598,4 +3599,5 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
return api;
}
+
/* end of plugin_transport_http_server.c */
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c
index 7fbbc9126..330023118 100644
--- a/src/transport/plugin_transport_smtp.c
+++ b/src/transport/plugin_transport_smtp.c
@@ -257,6 +257,7 @@ END:
return NULL;
}
+
/* *************** API implementation *************** */
/**
@@ -287,6 +288,7 @@ api_verify_hello (const GNUNET_MessageHello *hello)
return GNUNET_OK;
}
+
/**
* Create a hello-Message for the current node. The hello is created
* without signature and without a timestamp. The GNUnet core will
@@ -336,6 +338,7 @@ api_create_hello ()
return msg;
}
+
struct GetMessageClosure
{
unsigned int esize;
@@ -361,6 +364,7 @@ get_message (void **buf, int *len, void *cls)
return gmc->ebody;
}
+
/**
* Send a message to the specified remote node.
*
@@ -529,6 +533,7 @@ api_send (GNUNET_TSession *tsession, const void *msg, const unsigned int size,
return GNUNET_OK;
}
+
/**
* Establish a connection to a remote node.
* @param hello the hello-Message for the target node
@@ -551,6 +556,7 @@ api_connect (const GNUNET_MessageHello *hello, GNUNET_TSession **tsessionPtr,
return GNUNET_OK;
}
+
/**
* Disconnect from a remote node.
*
@@ -569,6 +575,7 @@ api_disconnect (GNUNET_TSession *tsession)
return GNUNET_OK;
}
+
/**
* Start the server process to receive inbound traffic.
* @return GNUNET_OK on success, GNUNET_SYSERR if the operation failed
@@ -589,6 +596,7 @@ api_start_transport_server ()
return GNUNET_OK;
}
+
/**
* Shutdown the server process (stop receiving inbound traffic). Maybe
* restarted later!
@@ -604,6 +612,7 @@ api_stop_transport_server ()
return GNUNET_OK;
}
+
/**
* Convert SMTP hello to an IP address (always fails).
*/
@@ -614,6 +623,7 @@ api_hello_to_address (const GNUNET_MessageHello *hello, void **sa,
return GNUNET_SYSERR;
}
+
/**
* Always fails.
*/
@@ -623,6 +633,7 @@ api_associate (GNUNET_TSession *tsession)
return GNUNET_SYSERR; /* SMTP connections can never be associated */
}
+
/**
* Always succeeds (for now; we should look at adding
* frequency limits to SMTP in the future!).
@@ -634,6 +645,7 @@ api_test_would_try (GNUNET_TSession *tsession, unsigned int size,
return GNUNET_OK; /* we always try... */
}
+
/**
* The exported method. Makes the core api available via a global and
* returns the smtp transport API.
@@ -714,6 +726,7 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport *core)
return &smtpAPI;
}
+
void
donetransport_smtp ()
{
@@ -733,4 +746,5 @@ donetransport_smtp ()
email = NULL;
}
+
/* end of smtp.c */
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 36ff00dd8..ad0766af9 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -402,6 +402,7 @@ void
GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client,
void *ptr,
size_t size);
+
/**
* Return user context associated with the given client.
*
@@ -1376,6 +1377,8 @@ get_server_addresses (const char *service_name,
*addr_lens = saddrlens;
return resi;
}
+
+
/* end ancient copy-and-paste */
@@ -2447,8 +2450,7 @@ tcp_plugin_get_session (void *cls, const struct GNUNET_HELLO_Address *address)
one TCP connection to any given peer at the same time.
Without this, peers sometimes disagree about which of the TCP
connections they should use, causing one side to believe that
- they transmit successfully, while the other receives nothing. */
- return NULL; /* Refuse to have more than one TCP connection per
+ they transmit successfully, while the other receives nothing. */return NULL; /* Refuse to have more than one TCP connection per
peer pair at the same time. */
}
@@ -2956,8 +2958,7 @@ handle_tcp_nat_probe (void *cls,
* received the punch message and now wants us to use the new connection
* as the default for that peer. Do so and then send a WELCOME message
* so we can really be connected!
- */
- if (ntohs (message->size) != sizeof(struct TCP_NAT_ProbeMessage))
+ */if (ntohs (message->size) != sizeof(struct TCP_NAT_ProbeMessage))
{
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
@@ -3962,4 +3963,5 @@ libgnunet_plugin_transport_tcp_done (void *cls)
return NULL;
}
+
/* end of plugin_transport_tcp.c */
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 54b3a277a..239f32f4a 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -180,6 +180,8 @@ notify_session_monitor (struct Plugin *plugin,
session,
&info);
}
+
+
#endif
@@ -337,7 +339,6 @@ template_plugin_address_pretty_printer (void *cls, const char *type,
}
-
/**
* Another peer has suggested an address for this
* peer and transport plugin. Check that this could be a valid
@@ -463,6 +464,8 @@ send_session_info_iter (void *cls,
GNUNET_TRANSPORT_SS_UP);
return GNUNET_OK;
}
+
+
#endif
@@ -558,4 +561,5 @@ libgnunet_plugin_transport_template_done (void *cls)
return NULL;
}
+
/* end of plugin_transport_template.c */
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 8d0bbea47..ef4fddb24 100644
--- a/