summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
-remove trailing whitespace
-rw-r--r--contrib/test_gnunet_prefix.c8
-rw-r--r--doc/testbed_test.c24
-rw-r--r--src/arm/arm.h14
-rw-r--r--src/arm/arm_api.c60
-rw-r--r--src/arm/arm_monitor_api.c2
-rw-r--r--src/arm/do_start_process.c2
-rw-r--r--src/arm/gnunet-arm.c52
-rw-r--r--src/arm/gnunet-service-arm.c54
-rw-r--r--src/arm/test_arm_api.c24
-rw-r--r--src/arm/test_exponential_backoff.c10
-rw-r--r--src/arm/test_gnunet_service_arm.c20
-rw-r--r--src/ats-tool/gnunet-ats.c6
-rw-r--r--src/ats/gnunet-service-ats-solver_mlp.c50
-rw-r--r--src/ats/gnunet-service-ats-solver_proportional.c4
-rwxr-xr-xsrc/ats/gnunet-service-ats-solver_ril.c2
-rw-r--r--src/ats/gnunet-service-ats_addresses.c26
-rw-r--r--src/ats/gnunet-service-ats_normalization.c8
-rw-r--r--src/ats/gnunet-service-ats_reservations.c2
-rw-r--r--src/ats/perf_ats_mlp.c18
-rw-r--r--src/ats/test_ats_api_bandwidth_consumption.c2
-rw-r--r--src/ats/test_ats_api_performance_address_info.c2
-rw-r--r--src/ats/test_ats_api_performance_feedback.c2
-rw-r--r--src/ats/test_ats_api_scheduling_add_address.c2
-rw-r--r--src/ats/test_ats_api_scheduling_add_address_duplicate.c2
-rw-r--r--src/ats/test_ats_api_scheduling_add_address_inbound.c2
-rw-r--r--src/ats/test_ats_api_scheduling_add_session.c2
-rw-r--r--src/ats/test_ats_api_scheduling_block_and_reset.c36
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_address.c2
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_address_twice.c2
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_inbound_connection.c2
-rw-r--r--src/ats/test_ats_api_scheduling_destroy_session.c2
-rw-r--r--src/ats/test_ats_api_scheduling_init.c2
-rw-r--r--src/ats/test_ats_api_scheduling_min_bw.c2
-rw-r--r--src/block/block.c6
-rw-r--r--src/block/plugin_block_template.c2
-rw-r--r--src/block/plugin_block_test.c2
-rw-r--r--src/consensus/consensus_api.c10
-rw-r--r--src/consensus/gnunet-consensus-profiler.c2
-rw-r--r--src/consensus/gnunet-service-consensus.c22
-rw-r--r--src/consensus/test_consensus_api.c2
-rw-r--r--src/conversation/conversation.h8
-rw-r--r--src/conversation/conversation_api.c56
-rw-r--r--src/conversation/gnunet-conversation-test.c12
-rw-r--r--src/conversation/gnunet-conversation.c58
-rw-r--r--src/conversation/gnunet-helper-audio-playback.c54
-rw-r--r--src/conversation/gnunet-helper-audio-record.c64
-rw-r--r--src/conversation/gnunet-service-conversation.c70
-rw-r--r--src/conversation/microphone.c16
-rw-r--r--src/conversation/speaker.c18
-rw-r--r--src/conversation/test_conversation_api.c2
-rw-r--r--src/core/core_api.c8
-rw-r--r--src/core/gnunet-core.c2
-rw-r--r--src/core/gnunet-service-core.c4
-rw-r--r--src/core/gnunet-service-core_clients.c12
-rw-r--r--src/core/gnunet-service-core_kx.c62
-rw-r--r--src/core/gnunet-service-core_neighbours.c4
-rw-r--r--src/core/gnunet-service-core_sessions.c2
-rw-r--r--src/core/test_core_api.c6
-rw-r--r--src/core/test_core_api_reliability.c2
-rw-r--r--src/core/test_core_api_send_to_self.c4
-rw-r--r--src/core/test_core_api_start_only.c2
-rw-r--r--src/core/test_core_quota_compliance.c2
-rw-r--r--src/datacache/datacache.c12
-rw-r--r--src/datacache/perf_datacache.c2
-rw-r--r--src/datacache/plugin_datacache_heap.c18
-rw-r--r--src/datacache/plugin_datacache_postgres.c20
-rw-r--r--src/datacache/plugin_datacache_sqlite.c12
-rw-r--r--src/datacache/test_datacache.c8
-rw-r--r--src/datastore/datastore_api.c8
-rw-r--r--src/datastore/gnunet-datastore.c18
-rw-r--r--src/datastore/gnunet-service-datastore.c8
-rw-r--r--src/datastore/perf_datastore_api.c2
-rw-r--r--src/datastore/perf_plugin_datastore.c6
-rw-r--r--src/datastore/plugin_datastore_heap.c56
-rw-r--r--src/datastore/plugin_datastore_mysql.c10
-rw-r--r--src/datastore/plugin_datastore_postgres.c8
-rw-r--r--src/datastore/test_datastore_api.c4
-rw-r--r--src/datastore/test_datastore_api_management.c2
-rw-r--r--src/datastore/test_plugin_datastore.c2
-rw-r--r--src/dht/dht.h4
-rw-r--r--src/dht/dht_api.c56
-rw-r--r--src/dht/dht_test_lib.c16
-rw-r--r--src/dht/dht_test_lib.h2
-rw-r--r--src/dht/gnunet-dht-get.c4
-rw-r--r--src/dht/gnunet-dht-monitor.c12
-rw-r--r--src/dht/gnunet-service-dht_clients.c14
-rw-r--r--src/dht/gnunet-service-dht_clients.h4
-rw-r--r--src/dht/gnunet-service-dht_datacache.c4
-rw-r--r--src/dht/gnunet-service-dht_hello.c4
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c34
-rw-r--r--src/dht/gnunet-service-dht_neighbours.h2
-rw-r--r--src/dht/gnunet-service-dht_routing.c4
-rw-r--r--src/dht/test_dht_api.c2
-rw-r--r--src/dht/test_dht_monitor.c32
-rw-r--r--src/dht/test_dht_topo.c44
-rw-r--r--src/dns/dns.h4
-rw-r--r--src/dns/dns_api.c34
-rw-r--r--src/dns/dnsparser.c86
-rw-r--r--src/dns/dnsstub.c40
-rw-r--r--src/dns/gnunet-dns-monitor.c12
-rw-r--r--src/dns/gnunet-dns-redirector.c14
-rw-r--r--src/dns/gnunet-helper-dns.c82
-rw-r--r--src/dns/gnunet-service-dns.c64
-rw-r--r--src/dns/plugin_block_dns.c10
-rw-r--r--src/dv/dv.h4
-rw-r--r--src/dv/dv_api.c26
-rw-r--r--src/dv/gnunet-dv.c10
-rw-r--r--src/dv/gnunet-service-dv.c128
-rw-r--r--src/dv/plugin_transport_dv.c46
-rw-r--r--src/dv/test_transport_blacklist.c2
-rw-r--r--src/env/env.c16
-rw-r--r--src/env/test_env.c2
-rw-r--r--src/exit/exit.h8
-rw-r--r--src/exit/gnunet-daemon-exit.c292
-rw-r--r--src/exit/gnunet-helper-exit-windows.c250
-rw-r--r--src/exit/gnunet-helper-exit.c50
-rw-r--r--src/experimentation/gnunet-daemon-experimentation.h96
-rw-r--r--src/experimentation/gnunet-daemon-experimentation_experiments.c96
-rw-r--r--src/experimentation/gnunet-daemon-experimentation_nodes.c128
-rw-r--r--src/experimentation/gnunet-daemon-experimentation_scheduler.c4
-rw-r--r--src/experimentation/test_experimentation_clique_connect.c2
-rw-r--r--src/fragmentation/defragmentation.c8
-rw-r--r--src/fragmentation/fragmentation.c10
-rw-r--r--src/fragmentation/test_fragmentation.c4
-rw-r--r--src/fs/fs_api.c34
-rw-r--r--src/fs/fs_api.h14
-rw-r--r--src/fs/fs_dirmetascan.c52
-rw-r--r--src/fs/fs_download.c24
-rw-r--r--src/fs/fs_namespace.c26
-rw-r--r--src/fs/fs_publish.c48
-rw-r--r--src/fs/fs_publish_ksk.c8
-rw-r--r--src/fs/fs_publish_ublock.c14
-rw-r--r--src/fs/fs_publish_ublock.h4
-rw-r--r--src/fs/fs_search.c52
-rw-r--r--src/fs/fs_sharetree.c16
-rw-r--r--src/fs/fs_test_lib.c30
-rw-r--r--src/fs/fs_unindex.c22
-rw-r--r--src/fs/fs_uri.c24
-rw-r--r--src/fs/gnunet-auto-share.c26
-rw-r--r--src/fs/gnunet-daemon-fsprofiler.c42
-rw-r--r--src/fs/gnunet-download.c8
-rw-r--r--src/fs/gnunet-fs-profiler.c6
-rw-r--r--src/fs/gnunet-helper-fs-publish.c46
-rw-r--r--src/fs/gnunet-publish.c36
-rw-r--r--src/fs/gnunet-service-fs.c8
-rw-r--r--src/fs/gnunet-service-fs_cp.c24
-rw-r--r--src/fs/gnunet-service-fs_indexing.c4
-rw-r--r--src/fs/gnunet-service-fs_lc.c2
-rw-r--r--src/fs/gnunet-service-fs_mesh.h2
-rw-r--r--src/fs/gnunet-service-fs_mesh_client.c30
-rw-r--r--src/fs/gnunet-service-fs_mesh_server.c32
-rw-r--r--src/fs/gnunet-service-fs_pe.c6
-rw-r--r--src/fs/gnunet-service-fs_pe.h2
-rw-r--r--src/fs/gnunet-service-fs_pr.c38
-rw-r--r--src/fs/gnunet-service-fs_put.c6
-rw-r--r--src/fs/perf_gnunet_service_fs_p2p.c20
-rw-r--r--src/fs/perf_gnunet_service_fs_p2p_respect.c18
-rw-r--r--src/fs/test_fs_download.c10
-rw-r--r--src/fs/test_fs_download_persistence.c2
-rw-r--r--src/fs/test_fs_namespace.c6
-rw-r--r--src/fs/test_fs_namespace_list_updateable.c2
-rw-r--r--src/fs/test_fs_publish.c2
-rw-r--r--src/fs/test_fs_publish_persistence.c4
-rw-r--r--src/fs/test_fs_search.c2
-rw-r--r--src/fs/test_fs_search_probes.c2
-rw-r--r--src/fs/test_fs_start_stop.c2
-rw-r--r--src/fs/test_fs_test_lib.c12
-rw-r--r--src/fs/test_fs_unindex_persistence.c2
-rw-r--r--src/fs/test_gnunet_service_fs_migration.c4
-rw-r--r--src/fs/test_gnunet_service_fs_p2p.c12
-rw-r--r--src/gns/gns.h6
-rw-r--r--src/gns/gns_api.c54
-rw-r--r--src/gns/gnunet-dns2gns.c40
-rw-r--r--src/gns/gnunet-gns-helper-service-w32.c10
-rw-r--r--src/gns/gnunet-gns-proxy.c308
-rw-r--r--src/gns/gnunet-gns.c38
-rw-r--r--src/gns/gnunet-service-gns.c88
-rw-r--r--src/gns/gnunet-service-gns_interceptor.c38
-rw-r--r--src/gns/gnunet-service-gns_resolver.c154
-rw-r--r--src/gns/gnunet-service-gns_resolver.h2
-rw-r--r--src/gns/gnunet-service-gns_shorten.c40
-rw-r--r--src/gns/gnunet_w32nsp_lib.h16
-rw-r--r--src/gns/nss/nss_gns.c40
-rw-r--r--src/gns/nss/nss_gns_query.c12
-rw-r--r--src/gns/plugin_block_gns.c4
-rw-r--r--src/gns/test_gns_proxy.c26
-rw-r--r--src/gns/test_gns_pseu_shorten.c36
-rw-r--r--src/gns/test_gns_revocation.c6
-rw-r--r--src/gns/test_gns_simple_shorten.c18
-rw-r--r--src/gns/test_gns_simple_srv_lookup.c6
-rw-r--r--src/gns/test_gns_simple_zkey_lookup.c12
-rw-r--r--src/gns/w32nsp-install.c162
-rw-r--r--src/gns/w32nsp-resolve.c8
-rw-r--r--src/gns/w32nsp-uninstall.c58
-rw-r--r--src/hello/gnunet-hello.c14
-rw-r--r--src/hello/hello.c24
-rw-r--r--src/hostlist/hostlist-client.c2
-rw-r--r--src/hostlist/hostlist-server.c6
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c2
-rw-r--r--src/identity/gnunet-identity.c12
-rw-r--r--src/identity/gnunet-service-identity.c68
-rw-r--r--src/identity/identity.h6
-rw-r--r--src/identity/identity_api.c44
-rw-r--r--src/identity/identity_api_lookup.c16
-rw-r--r--src/identity/test_identity.c28
-rw-r--r--src/identity/test_identity_defaults.c32
-rw-r--r--src/include/block_regex.h2
-rw-r--r--src/include/gnunet_arm_service.h28
-rw-r--r--src/include/gnunet_bio_lib.h2
-rw-r--r--src/include/gnunet_block_lib.h4
-rw-r--r--src/include/gnunet_block_plugin.h2
-rw-r--r--src/include/gnunet_client_lib.h2
-rw-r--r--src/include/gnunet_common.h14
-rw-r--r--src/include/gnunet_configuration_lib.h6
-rw-r--r--src/include/gnunet_consensus_service.h4
-rw-r--r--src/include/gnunet_constants.h2
-rw-r--r--src/include/gnunet_container_lib.h104
-rw-r--r--src/include/gnunet_conversation_service.h20
-rw-r--r--src/include/gnunet_core_service.h2
-rw-r--r--src/include/gnunet_crypto_lib.h18
-rw-r--r--src/include/gnunet_datastore_plugin.h4
-rw-r--r--src/include/gnunet_dht_service.h18
-rw-r--r--src/include/gnunet_disk_lib.h36
-rw-r--r--src/include/gnunet_dns_service.h8
-rw-r--r--src/include/gnunet_dnsparser_lib.h46
-rw-r--r--src/include/gnunet_dnsstub_lib.h4
-rw-r--r--src/include/gnunet_env_lib.h68
-rw-r--r--src/include/gnunet_fs_service.h24
-rw-r--r--src/include/gnunet_helper_lib.h8
-rw-r--r--src/include/gnunet_identity_service.h32
-rw-r--r--src/include/gnunet_lockmanager_service.h6
-rw-r--r--src/include/gnunet_mesh_service.h24
-rw-r--r--src/include/gnunet_mesh_service_enc.h20
-rw-r--r--src/include/gnunet_microphone_lib.h6
-rw-r--r--src/include/gnunet_mq_lib.h22
-rw-r--r--src/include/gnunet_multicast_service.h114
-rw-r--r--src/include/gnunet_mysql_lib.h2
-rw-r--r--src/include/gnunet_namestore_plugin.h10
-rw-r--r--src/include/gnunet_namestore_service.h40
-rw-r--r--src/include/gnunet_nat_lib.h2
-rw-r--r--src/include/gnunet_network_lib.h2
-rw-r--r--src/include/gnunet_os_lib.h10
-rw-r--r--src/include/gnunet_peerinfo_service.h2
-rw-r--r--src/include/gnunet_postgres_lib.h6
-rw-r--r--src/include/gnunet_protocols.h10
-rw-r--r--src/include/gnunet_psyc_service.h86
-rw-r--r--src/include/gnunet_psycstore_plugin.h38
-rw-r--r--src/include/gnunet_psycstore_service.h70
-rw-r--r--src/include/gnunet_regex_service.h6
-rw-r--r--src/include/gnunet_resolver_service.h2
-rw-r--r--src/include/gnunet_revocation_service.h2
-rw-r--r--src/include/gnunet_scalarproduct_service.h12
-rw-r--r--src/include/gnunet_scheduler_lib.h2
-rw-r--r--src/include/gnunet_server_lib.h14
-rw-r--r--src/include/gnunet_service_lib.h6
-rw-r--r--src/include/gnunet_set_service.h6
-rw-r--r--src/include/gnunet_social_service.h94
-rw-r--r--src/include/gnunet_speaker_lib.h6
-rw-r--r--src/include/gnunet_strings_lib.h50
-rw-r--r--src/include/gnunet_testbed_logger_service.h2
-rw-r--r--src/include/gnunet_testbed_service.h8
-rw-r--r--src/include/gnunet_testing_lib.h22
-rw-r--r--src/include/gnunet_time_lib.h6
-rw-r--r--src/include/gnunet_transport_plugin.h2
-rw-r--r--src/include/gnunet_tun_lib.h98
-rw-r--r--src/include/gnunet_vpn_service.h8
-rw-r--r--src/include/tap-windows.h160
-rw-r--r--src/integration-tests/connection_watchdog.c52
-rw-r--r--src/mesh/gnunet-mesh.c2
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c34
-rw-r--r--src/mesh/gnunet-service-mesh.c94
-rw-r--r--src/mesh/gnunet-service-mesh_channel.c14
-rw-r--r--src/mesh/gnunet-service-mesh_channel.h2
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c22
-rw-r--r--src/mesh/gnunet-service-mesh_connection.h2
-rw-r--r--src/mesh/gnunet-service-mesh_local.c12
-rw-r--r--src/mesh/gnunet-service-mesh_local.h4
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c50
-rw-r--r--src/mesh/mesh.h8
-rw-r--r--src/mesh/mesh_api.c34
-rw-r--r--src/mesh/mesh_api_enc.c26
-rw-r--r--src/mesh/mesh_enc.h4
-rw-r--r--src/mesh/mesh_protocol.h4
-rw-r--r--src/mesh/mesh_protocol_enc.h2
-rw-r--r--src/mesh/mesh_test_lib.c14
-rw-r--r--src/mesh/mesh_test_lib.h2
-rw-r--r--src/mesh/mesh_tunnel_tree.c2
-rw-r--r--src/mesh/test_mesh_local.c12
-rw-r--r--src/mesh/test_mesh_single.c12
-rw-r--r--src/mesh/test_mesh_small.c20
-rw-r--r--src/multicast/multicast.h6
-rw-r--r--src/multicast/multicast_api.c78
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c58
-rw-r--r--src/namestore/gnunet-namestore.c78
-rw-r--r--src/namestore/gnunet-service-namestore.c128
-rw-r--r--src/namestore/namestore.h10
-rw-r--r--src/namestore/namestore_api.c116
-rw-r--r--src/namestore/namestore_api_common.c116
-rw-r--r--src/namestore/namestore_api_monitor.c8
-rw-r--r--src/namestore/plugin_namestore_postgres.c84
-rw-r--r--src/namestore/plugin_namestore_sqlite.c156
-rw-r--r--src/namestore/test_namestore_api_cache_block.c8
-rw-r--r--src/namestore/test_namestore_api_lookup_public.c10
-rw-r--r--src/namestore/test_namestore_api_monitoring.c10
-rw-r--r--src/namestore/test_namestore_api_monitoring_existing.c10
-rw-r--r--src/namestore/test_namestore_api_put.c6
-rw-r--r--src/namestore/test_namestore_api_remove.c22
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c2
-rw-r--r--src/namestore/test_namestore_api_store.c10
-rw-r--r--src/namestore/test_namestore_api_store_update.c18
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c2
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c2
-rw-r--r--src/namestore/test_namestore_api_zone_to_name.c2
-rw-r--r--src/namestore/test_plugin_namestore.c10
-rw-r--r--src/nat/gnunet-helper-nat-client-windows.c18
-rw-r--r--src/nat/gnunet-helper-nat-server-windows.c6
-rw-r--r--src/nat/gnunet-helper-nat-server.c2
-rw-r--r--src/nat/nat.c2
-rw-r--r--src/nat/nat_auto.c30
-rw-r--r--src/nse/gnunet-nse-profiler.c48
-rw-r--r--src/nse/gnunet-service-nse.c72
-rw-r--r--src/nse/nse_api.c12
-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.c18
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c42
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c52
-rw-r--r--src/peerinfo/peerinfo_api.c14
-rwxr-xr-xsrc/peerinfo/perf_peerinfo_api.c2
-rw-r--r--src/peerinfo/test_peerinfo_api.c2
-rw-r--r--src/peerinfo/test_peerinfo_api_friend_only.c2
-rw-r--r--src/peerinfo/test_peerinfo_api_notify_friend_only.c2
-rw-r--r--src/peerinfo/test_peerinfo_shipped_hellos.c2
-rw-r--r--src/psyc/gnunet-service-psyc.c2
-rw-r--r--src/psyc/psyc_api.c56
-rw-r--r--src/psycstore/gnunet-service-psycstore.c2
-rw-r--r--src/psycstore/plugin_psycstore_sqlite.c72
-rw-r--r--src/psycstore/psycstore_api.c52
-rw-r--r--src/pt/gnunet-daemon-pt.c76
-rw-r--r--src/pt/test_gns_vpn.c66
-rw-r--r--src/pt/test_gnunet_vpn.c16
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c4
-rw-r--r--src/regex/gnunet-regex-profiler.c16
-rw-r--r--src/regex/gnunet-service-regex.c18
-rw-r--r--src/regex/perf-regex.c12
-rw-r--r--src/regex/plugin_block_regex.c4
-rw-r--r--src/regex/regex_api.c32
-rw-r--r--src/regex/regex_block_lib.c32
-rw-r--r--src/regex/regex_block_lib.h4
-rw-r--r--src/regex/regex_internal.c112
-rw-r--r--src/regex/regex_internal_dht.c58
-rw-r--r--src/regex/regex_internal_lib.h12
-rw-r--r--src/regex/regex_ipc.h4
-rw-r--r--src/regex/regex_test_lib.c14
-rw-r--r--src/regex/regex_test_lib.h6
-rw-r--r--src/regex/test_regex_api.c4
-rw-r--r--src/regex/test_regex_iterate_api.c2
-rw-r--r--src/revocation/gnunet-revocation.c20
-rw-r--r--src/revocation/gnunet-service-revocation.c60
-rw-r--r--src/revocation/revocation_api.c14
-rw-r--r--src/scalarproduct/gnunet-scalarproduct.c14
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct.c122
-rw-r--r--src/scalarproduct/scalarproduct.h18
-rw-r--r--src/scalarproduct/scalarproduct_api.c34
-rw-r--r--src/scalarproduct/scalarproduct_testing.h22
-rw-r--r--src/scalarproduct/test_scalarproduct_api.c38
-rw-r--r--src/set/gnunet-service-set.c12
-rw-r--r--src/set/gnunet-service-set.h2
-rw-r--r--src/set/gnunet-service-set_intersection.c30
-rw-r--r--src/set/gnunet-service-set_union.c28
-rw-r--r--src/set/gnunet-set-ibf-profiler.c2
-rw-r--r--src/set/gnunet-set-profiler.c2
-rw-r--r--src/set/ibf.c2
-rw-r--r--src/set/ibf.h2
-rw-r--r--src/set/set_api.c6
-rw-r--r--src/set/test_set_api.c2
-rw-r--r--src/statistics/gnunet-service-statistics.c6
-rw-r--r--src/statistics/gnunet-statistics.c14
-rw-r--r--src/statistics/statistics_api.c44
-rw-r--r--src/statistics/test_statistics_api.c4
-rw-r--r--src/statistics/test_statistics_api_loop.c2
-rw-r--r--src/statistics/test_statistics_api_watch.c4
-rw-r--r--src/testbed/gnunet-daemon-testbed-blacklist.c8
-rw-r--r--src/testbed/gnunet-helper-testbed.c18
-rw-r--r--src/testbed/gnunet-service-test-barriers.c6
-rw-r--r--src/testbed/gnunet-service-testbed-logger.c4
-rw-r--r--src/testbed/gnunet-service-testbed.c12
-rw-r--r--src/testbed/gnunet-service-testbed_barriers.c52
-rw-r--r--src/testbed/gnunet-service-testbed_barriers.h2
-rw-r--r--src/testbed/gnunet-service-testbed_cache.c6
-rw-r--r--src/testbed/gnunet-service-testbed_connectionpool.c24
-rw-r--r--src/testbed/gnunet-service-testbed_connectionpool.h4
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c14
-rw-r--r--src/testbed/gnunet-service-testbed_links.c42
-rw-r--r--src/testbed/gnunet-service-testbed_oc.c42
-rw-r--r--src/testbed/gnunet-service-testbed_peers.c46
-rw-r--r--src/testbed/gnunet-testbed-profiler.c4
-rw-r--r--src/testbed/gnunet_testbed_mpi_spawn.c16
-rw-r--r--src/testbed/test_getcwd.c2
-rw-r--r--src/testbed/test_testbed_api.c2
-rw-r--r--src/testbed/test_testbed_api_barriers.c18
-rw-r--r--src/testbed/test_testbed_api_hosts.c6
-rw-r--r--src/testbed/test_testbed_api_operations.c8
-rw-r--r--src/testbed/test_testbed_api_peer_reconfiguration.c10
-rw-r--r--src/testbed/test_testbed_api_peers_manage_services.c6
-rw-r--r--src/testbed/test_testbed_api_sd.c4
-rw-r--r--src/testbed/test_testbed_api_statistics.c10
-rw-r--r--src/testbed/test_testbed_api_testbed_run.c2
-rw-r--r--src/testbed/test_testbed_logger_api.c8
-rw-r--r--src/testbed/testbed.h10
-rw-r--r--src/testbed/testbed_api.c48
-rw-r--r--src/testbed/testbed_api.h4
-rw-r--r--src/testbed/testbed_api_barriers.c28
-rw-r--r--src/testbed/testbed_api_barriers.h2
-rw-r--r--src/testbed/testbed_api_hosts.c40
-rw-r--r--src/testbed/testbed_api_hosts.h4
-rw-r--r--src/testbed/testbed_api_operations.c50
-rw-r--r--src/testbed/testbed_api_peers.c16
-rw-r--r--src/testbed/testbed_api_peers.h6
-rw-r--r--src/testbed/testbed_api_sd.c2
-rw-r--r--src/testbed/testbed_api_sd.h2
-rw-r--r--src/testbed/testbed_api_statistics.c24
-rw-r--r--src/testbed/testbed_api_testbed.c22
-rw-r--r--src/testbed/testbed_api_topology.c16
-rw-r--r--src/testbed/testbed_logger_api.c12
-rw-r--r--src/testing/gnunet-testing.c12
-rw-r--r--src/testing/test_testing_peerstartup.c10
-rw-r--r--src/testing/test_testing_peerstartup2.c18
-rw-r--r--src/testing/test_testing_sharedservices.c8
-rw-r--r--src/testing/testing.c122
-rw-r--r--src/topology/gnunet-daemon-topology.c10
-rw-r--r--src/topology/test_gnunet_daemon_topology.c4
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c440
-rw-r--r--src/transport/gnunet-helper-transport-wlan-dummy.c2
-rw-r--r--src/transport/gnunet-helper-transport-wlan.c146
-rw-r--r--src/transport/gnunet-service-transport.c2
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c14
-rw-r--r--src/transport/gnunet-service-transport_clients.c2
-rw-r--r--src/transport/gnunet-service-transport_hello.c4
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c34
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c150
-rw-r--r--src/transport/gnunet-service-transport_validation.c6
-rw-r--r--src/transport/gnunet-transport-certificate-creation.c8
-rw-r--r--src/transport/gnunet-transport-wlan-receiver.c8
-rw-r--r--src/transport/gnunet-transport-wlan-sender.c18
-rw-r--r--src/transport/gnunet-transport.c8
-rw-r--r--src/transport/plugin_transport_bluetooth.c106
-rw-r--r--src/transport/plugin_transport_http.c4
-rw-r--r--src/transport/plugin_transport_http_client.c26
-rw-r--r--src/transport/plugin_transport_http_server.c14
-rw-r--r--src/transport/plugin_transport_tcp.c102
-rw-r--r--src/transport/plugin_transport_template.c2
-rw-r--r--src/transport/plugin_transport_udp.c84
-rw-r--r--src/transport/plugin_transport_unix.c92
-rw-r--r--src/transport/plugin_transport_wlan.c102
-rw-r--r--src/transport/plugin_transport_wlan.h2
-rw-r--r--src/transport/test_plugin_transport.c2
-rw-r--r--src/transport/test_transport_api_limited_sockets.c2
-rw-r--r--src/transport/test_transport_api_timeout.c4
-rw-r--r--src/transport/transport_api.c8
-rw-r--r--src/transport/transport_api_address_lookup.c8
-rw-r--r--src/tun/regex.c10
-rw-r--r--src/tun/test_tun.c2
-rw-r--r--src/tun/tun.c22
-rw-r--r--src/util/bandwidth.c8
-rw-r--r--src/util/bio.c28
-rw-r--r--src/util/client.c36
-rw-r--r--src/util/common_allocation.c6
-rw-r--r--src/util/common_endian.c10
-rw-r--r--src/util/common_logging.c28
-rw-r--r--src/util/configuration.c30
-rw-r--r--src/util/connection.c18
-rw-r--r--src/util/container_bloomfilter.c4
-rw-r--r--src/util/container_meta_data.c2
-rw-r--r--src/util/container_multihashmap.c36
-rw-r--r--src/util/container_multihashmap32.c4
-rw-r--r--src/util/container_multipeermap.c36
-rw-r--r--src/util/crypto_ecc.c58
-rw-r--r--src/util/crypto_hash.c8
-rw-r--r--src/util/crypto_random.c8
-rw-r--r--src/util/crypto_symmetric.c34
-rw-r--r--src/util/disk.c20
-rw-r--r--src/util/gnunet-config.c8
-rw-r--r--src/util/gnunet-ecc.c6
-rw-r--r--src/util/gnunet-resolver.c6
-rw-r--r--src/util/gnunet-service-resolver.c22
-rw-r--r--src/util/gnunet-uri.c6
-rw-r--r--src/util/helper.c60
-rw-r--r--src/util/mq.c16
-rw-r--r--src/util/network.c22
-rw-r--r--src/util/os_installation.c26
-rw-r--r--src/util/os_network.c2
-rw-r--r--src/util/os_priority.c30
-rw-r--r--src/util/peer.c2
-rw-r--r--src/util/perf_malloc.c2
-rw-r--r--src/util/resolver_api.c4
-rw-r--r--src/util/scheduler.c22
-rw-r--r--src/util/server.c16
-rw-r--r--src/util/server_nc.c2
-rw-r--r--src/util/service.c34
-rw-r--r--src/util/speedup.c8
-rw-r--r--src/util/strings.c46
-rw-r--r--src/util/test_common_logging_runtime_loglevels.c2
-rw-r--r--src/util/test_configuration.c6
-rw-r--r--src/util/test_crypto_ecc.c6
-rw-r--r--src/util/test_crypto_symmetric.c6
-rw-r--r--src/util/test_mq.c2
-rw-r--r--src/util/test_os_start_process.c8
-rw-r--r--src/util/test_peer.c2
-rw-r--r--src/util/test_plugin.c2
-rw-r--r--src/util/test_resolver_api.c8
-rw-r--r--src/util/test_scheduler_delay.c2
-rw-r--r--src/util/test_server_mst_interrupt.c4
-rw-r--r--src/util/test_service.c4
-rw-r--r--src/util/test_speedup.c20
-rw-r--r--src/util/test_strings.c2
-rw-r--r--src/util/test_strings_to_data.c4
-rw-r--r--src/util/time.c6
-rw-r--r--src/util/win.c8
-rw-r--r--src/vpn/gnunet-helper-vpn-windows.c234
-rw-r--r--src/vpn/gnunet-helper-vpn.c2
-rw-r--r--src/vpn/gnunet-service-vpn.c258
-rw-r--r--src/vpn/gnunet-vpn.c10
-rw-r--r--src/vpn/vpn.h12
-rw-r--r--src/vpn/vpn_api.c34
526 files changed, 6555 insertions, 6555 deletions
diff --git a/contrib/test_gnunet_prefix.c b/contrib/test_gnunet_prefix.c
index de67c6480..9d0272050 100644
--- a/contrib/test_gnunet_prefix.c
+++ b/contrib/test_gnunet_prefix.c
@@ -27,19 +27,19 @@
#include "platform.h"
-int
+int
main (int argc,
char **argv)
{
const char *basename;
const char *dirname;
- basename = getenv ("GNUNET_PREFIX");
+ basename = getenv ("GNUNET_PREFIX");
if (NULL == basename)
{
fprintf (stderr,
_("Environment variable GNUNET_PREFIX not set\n"));
- fprintf (stderr,
+ fprintf (stderr,
_("Testcases will not work!\n"));
return 1;
}
@@ -56,7 +56,7 @@ main (int argc,
fprintf (stderr,
_("Check that you did run `make install' and that GNUNET_PREFIX='%s' is the correct prefix.\n"),
basename);
- fprintf (stderr,
+ fprintf (stderr,
_("Testcases will not work!\n"));
return 2;
}
diff --git a/doc/testbed_test.c b/doc/testbed_test.c
index d6ab1aa1b..bdda338b0 100644
--- a/doc/testbed_test.c
+++ b/doc/testbed_test.c
@@ -36,12 +36,12 @@ static int result;
* Function run on CTRL-C or shutdown (i.e. success/timeout/etc.).
* Cleans up.
*/
-static void
+static void
shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
shutdown_tid = GNUNET_SCHEDULER_NO_TASK;
if (NULL != dht_op)
- {
+ {
GNUNET_TESTBED_operation_done (dht_op); /* indirectly calls the dht_da() for closing
down the connection to the DHT */
dht_op = NULL;
@@ -68,15 +68,15 @@ service_connect_comp (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
const char *emsg)
-{
+{
GNUNET_assert (op == dht_op);
dht_handle = ca_result;
- /* Service to DHT successful; here we'd usually do something
+ /* Service to DHT successful; here we'd usually do something
with the DHT (ok, if successful) */
/* for now, just indiscriminately terminate after 10s */
GNUNET_SCHEDULER_cancel (shutdown_tid);
- shutdown_tid = GNUNET_SCHEDULER_add_delayed
+ shutdown_tid = GNUNET_SCHEDULER_add_delayed
(GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10),
&shutdown_task, NULL);
}
@@ -102,7 +102,7 @@ dht_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
struct MyContext *ctxt = cls;
/* Use the provided configuration to connect to service */
- dht_handle = GNUNET_DHT_connect (cfg, ctxt->ht_len);
+ dht_handle = GNUNET_DHT_connect (cfg, ctxt->ht_len);
return dht_handle;
}
@@ -114,12 +114,12 @@ dht_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
* @param cls closure
* @param op_result whatever we returned from 'dht_ca'
*/
-static void
+static void
dht_da (void *cls, void *op_result)
{
struct MyContext *ctxt = cls;
-
- /* Disconnect from DHT service */
+
+ /* Disconnect from DHT service */
GNUNET_DHT_disconnect ((struct GNUNET_DHT_Handle *) op_result);
dht_handle = NULL;
}
@@ -138,7 +138,7 @@ dht_da (void *cls, void *op_result)
* @param links_failed number of links testbed was unable to establish
*/
static void
-test_master (void *cls,
+test_master (void *cls,
struct GNUNET_TESTBED_RunHandle *h,
unsigned int num_peers,
struct GNUNET_TESTBED_Peer **peers,
@@ -152,7 +152,7 @@ test_master (void *cls,
ctxt.ht_len = 10;
/* connect to a peers service */
- dht_op = GNUNET_TESTBED_service_connect
+ dht_op = GNUNET_TESTBED_service_connect
(NULL, /* Closure for operation */
peers[0], /* The peer whose service to connect to */
"dht", /* The name of the service */
@@ -175,7 +175,7 @@ main (int argc, char **argv)
int ret;
result = GNUNET_SYSERR;
- ret = GNUNET_TESTBED_test_run
+ ret = GNUNET_TESTBED_test_run
("awesome-test", /* test case name */
"template.conf", /* template configuration */
NUM_PEERS, /* number of peers to start */
diff --git a/src/arm/arm.h b/src/arm/arm.h
index aad16fd71..7010a0842 100644
--- a/src/arm/arm.h
+++ b/src/arm/arm.h
@@ -42,10 +42,10 @@ struct GNUNET_ARM_StatusMessage
{
/**
- * Reply to client, of type is GNUNET_MESSAGE_TYPE_ARM_STATUS.
+ * Reply to client, of type is GNUNET_MESSAGE_TYPE_ARM_STATUS.
*/
struct GNUNET_MessageHeader header;
-
+
/**
* Status from the 'enum GNUNET_ARM_ServiceStatus'
*/
@@ -58,12 +58,12 @@ struct GNUNET_ARM_Message
{
/**
* Reply to client, type is GNUNET_MESSAGE_TYPE_ARM_RESULT or
- * GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT.
+ * GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT.
* OR
* Request from client, type is GNUNET_MESSAGE_TYPE_ARM_REQUEST
*/
struct GNUNET_MessageHeader header;
-
+
/**
* ID of a request that is being replied to.
* OR
@@ -85,7 +85,7 @@ struct GNUNET_ARM_ResultMessage
* Reply to client, of type is GNUNET_MESSAGE_TYPE_ARM_RESULT, with an ID.
*/
struct GNUNET_ARM_Message arm_msg;
-
+
/**
* Result from the 'enum GNUNET_ARM_Result'
*/
@@ -93,8 +93,8 @@ struct GNUNET_ARM_ResultMessage
};
/**
- * Reply from ARM to client for the
- * GNUNET_MESSAGE_TYPE_ARM_LIST request followed by count
+ * Reply from ARM to client for the
+ * GNUNET_MESSAGE_TYPE_ARM_LIST request followed by count
* '\0' terminated strings. header->size contains the
* total size (including all strings).
*/
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index f844551e4..6dfe65702 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -243,7 +243,7 @@ reconnect_arm_later (struct GNUNET_ARM_Handle *h)
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->reconnect_task);
h->reconnect_task =
GNUNET_SCHEDULER_add_delayed (h->retry_backoff, &reconnect_arm_task, h);
- /* Don't clear pending messages on disconnection, deliver them later
+ /* Don't clear pending messages on disconnection, deliver them later
clear_pending_messages (h, GNUNET_ARM_REQUEST_DISCONNECTED);
GNUNET_assert (NULL == h->control_pending_head);
*/
@@ -285,7 +285,7 @@ arm_termination_handler (void *cls, const struct GNUNET_MessageHeader *msg)
if (NULL != msg)
{
- GNUNET_break (0);
+ GNUNET_break (0);
GNUNET_CLIENT_receive (h->client, &arm_termination_handler, h,
GNUNET_TIME_UNIT_FOREVER_REL);
return;
@@ -296,10 +296,10 @@ arm_termination_handler (void *cls, const struct GNUNET_MessageHeader *msg)
GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
if (NULL != cm->result_cont)
- cm->result_cont (cm->cont_cls,
+ cm->result_cont (cm->cont_cls,
GNUNET_ARM_REQUEST_SENT_OK,
- (const char *) &cm->msg[1],
- GNUNET_ARM_RESULT_STOPPED);
+ (const char *) &cm->msg[1],
+ GNUNET_ARM_RESULT_STOPPED);
GNUNET_free (cm->msg);
GNUNET_free (cm);
}
@@ -354,7 +354,7 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Message with unknown id %llu\n", id);
return;
- }
+ }
fail = GNUNET_NO;
switch (ntohs (msg->type))
{
@@ -377,7 +377,7 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
rcount = ntohs (lres->count);
{
unsigned int i;
-
+
list = GNUNET_malloc (sizeof (const char *) * rcount);
pos = (const char *)&lres[1];
for (i = 0; i < rcount; i++)
@@ -429,9 +429,9 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
if (NULL != h->thm)
{
GNUNET_break (0);
- cm->result_cont (h->thm->cont_cls,
+ cm->result_cont (h->thm->cont_cls,
GNUNET_ARM_REQUEST_SENT_OK,
- (const char *) &h->thm->msg[1],
+ (const char *) &h->thm->msg[1],
GNUNET_ARM_RESULT_IS_NOT_KNOWN);
GNUNET_free (h->thm->msg);
GNUNET_free (h->thm);
@@ -440,12 +440,12 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
GNUNET_CLIENT_receive (h->client, &arm_termination_handler, h,
GNUNET_TIME_UNIT_FOREVER_REL);
return;
- }
+ }
GNUNET_CLIENT_receive (h->client, &client_notify_handler, h,
GNUNET_TIME_UNIT_FOREVER_REL);
switch (ntohs (msg->type))
{
- case GNUNET_MESSAGE_TYPE_ARM_RESULT:
+ case GNUNET_MESSAGE_TYPE_ARM_RESULT:
res = (const struct GNUNET_ARM_ResultMessage *) msg;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Received response from ARM for service `%s': %u\n",
@@ -461,7 +461,7 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
list);
GNUNET_free (list);
break;
- }
+ }
GNUNET_free (cm->msg);
GNUNET_free (cm);
}
@@ -473,7 +473,7 @@ client_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
* @param cls closure with the 'struct GNUNET_ARM_Handle'
* @param size number of bytes available in buf
* @param buf where the callee should write the message
- * @return number of bytes written to buf
+ * @return number of bytes written to buf
*/
static size_t
transmit_arm_message (void *cls, size_t size, void *buf)
@@ -490,7 +490,7 @@ transmit_arm_message (void *cls, size_t size, void *buf)
"transmit_arm_message is running with %p buffer of size %lu. ARM is known to be %s\n",
buf, size, h->currently_down ? "unconnected" : "connected");
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->reconnect_task);
- h->cth = NULL;
+ h->cth = NULL;
if ((GNUNET_YES == h->currently_down) && (NULL != buf))
{
h->currently_down = GNUNET_NO;
@@ -658,14 +658,14 @@ void
GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h)
{
struct ARMControlMessage *cm;
-
+
LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from ARM service\n");
if (NULL != h->cth)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (h->cth);
h->cth = NULL;
}
- while ((NULL != (cm = h->control_pending_head))
+ while ((NULL != (cm = h->control_pending_head))
|| (NULL != (cm = h->control_sent_head)) )
{
if (NULL != h->control_pending_head)
@@ -764,13 +764,13 @@ arm_service_report (void *cls,
if ((GNUNET_YES == test_is_active) &&
(GNUNET_YES == result))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Looks like `%s' is already running.\n",
"gnunet-service-arm");
/* arm is running! */
if (cm->result_cont)
- cm->result_cont (cm->cont_cls,
- GNUNET_ARM_REQUEST_SENT_OK, "arm",
+ cm->result_cont (cm->cont_cls,
+ GNUNET_ARM_REQUEST_SENT_OK, "arm",
GNUNET_ARM_RESULT_IS_STARTED_ALREADY);
}
if (GNUNET_NO == test_is_active)
@@ -802,8 +802,8 @@ arm_service_report (void *cls,
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, "arm", "BINARY");
if (cm->result_cont)
- cm->result_cont (cm->cont_cls,
- GNUNET_ARM_REQUEST_SENT_OK, "arm",
+ cm->result_cont (cm->cont_cls,
+ GNUNET_ARM_REQUEST_SENT_OK, "arm",
GNUNET_ARM_RESULT_IS_NOT_KNOWN);
GNUNET_free (cm);
GNUNET_free (loprefix);
@@ -935,9 +935,9 @@ change_service (struct GNUNET_ARM_Handle *h, const char *service_name,
*/
void
GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h,
- const char *service_name,
+ const char *service_name,
enum GNUNET_OS_InheritStdioFlags std_inheritance,
- struct GNUNET_TIME_Relative timeout,
+ struct GNUNET_TIME_Relative timeout,
GNUNET_ARM_ResultCallback cont,
void *cont_cls)
{
@@ -1026,14 +1026,14 @@ GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h,
*/
void
GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h,
- const char *service_name,
+ const char *service_name,
struct GNUNET_TIME_Relative timeout,
- GNUNET_ARM_ResultCallback cont,
+ GNUNET_ARM_ResultCallback cont,
void *cont_cls)
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Stopping service `%s' within %s\n",
- service_name,
+ service_name,
GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_NO));
change_service (h, service_name, timeout, cont, cont_cls,
GNUNET_MESSAGE_TYPE_ARM_STOP);
@@ -1051,14 +1051,14 @@ GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h,
void
GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h,
struct GNUNET_TIME_Relative timeout,
- GNUNET_ARM_ServiceListCallback cont,
+ GNUNET_ARM_ServiceListCallback cont,
void *cont_cls)
{
struct ARMControlMessage *cm;
struct GNUNET_ARM_Message *msg;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Requesting LIST from ARM service with timeout: %s\n",
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Requesting LIST from ARM service with timeout: %s\n",
GNUNET_STRINGS_relative_time_to_string (timeout, GNUNET_YES));
cm = GNUNET_malloc (sizeof (struct ARMControlMessage));
cm->h = h;
diff --git a/src/arm/arm_monitor_api.c b/src/arm/arm_monitor_api.c
index f8d41e790..7b403fde8 100644
--- a/src/arm/arm_monitor_api.c
+++ b/src/arm/arm_monitor_api.c
@@ -167,7 +167,7 @@ init_timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @param cls closure with the 'struct GNUNET_ARM_MonitorHandle'
* @param size number of bytes available in buf
* @param buf where the callee should write the message
- * @return number of bytes written to buf
+ * @return number of bytes written to buf
*/
static size_t
transmit_monitoring_init_message (void *cls, size_t size, void *buf)
diff --git a/src/arm/do_start_process.c b/src/arm/do_start_process.c
index 95ec74405..d8ee1f0c3 100644
--- a/src/arm/do_start_process.c
+++ b/src/arm/do_start_process.c
@@ -122,7 +122,7 @@ do_start_process (int pipe_control, unsigned int std_inheritance,
va_end (ap);
argv[argv_size] = NULL;
binary_path = argv[0];
- proc = GNUNET_OS_start_process_v (pipe_control, std_inheritance, lsocks,
+ proc = GNUNET_OS_start_process_v (pipe_control, std_inheritance, lsocks,
binary_path, argv);
while (argv_size > 0)
GNUNET_free (argv[--argv_size]);
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c
index 85cb1f45d..80d3e9c03 100644
--- a/src/arm/gnunet-arm.c
+++ b/src/arm/gnunet-arm.c
@@ -167,7 +167,7 @@ delete_files ()
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Failed to remove servicehome directory %s\n"), dir);
-
+
}
}
@@ -269,7 +269,7 @@ ret_string (enum GNUNET_ARM_Result result)
* @param cls closure
* @param tc scheudler context
*/
-static void
+static void
action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
@@ -283,11 +283,11 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
* GNUNET_SYSERR on error.
*/
static void
-conn_status (void *cls,
+conn_status (void *cls,
int connected)
{
static int once;
-
+
if ( (GNUNET_SYSERR == connected) &&
(0 == once) )
{
@@ -335,7 +335,7 @@ start_callback (void *cls,
GNUNET_free (msg);
GNUNET_SCHEDULER_shutdown ();
return;
- }
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ARM service [re]start successful\n");
start = 0;
GNUNET_SCHEDULER_add_now (action_loop, NULL);
@@ -355,7 +355,7 @@ start_callback (void *cls,
* according to ARM
*/
static void
-stop_callback (void *cls,
+stop_callback (void *cls,
enum GNUNET_ARM_RequestStatus rs, const char *service,
enum GNUNET_ARM_Result result)
{
@@ -363,7 +363,7 @@ stop_callback (void *cls,
if (GNUNET_ARM_REQUEST_SENT_OK != rs)
{
- GNUNET_asprintf (&msg, "%s",
+ GNUNET_asprintf (&msg, "%s",
_("Failed to send a stop request to the ARM service: %s\n"));
FPRINTF (stdout, msg, req_string (rs));
GNUNET_free (msg);
@@ -380,14 +380,14 @@ stop_callback (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"ARM service shutdown successful\n");
end = 0;
if (restart)
{
restart = 0;
start = 1;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Initiating an ARM restart\n");
}
GNUNET_SCHEDULER_add_now (&action_loop, NULL);
@@ -407,12 +407,12 @@ stop_callback (void *cls,
* according to ARM
*/
static void
-init_callback (void *cls,
+init_callback (void *cls,
enum GNUNET_ARM_RequestStatus rs, const char *service,
enum GNUNET_ARM_Result result)
{
char *msg;
-
+
if (GNUNET_ARM_REQUEST_SENT_OK != rs)
{
GNUNET_asprintf (&msg, _("Failed to send a request to start the `%s' service: %%s\n"), init);
@@ -431,8 +431,8 @@ init_callback (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Service %s [re]started successfully\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Service %s [re]started successfully\n",
init);
init = NULL;
GNUNET_SCHEDULER_add_now (&action_loop, NULL);
@@ -452,7 +452,7 @@ init_callback (void *cls,
* according to ARM
*/
static void
-term_callback (void *cls,
+term_callback (void *cls,
enum GNUNET_ARM_RequestStatus rs, const char *service,
enum GNUNET_ARM_Result result)
{
@@ -470,7 +470,7 @@ term_callback (void *cls,
if ((GNUNET_ARM_RESULT_STOPPED != result) &&
(GNUNET_ARM_RESULT_IS_STOPPED_ALREADY != result))
{
- GNUNET_asprintf (&msg,
+ GNUNET_asprintf (&msg,
_("Failed to kill the `%s' service: %s\n"),
term, ret_string (result));
FPRINTF (stdout, msg, service);
@@ -479,7 +479,7 @@ term_callback (void *cls,
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Service %s stopped successfully\n", term);
term = NULL;
GNUNET_SCHEDULER_add_now (&action_loop, NULL);
@@ -497,7 +497,7 @@ term_callback (void *cls,
* @param list list of services that are running
*/
static void
-list_callback (void *cls,
+list_callback (void *cls,
enum GNUNET_ARM_RequestStatus rs, unsigned int count,
const char *const*list)
{
@@ -546,7 +546,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (NULL != term)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Termination action\n");
- GNUNET_ARM_request_service_stop (h, term,
+ GNUNET_ARM_request_service_stop (h, term,
(0 == timeout.rel_value_us) ? STOP_TIMEOUT : timeout,
&term_callback, NULL);
return;
@@ -556,7 +556,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (end || restart)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "End action\n");
- GNUNET_ARM_request_service_stop (h, "arm",
+ GNUNET_ARM_request_service_stop (h, "arm",
(0 == timeout.rel_value_us) ? STOP_TIMEOUT_ARM : timeout,
&stop_callback, NULL);
return;
@@ -585,7 +585,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
break;
case 4:
- if (list)
+ if (list)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Going to list all running services controlled by ARM.\n");
@@ -593,10 +593,10 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
(0 == timeout.rel_value_us) ? LIST_TIMEOUT : timeout,
&list_callback, &list);
return;
- }
+ }
break;
case 5:
- if (monitor)
+ if (monitor)
{
if (! quiet)
fprintf (stderr,
@@ -621,7 +621,7 @@ action_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @param status status of the service
*/
static void
-srv_status (void *cls,
+srv_status (void *cls,
const char *service, enum GNUNET_ARM_ServiceStatus status)
{
const char *msg;
@@ -663,8 +663,8 @@ srv_status (void *cls,
* @param c configuration
*/
static void
-run (void *cls,
- char *const *args,
+run (void *cls,
+ char *const *args,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
@@ -672,7 +672,7 @@ run (void *cls,
cfg = GNUNET_CONFIGURATION_dup (c);
config_file = cfgfile;
- if (GNUNET_OK !=
+ if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, "PATHS", "SERVICEHOME", &dir))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index 906f0adde..1196b20aa 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -259,7 +259,7 @@ write_result (void *cls, size_t size, void *buf)
return 0; /* error, not much we can do */
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending status response %u to client\n",
+ "Sending status response %u to client\n",
(unsigned int) msg->result);
msize = msg->arm_msg.header.size;
GNUNET_assert (size >= msize);
@@ -275,7 +275,7 @@ write_result (void *cls, size_t size, void *buf)
/**
* Transmit the list of running services.
- *
+ *
* @param cls pointer to `struct GNUNET_ARM_ListResultMessage` with the message
* @param size number of bytes available in @a buf
* @param buf where to copy the message, NULL on error
@@ -286,7 +286,7 @@ write_list_result (void *cls, size_t size, void *buf)
{
struct GNUNET_ARM_ListResultMessage *msg = cls;
size_t rslt_size;
-
+
if (buf == NULL)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -294,14 +294,14 @@ write_list_result (void *cls, size_t size, void *buf)
GNUNET_free (msg);
return 0; /* error, not much we can do */
}
-
+
rslt_size = msg->arm_msg.header.size;
GNUNET_assert (size >= rslt_size);
msg->arm_msg.header.size = htons (msg->arm_msg.header.size);
msg->arm_msg.header.type = htons (msg->arm_msg.header.type);
msg->arm_msg.request_id = GNUNET_htonll (msg->arm_msg.request_id);
msg->count = htons (msg->count);
-
+
memcpy (buf, msg, rslt_size);
GNUNET_free (msg);
return rslt_size;
@@ -319,7 +319,7 @@ write_list_result (void *cls, size_t size, void *buf)
* @return NULL if it was not found
*/
static void
-signal_result (struct GNUNET_SERVER_Client *client,
+signal_result (struct GNUNET_SERVER_Client *client,
const char *name,
uint64_t request_id,
enum GNUNET_ARM_Result result)
@@ -335,7 +335,7 @@ signal_result (struct GNUNET_SERVER_Client *client,
msg->arm_msg.request_id = request_id;
GNUNET_SERVER_notify_transmit_ready (client, msize,
- GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_TIME_UNIT_FOREVER_REL,
write_result, msg);
}
@@ -492,7 +492,7 @@ start_process (struct ServiceList *sl, struct GNUNET_SERVER_Client *client, uint
if (NULL == sl->config)
sl->proc =
do_start_process (sl->pipe_control, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- lsocks, loprefix, binary,
+ lsocks, loprefix, binary,
options, NULL);
else
sl->proc =
@@ -693,7 +693,7 @@ handle_start (void *cls, struct GNUNET_SERVER_Client *client,
uint64_t request_id;
struct GNUNET_ARM_Message *amsg;
- amsg = (struct GNUNET_ARM_Message *) message;
+ amsg = (struct GNUNET_ARM_Message *) message;
request_id = GNUNET_ntohll (amsg->request_id);
size = ntohs (amsg->header.size);
size -= sizeof (struct GNUNET_ARM_Message);
@@ -762,7 +762,7 @@ handle_stop (void *cls, struct GNUNET_SERVER_Client *client,
uint64_t request_id;
struct GNUNET_ARM_Message *amsg;
- amsg = (struct GNUNET_ARM_Message *) message;
+ amsg = (struct GNUNET_ARM_Message *) message;
request_id = GNUNET_ntohll (amsg->request_id);
size = ntohs (amsg->header.size);
size -= sizeof (struct GNUNET_ARM_Message);
@@ -847,10 +847,10 @@ handle_list (void *cls, struct GNUNET_SERVER_Client *client,
size_t total_size;
struct ServiceList *sl;
uint16_t count;
-
+
if (NULL == client)
return;
-
+
request = (struct GNUNET_ARM_Message *) message;
count = 0;
string_list_size = 0;
@@ -866,16 +866,16 @@ handle_list (void *cls, struct GNUNET_SERVER_Client *client,
}
}
- total_size = sizeof (struct GNUNET_ARM_ListResultMessage)
+ total_size = sizeof (struct GNUNET_ARM_ListResultMessage)
+ string_list_size;
msg = GNUNET_malloc (total_size);
msg->arm_msg.header.size = total_size;
msg->arm_msg.header.type = GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT;
msg->arm_msg.request_id = GNUNET_ntohll (request->request_id);
msg->count = count;
-
+
char *pos = (char *)&msg[1];
- for (sl = running_head; sl != NULL; sl = sl->next)
+ for (sl = running_head; sl != NULL; sl = sl->next)
{
if (sl->proc != NULL)
{
@@ -884,7 +884,7 @@ handle_list (void *cls, struct GNUNET_SERVER_Client *client,
pos += s;
}
}
-
+
GNUNET_SERVER_notify_transmit_ready (client,
total_size,
GNUNET_TIME_UNIT_FOREVER_REL,
@@ -926,7 +926,7 @@ list_count (struct ServiceList *running_head)
unsigned int res = 0;
for (res = 0, i = running_head; i; i = i->next, res++)
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"%s\n",
i->name);
return res;
@@ -946,7 +946,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
struct ServiceList *nxt;
struct ServiceListeningInfo *sli;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"First shutdown phase\n");
if (GNUNET_SCHEDULER_NO_TASK != child_restart_task)
{
@@ -979,7 +979,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
nxt = pos->next;
if (pos->proc != NULL)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Stopping service `%s'\n",
pos->name);
pos->killed_at = GNUNET_TIME_absolute_get ();
@@ -996,7 +996,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
do_shutdown ();
else
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Delaying shutdown, have %u childs still running\n",
+ "Delaying shutdown, have %u childs still running\n",
list_count (running_head));
}
@@ -1063,12 +1063,12 @@ delayed_restart_task (void *cls,
}
if (lowestRestartDelay.rel_value_us != GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Will restart process in %s\n",
GNUNET_STRINGS_relative_time_to_string (lowestRestartDelay, GNUNET_YES));
child_restart_task =
GNUNET_SCHEDULER_add_delayed_with_priority (lowestRestartDelay,
- GNUNET_SCHEDULER_PRIORITY_IDLE,
+ GNUNET_SCHEDULER_PRIORITY_IDLE,
&delayed_restart_task, NULL);
}
}
@@ -1275,7 +1275,7 @@ setup_service (void *cls, const char *section)
{
if (NULL != config)
{
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING,
section, "CONFIG",
STRERROR (errno));
GNUNET_free (config);
@@ -1293,7 +1293,7 @@ setup_service (void *cls, const char *section)
#else
if (GNUNET_CONFIGURATION_have_value (cfg, section, "PIPECONTROL"))
sl->pipe_control = GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "PIPECONTROL");
-#endif
+#endif
GNUNET_CONTAINER_DLL_insert (running_head, running_tail, sl);
if (GNUNET_YES !=
GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "AUTOSTART"))
@@ -1363,9 +1363,9 @@ run (void *cls, struct GNUNET_SERVER_Handle *serv,
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
{&handle_start, NULL, GNUNET_MESSAGE_TYPE_ARM_START, 0},
{&handle_stop, NULL, GNUNET_MESSAGE_TYPE_ARM_STOP, 0},
- {&handle_monitor, NULL, GNUNET_MESSAGE_TYPE_ARM_MONITOR,
+ {&handle_monitor, NULL, GNUNET_MESSAGE_TYPE_ARM_MONITOR,
sizeof (struct GNUNET_MessageHeader)},
- {&handle_list, NULL, GNUNET_MESSAGE_TYPE_ARM_LIST,
+ {&handle_list, NULL, GNUNET_MESSAGE_TYPE_ARM_LIST,
sizeof (struct GNUNET_ARM_Message)},
{NULL, NULL, 0, 0}
};
@@ -1456,7 +1456,7 @@ main (int argc, char *const *argv)
GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death);
ret =
(GNUNET_OK ==
- GNUNET_SERVICE_run (argc, argv, "arm",
+ GNUNET_SERVICE_run (argc, argv, "arm",
GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN, &run, NULL)) ? 0 : 1;
GNUNET_SIGNAL_handler_uninstall (shc_chld);
shc_chld = NULL;
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c
index a36d5939b..cdb173d5c 100644
--- a/src/arm/test_arm_api.c
+++ b/src/arm/test_arm_api.c
@@ -43,9 +43,9 @@ static int ok = 1;
static int phase = 0;
static void
-arm_stop_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
- const char *servicename,
+arm_stop_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
+ const char *servicename,
enum GNUNET_ARM_Result result)
{
/* (6), a stop request should be sent to ARM successfully */
@@ -59,8 +59,8 @@ arm_stop_cb (void *cls,
static void
-resolver_stop_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
+resolver_stop_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
const char *servicename, enum GNUNET_ARM_Result result)
{
/* (5), a stop request should be sent to ARM successfully.
@@ -104,9 +104,9 @@ dns_notify (void *cls, const struct sockaddr *addr, socklen_t addrlen)
static void
-resolver_start_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
- const char *servicename,
+resolver_start_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
+ const char *servicename,
enum GNUNET_ARM_Result result)
{
/* (2), the start request for resolver should be sent successfully
@@ -129,7 +129,7 @@ trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-arm_conn (void *cls,
+arm_conn (void *cls,
int connected)
{
if (GNUNET_SYSERR == connected)
@@ -163,9 +163,9 @@ arm_conn (void *cls,
static void
-arm_start_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
- const char *servicename,
+arm_start_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
+ const char *servicename,
enum GNUNET_ARM_Result result)
{
/* (0) The request should be "sent" successfully
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c
index 08c4fd8ee..0561c3ea8 100644
--- a/src/arm/test_exponential_backoff.c
+++ b/src/arm/test_exponential_backoff.c
@@ -122,12 +122,12 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg)
{
struct ShutdownContext *shutdown_ctx = cls;
- if (NULL == msg)
+ if (NULL == msg)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service shutdown complete.\n");
if (shutdown_ctx->cont != NULL)
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO);
-
+
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
@@ -253,7 +253,7 @@ kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (NULL != cbData)
{
waitedFor = GNUNET_TIME_absolute_get_duration (startedWaitingAt);
- LOG ("Waited for: %s\n",
+ LOG ("Waited for: %s\n",
GNUNET_STRINGS_relative_time_to_string (waitedFor, GNUNET_YES));
}
else
@@ -347,7 +347,7 @@ arm_start_cb (void *cls, enum GNUNET_ARM_RequestStatus status, const char *servi
GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
GNUNET_break (result == GNUNET_ARM_RESULT_STARTING);
GNUNET_break (phase == 0);
- LOG ("Sent 'START' request for arm to ARM %s\n",
+ LOG ("Sent 'START' request for arm to ARM %s\n",
(status == GNUNET_ARM_REQUEST_SENT_OK) ? "successfully" : "unsuccessfully");
}
@@ -431,7 +431,7 @@ init ()
return GNUNET_SYSERR;
GNUNET_assert (0 < GNUNET_asprintf (&binary, "%s/%s", pwd, BINARY));
GNUNET_CONFIGURATION_set_value_string (cfg, SERVICE, "BINARY", binary);
- GNUNET_free (binary);
+ GNUNET_free (binary);
if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, CFGFILENAME))
{
GNUNET_CONFIGURATION_destroy (cfg);
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c
index e53322aa5..60feb9c19 100644
--- a/src/arm/test_gnunet_service_arm.c
+++ b/src/arm/test_gnunet_service_arm.c
@@ -18,7 +18,7 @@
Boston, MA 02111-1307, USA.
*/
/**
- * @file arm/test_gnunet_service_arm.c
+ * @file arm/test_gnunet_service_arm.c
* @brief testcase for gnunet-service-arm.c; tests ARM by making it start the resolver
* @author Safey
* @author Christian Grothoff
@@ -55,9 +55,9 @@ trigger_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-arm_stop_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
- const char *servicename,
+arm_stop_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
+ const char *servicename,
enum GNUNET_ARM_Result result)
{
GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
@@ -69,12 +69,12 @@ arm_stop_cb (void *cls,
static void
-service_list (void *cls,
+service_list (void *cls,
enum GNUNET_ARM_RequestStatus rs,
unsigned int count, const char *const*list)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "%u services are are currently running\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "%u services are are currently running\n",
count);
GNUNET_break (count == 1);
GNUNET_break (0 == strcasecmp (list[0], "resolver (gnunet-service-resolver)"));
@@ -107,9 +107,9 @@ hostNameResolveCB (void *cls, const struct sockaddr *addr, socklen_t addrlen)
static void
-arm_start_cb (void *cls,
- enum GNUNET_ARM_RequestStatus status,
- const char *servicename,
+arm_start_cb (void *cls,
+ enum GNUNET_ARM_RequestStatus status,
+ const char *servicename,
enum GNUNET_ARM_Result result)
{
GNUNET_break (status == GNUNET_ARM_REQUEST_SENT_OK);
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 710931321..90523652d 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -110,7 +110,7 @@ static struct PendingResolutions *head;
static struct PendingResolutions *tail;
-static void
+static void
end (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -149,7 +149,7 @@ end (void *cls,
}
-static void
+static void
transport_addr_to_str_cb (void *cls, const char *address)
{
struct PendingResolutions * pr = cls;
@@ -226,7 +226,7 @@ transport_addr_to_str_cb (void *cls, const char *address)
}
-static void
+static void
ats_perf_cb (void *cls,
const struct GNUNET_HELLO_Address *address,
int active,
diff --git a/src/ats/gnunet-service-ats-solver_mlp.c b/src/ats/gnunet-service-ats-solver_mlp.c
index f36a3808e..f32ad101a 100644
--- a/src/ats/gnunet-service-ats-solver_mlp.c
+++ b/src/ats/gnunet-service-ats-solver_mlp.c
@@ -177,8 +177,8 @@ mlp_term_hook (void *info, const char *s)
* @return GNUNET_OK
*/
static int
-reset_peers (void *cls,
- const struct GNUNET_PeerIdentity *key,
+reset_peers (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct ATS_Peer *peer = value;
@@ -239,7 +239,7 @@ mlp_delete_problem (struct GAS_MLP_Handle *mlp)
mlp->p.ci = MLP_UNDEFINED;
- GNUNET_CONTAINER_multipeermap_iterate (mlp->requested_peers,
+ GNUNET_CONTAINER_multipeermap_iterate (mlp->requested_peers,
&reset_peers, NULL);
}
@@ -393,7 +393,7 @@ struct CountContext
};
static int
-mlp_create_problem_count_addresses_it (void *cls,
+mlp_create_problem_count_addresses_it (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -406,7 +406,7 @@ mlp_create_problem_count_addresses_it (void *cls,
}
-static int
+static int
mlp_create_problem_count_addresses (const struct GNUNET_CONTAINER_MultiPeerMap *peers,
const struct GNUNET_CONTAINER_MultiPeerMap *addresses)
{
@@ -414,7 +414,7 @@ mlp_create_problem_count_addresses (const struct GNUNET_CONTAINER_MultiPeerMap *
cctx.peers = peers;
cctx.result = 0;
- GNUNET_CONTAINER_multipeermap_iterate (addresses,
+ GNUNET_CONTAINER_multipeermap_iterate (addresses,
&mlp_create_problem_count_addresses_it, &cctx);
return cctx.result;
}
@@ -600,8 +600,8 @@ mlp_create_problem_create_constraint (struct MLP_Problem *p, char *name,
* - Set address dependent entries in problem matrix as well
*/
static int
-mlp_create_problem_add_address_information (void *cls,
- const struct GNUNET_PeerIdentity *key,
+mlp_create_problem_add_address_information (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct GAS_MLP_Handle *mlp = cls;
@@ -842,7 +842,7 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Rebuilding problem for %u peer(s) and %u addresse(s) and %u quality metrics == %u elements\n",
p->num_peers,
- p->num_addresses,
+ p->num_addresses,
mlp->pv.m_q,
p->num_elements);
@@ -874,8 +874,8 @@ mlp_create_problem (struct GAS_MLP_Handle *mlp)
mlp_create_problem_add_invariant_rows (mlp, p);
/* Adding address dependent columns constraint rows */
- GNUNET_CONTAINER_multipeermap_iterate (mlp->addresses,
- &mlp_create_problem_add_address_information,
+ GNUNET_CONTAINER_multipeermap_iterate (mlp->addresses,
+ &mlp_create_problem_add_address_information,
mlp);
/* Load the matrix */
@@ -961,8 +961,8 @@ mlp_solve_mlp_problem (struct GAS_MLP_Handle *mlp)
* @return #GNUNET_OK to continue
*/
int
-mlp_propagate_results (void *cls,
- const struct GNUNET_PeerIdentity *key,
+mlp_propagate_results (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct GAS_MLP_Handle *mlp = cls;
@@ -973,7 +973,7 @@ mlp_propagate_results (void *cls,
double mlp_use = MLP_NaN;
/* Check if we have to add this peer due to a pending request */
- if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mlp->requested_peers,
+ if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (mlp->requested_peers,
key))
{
return GNUNET_OK;
@@ -1224,12 +1224,12 @@ GAS_mlp_address_add (void *solver,
address->solver_information = GNUNET_new (struct MLP_information);
}
else
- LOG (GNUNET_ERROR_TYPE_ERROR,
- _("Adding address for peer `%s' multiple times\n"),
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ _("Adding address for peer `%s' multiple times\n"),
GNUNET_i2s(&address->peer));
/* Is this peer included in the problem? */
- if (NULL == (p = GNUNET_CONTAINER_multipeermap_get (mlp->requested_peers,
+ if (NULL == (p = GNUNET_CONTAINER_multipeermap_get (mlp->requested_peers,
&address->peer)))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "Adding address for peer `%s' without address request \n", GNUNET_i2s(&address->peer));
@@ -1529,8 +1529,8 @@ GAS_mlp_address_delete (void *solver,
* @return GNUNET_OK
*/
static int
-mlp_get_preferred_address_it (void *cls,
- const struct GNUNET_PeerIdentity *key,
+mlp_get_preferred_address_it (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
static int counter = 0;
@@ -1563,7 +1563,7 @@ mlp_get_preferred_address_it (void *cls,
}
-static double
+static double
get_peer_pref_value (struct GAS_MLP_Handle *mlp, const struct GNUNET_PeerIdentity *peer)
{
double res;
@@ -1616,8 +1616,8 @@ GAS_mlp_get_preferred_address (void *solver,
p = GNUNET_malloc (sizeof (struct ATS_Peer));
p->id = (*peer);
p->f = get_peer_pref_value (mlp, peer);
- GNUNET_CONTAINER_multipeermap_put (mlp->requested_peers,
- peer, p,
+ GNUNET_CONTAINER_multipeermap_put (mlp->requested_peers,
+ peer, p,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
/* Added new peer, we have to rebuild problem before solving */
@@ -1780,7 +1780,7 @@ GAS_mlp_address_preference_feedback (void *solver,
static int
-mlp_free_peers (void *cls,
+mlp_free_peers (void *cls,
const struct GNUNET_PeerIdentity *key, void *value)
{
struct GNUNET_CONTAINER_MultiPeerMap *map = cls;
@@ -1807,8 +1807,8 @@ GAS_mlp_done (void *solver)
LOG (GNUNET_ERROR_TYPE_DEBUG, "Shutting down mlp solver\n");
mlp_delete_problem (mlp);
- GNUNET_CONTAINER_multipeermap_iterate (mlp->requested_peers,
- &mlp_free_peers,
+ GNUNET_CONTAINER_multipeermap_iterate (mlp->requested_peers,
+ &mlp_free_peers,
mlp->requested_peers);
GNUNET_CONTAINER_multipeermap_destroy (mlp->requested_peers);
mlp->requested_peers = NULL;
diff --git a/src/ats/gnunet-service-ats-solver_proportional.c b/src/ats/gnunet-service-ats-solver_proportional.c
index e9a553ad6..db9fcff85 100644
--- a/src/ats/gnunet-service-ats-solver_proportional.c
+++ b/src/ats/gnunet-service-ats-solver_proportional.c
@@ -576,7 +576,7 @@ find_property_index (uint32_t type)
* @return GNUNET_OK (continue to iterate)
*/
static int
-find_best_address_it (void *cls,
+find_best_address_it (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -721,7 +721,7 @@ get_network (struct GAS_PROPORTIONAL_Handle *s, uint32_t type)
* @return #GNUNET_NO on double active address else #GNUNET_YES;
*/
static int
-get_active_address_it (void *cls,
+get_active_address_it (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
diff --git a/src/ats/gnunet-service-ats-solver_ril.c b/src/ats/gnunet-service-ats-solver_ril.c
index 4cc19092d..1a9614fd3 100755
--- a/src/ats/gnunet-service-ats-solver_ril.c
+++ b/src/ats/gnunet-service-ats-solver_ril.c
@@ -1033,7 +1033,7 @@ ril_get_agent (struct GAS_RIL_Handle *solver, const struct GNUNET_PeerIdentity *
for (cur = solver->agents_head; NULL != cur; cur = cur->next)
{
- if (0 == memcmp (peer,
+ if (0 == memcmp (peer,
&cur->peer,
sizeof (struct GNUNET_PeerIdentity)))
{
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 8e3692b8e..f55bb4611 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -584,8 +584,8 @@ struct CompareAddressContext
* @return #GNUNET_YES to continue, #GNUNET_NO if address is founce
*/
static int
-compare_address_it (void *cls,
- const struct GNUNET_PeerIdentity *key,
+compare_address_it (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct CompareAddressContext *cac = cls;
@@ -675,7 +675,7 @@ find_equivalent_address (struct GAS_Addresses_Handle *handle,
cac.base_address = NULL;
cac.search = addr;
GNUNET_CONTAINER_multipeermap_get_multiple (handle->addresses,
- peer,
+ peer,
&compare_address_it, &cac);
if (cac.exact_address == NULL)
@@ -1076,7 +1076,7 @@ destroy_by_session_id (void *cls,
/* Notify solver about deletion */
GNUNET_assert(
- GNUNET_YES == GNUNET_CONTAINER_multipeermap_remove (handle->addresses,
+ GNUNET_YES == GNUNET_CONTAINER_multipeermap_remove (handle->addresses,
&aa->peer, aa));
handle->s_del (handle->solver, aa, GNUNET_NO);
free_address (aa);
@@ -1321,16 +1321,16 @@ GAS_addresses_request_address (struct GAS_Addresses_Handle *handle,
* @return #GNUNET_OK to continue
*/
static int
-reset_address_it (void *cls,
- const struct GNUNET_PeerIdentity *key,
+reset_address_it (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct ATS_Address *aa = value;
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"Resetting interval for peer `%s' address %p from %llu to 0\n",
- GNUNET_i2s (&aa->peer),
- aa,
+ GNUNET_i2s (&aa->peer),
+ aa,
aa->block_interval);
aa->blocked_until = GNUNET_TIME_UNIT_ZERO_ABS;
aa->block_interval = GNUNET_TIME_UNIT_ZERO;
@@ -1846,7 +1846,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_ATS_NetworkTypeCount);
ah->solver = ah->s_init (cfg, stats, ah->addresses, quotas, quotas_in,
- quotas_out, quota_count,
+ quotas_out, quota_count,
&bandwidth_changed_cb, ah, &get_preferences_cb,
NULL, &get_property_cb, NULL );
if (NULL == ah->solver)
@@ -1873,7 +1873,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
* @return #GNUNET_OK (continue to iterate)
*/
static int
-destroy_all_address_it (void *cls,
+destroy_all_address_it (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -1881,7 +1881,7 @@ destroy_all_address_it (void *cls,
struct ATS_Address *aa = value;
/* Remove */
- GNUNET_assert(GNUNET_YES ==
+ GNUNET_assert(GNUNET_YES ==
GNUNET_CONTAINER_multipeermap_remove (handle->addresses, key, value));
/* Notify */
handle->s_del (handle->solver, aa, GNUNET_NO);
@@ -1958,7 +1958,7 @@ struct PeerIteratorContext
* @return #GNUNET_OK to continue
*/
static int
-peer_it (void *cls,
+peer_it (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -2000,7 +2000,7 @@ GAS_addresses_iterate_peers (struct GAS_Addresses_Handle *handle,
ip_ctx.it_cls = p_it_cls;
ip_ctx.peers_returned = GNUNET_CONTAINER_multipeermap_create (size,
GNUNET_NO);
- GNUNET_CONTAINER_multipeermap_iterate (handle->addresses,
+ GNUNET_CONTAINER_multipeermap_iterate (handle->addresses,
&peer_it,
&ip_ctx);
GNUNET_CONTAINER_multipeermap_destroy (ip_ctx.peers_returned);
diff --git a/src/ats/gnunet-service-ats_normalization.c b/src/ats/gnunet-service-ats_normalization.c
index bd9dcb706..954f2b5f5 100644
--- a/src/ats/gnunet-service-ats_normalization.c
+++ b/src/ats/gnunet-service-ats_normalization.c
@@ -654,7 +654,7 @@ find_min_max_it (void *cls,
static int
-normalize_address (void *cls,
+normalize_address (void *cls,
const struct GNUNET_PeerIdentity *h,
void *k)
{
@@ -693,8 +693,8 @@ normalize_address (void *cls,
*/
static void
property_normalize (struct GNUNET_CONTAINER_MultiPeerMap *addresses,
- struct Property *p,
- struct ATS_Address *address,
+ struct Property *p,
+ struct ATS_Address *address,
uint32_t avg_value)
{
struct FindMinMaxCtx find_ctx;
@@ -762,7 +762,7 @@ property_normalize (struct GNUNET_CONTAINER_MultiPeerMap *addresses,
*/
void
GAS_normalization_normalize_property (struct GNUNET_CONTAINER_MultiPeerMap *addresses,
- struct ATS_Address *address,
+ struct ATS_Address *address,
const struct GNUNET_ATS_Information *atsi,
uint32_t atsi_count)
{
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c
index c75577cf9..bf5e62cae 100644
--- a/src/ats/gnunet-service-ats_reservations.c
+++ b/src/ats/gnunet-service-ats_reservations.c
@@ -137,7 +137,7 @@ GAS_reservations_init ()
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_tracker (void *cls,
+free_tracker (void *cls,
const struct GNUNET_PeerIdentity *key, void *value)
{
struct GNUNET_BANDWIDTH_Tracker *tracker = value;
diff --git a/src/ats/perf_ats_mlp.c b/src/ats/perf_ats_mlp.c
index 5d370104b..190635c77 100644
--- a/src/ats/perf_ats_mlp.c
+++ b/src/ats/perf_ats_mlp.c
@@ -374,10 +374,10 @@ check (void *cls, char *const *args, const char *cfgfile,
(GLP_YES == full_lp_presolv) ? "YES" : "NO",
(GNUNET_OK == full_mip_presolv) ? "YES" : "NO",
(unsigned long long) full_build_dur.rel_value_us,
- (unsigned long long) full_lp_dur.rel_value_us,
+ (unsigned long long) full_lp_dur.rel_value_us,
(unsigned long long) full_mip_dur.rel_value_us);
if ((0 < opt_update_quantity) || (0 < opt_update_percent))
- fprintf (stderr,
+ fprintf (stderr,
"Update: %03u peers each %02u addresses; rebuild: LP/MIP state [%3s/%3s] presolv [%3s/%3s], (build/LP/MIP in us) %04llu / %04llu / %04llu\n",
cp + 1, ca,
(GNUNET_OK == update_lp_res) ? "OK" : "FAIL",
@@ -385,31 +385,31 @@ check (void *cls, char *const *args, const char *cfgfile,
(GLP_YES == update_lp_presolv) ? "YES" : "NO",
(GNUNET_OK == update_mip_presolv) ? "YES" : "NO",
(unsigned long long) update_build_dur.rel_value_us,
- (unsigned long long) update_lp_dur.rel_value_us,
+ (unsigned long long) update_lp_dur.rel_value_us,
(unsigned long long) update_mip_dur.rel_value_us);
}
else
{
- fprintf (stderr,
+ fprintf (stderr,
"Rebuild;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
cp + 1, ca,
(GNUNET_OK == full_lp_res) ? "OK" : "FAIL",
(GNUNET_OK == full_mip_res) ? "OK" : "FAIL",
(GLP_YES == full_lp_presolv) ? "YES" : "NO",
(GNUNET_OK == full_mip_presolv) ? "YES" : "NO",
- (unsigned long long) full_build_dur.rel_value_us,
- (unsigned long long) full_lp_dur.rel_value_us,
+ (unsigned long long) full_build_dur.rel_value_us,
+ (unsigned long long) full_lp_dur.rel_value_us,
(unsigned long long) full_mip_dur.rel_value_us);
if ((0 < opt_update_quantity) || (0 < opt_update_percent))
- fprintf (stderr,
+ fprintf (stderr,
"Update;%u;%u;%s;%s;%s;%s;%04llu;%04llu;%04llu\n",
cp + 1, ca,
(GNUNET_OK == update_lp_res) ? "OK" : "FAIL",
(GNUNET_OK == update_mip_res) ? "OK" : "FAIL",
(GLP_YES == update_lp_presolv) ? "YES" : "NO",
(GNUNET_OK == update_mip_presolv) ? "YES" : "NO",
- (unsigned long long) update_build_dur.rel_value_us,
- (unsigned long long) update_lp_dur.rel_value_us,
+ (unsigned long long) update_build_dur.rel_value_us,
+ (unsigned long long) update_lp_dur.rel_value_us,
(unsigned long long) update_mip_dur.rel_value_us);
}
}
diff --git a/src/ats/test_ats_api_bandwidth_consumption.c b/src/ats/test_ats_api_bandwidth_consumption.c
index 772d044a5..74ee22cfb 100644
--- a/src/ats/test_ats_api_bandwidth_consumption.c
+++ b/src/ats/test_ats_api_bandwidth_consumption.c
@@ -174,7 +174,7 @@ address_suggest_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_performance_address_info.c b/src/ats/test_ats_api_performance_address_info.c
index 7cdbc4e37..294d09192 100644
--- a/src/ats/test_ats_api_performance_address_info.c
+++ b/src/ats/test_ats_api_performance_address_info.c
@@ -226,7 +226,7 @@ static void next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *mycfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_performance_feedback.c b/src/ats/test_ats_api_performance_feedback.c
index 35d31c495..f946e674a 100644
--- a/src/ats/test_ats_api_performance_feedback.c
+++ b/src/ats/test_ats_api_performance_feedback.c
@@ -208,7 +208,7 @@ static void next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
}
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *mycfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_add_address.c b/src/ats/test_ats_api_scheduling_add_address.c
index d9bd0d6e1..ce9f9fcbd 100644
--- a/src/ats/test_ats_api_scheduling_add_address.c
+++ b/src/ats/test_ats_api_scheduling_add_address.c
@@ -150,7 +150,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_add_address_duplicate.c b/src/ats/test_ats_api_scheduling_add_address_duplicate.c
index 9fd4d2096..e7b4fb6fe 100644
--- a/src/ats/test_ats_api_scheduling_add_address_duplicate.c
+++ b/src/ats/test_ats_api_scheduling_add_address_duplicate.c
@@ -161,7 +161,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_add_address_inbound.c b/src/ats/test_ats_api_scheduling_add_address_inbound.c
index f0368c1ae..4cb560982 100644
--- a/src/ats/test_ats_api_scheduling_add_address_inbound.c
+++ b/src/ats/test_ats_api_scheduling_add_address_inbound.c
@@ -156,7 +156,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_add_session.c b/src/ats/test_ats_api_scheduling_add_session.c
index eafb6fbe2..c415b57e2 100644
--- a/src/ats/test_ats_api_scheduling_add_session.c
+++ b/src/ats/test_ats_api_scheduling_add_session.c
@@ -163,7 +163,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_block_and_reset.c b/src/ats/test_ats_api_scheduling_block_and_reset.c
index d5bd58031..c4dd8b4bb 100644
--- a/src/ats/test_ats_api_scheduling_block_and_reset.c
+++ b/src/ats/test_ats_api_scheduling_block_and_reset.c
@@ -150,7 +150,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (3 == stage)
{
/* Suggestion after resetting block interval */
- reset_block_duration = GNUNET_TIME_absolute_get_difference (reset_block_start,
+ reset_block_duration = GNUNET_TIME_absolute_get_difference (reset_block_start,
GNUNET_TIME_absolute_get());
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Address suggestion after resetting blocking took about %s!\n",
@@ -180,7 +180,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (((initial_duration.rel_value_us * 3) <= block_duration.rel_value_us) &&
((reset_block_duration.rel_value_us * 3) <= block_duration.rel_value_us))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Address suggestion after resetting blocking and initial suggestion (%llu us) much faster than with blocking (%llu us)\n",
(unsigned long long) initial_duration.rel_value_us,
(unsigned long long) block_duration.rel_value_us);
@@ -188,7 +188,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Address suggestion after resetting blocking and initial suggestion (%llu us) not faster than with blocking (%llu us)\n",
(unsigned long long) initial_duration.rel_value_us,
(unsigned long long) block_duration.rel_value_us);
@@ -211,7 +211,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (GNUNET_OK == compare_addresses (address, session, &test_hello_address, test_session))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Stage %u: Callback with correct address `%s'\n", stage,
GNUNET_i2s (&address->peer));
ret = 0;
@@ -228,7 +228,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Stage %u: Callback with incorrect ats info \n");
GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
GNUNET_SCHEDULER_add_now (&end, NULL);
@@ -246,16 +246,16 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
/* Initial suggestion */
if (GNUNET_OK == compare_addresses (address, session, &test_hello_address, test_session))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Stage %u: Callback with correct address `%s'\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Stage %u: Callback with correct address `%s'\n",
stage,
GNUNET_i2s (&address->peer));
ret = 0;
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Stage %u: Callback with invalid address `%s'\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Stage %u: Callback with invalid address `%s'\n",
stage,
GNUNET_i2s (&address->peer));
GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
@@ -265,7 +265,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (GNUNET_OK != compare_ats(atsi, ats_count, test_ats_info, test_ats_count))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Stage %u: Callback with incorrect ats info\n",
stage);
GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
@@ -274,8 +274,8 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
}
stage++;
initial_duration = GNUNET_TIME_absolute_get_difference(initial_start, GNUNET_TIME_absolute_get());
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Stage %u: Initial suggestion took about %s\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Stage %u: Initial suggestion took about %s\n",
stage,
GNUNET_STRINGS_relative_time_to_string (block_duration,
GNUNET_YES));
@@ -288,8 +288,8 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
/* Startup suggestion */
if (GNUNET_OK == compare_addresses (address, session, &test_hello_address, test_session))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Stage %u: Callback with correct address `%s'\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Stage %u: Callback with correct address `%s'\n",
stage,
GNUNET_i2s (&address->peer));
ret = 0;
@@ -297,7 +297,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
else
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Stage %u: Callback with invalid address `%s'\n",
+ "Stage %u: Callback with invalid address `%s'\n",
stage,
GNUNET_i2s (&address->peer));
GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
@@ -307,7 +307,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
if (GNUNET_OK != compare_ats (atsi, ats_count, test_ats_info, test_ats_count))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Stage %u: Callback with incorrect ats info\n",
stage);
GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
@@ -325,7 +325,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
@@ -336,7 +336,7 @@ run (void *cls,
sched_ats = GNUNET_ATS_scheduling_init (cfg, &address_suggest_cb, NULL);
if (sched_ats == NULL)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Could not connect to ATS scheduling!\n");
ret = 1;
end ();
diff --git a/src/ats/test_ats_api_scheduling_destroy_address.c b/src/ats/test_ats_api_scheduling_destroy_address.c
index 78005fe84..aa70f6b5a 100644
--- a/src/ats/test_ats_api_scheduling_destroy_address.c
+++ b/src/ats/test_ats_api_scheduling_destroy_address.c
@@ -161,7 +161,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_destroy_address_twice.c b/src/ats/test_ats_api_scheduling_destroy_address_twice.c
index e3cd2cd2c..ef03674df 100644
--- a/src/ats/test_ats_api_scheduling_destroy_address_twice.c
+++ b/src/ats/test_ats_api_scheduling_destroy_address_twice.c
@@ -163,7 +163,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_destroy_inbound_connection.c b/src/ats/test_ats_api_scheduling_destroy_inbound_connection.c
index 100bfd249..90a8d070f 100644
--- a/src/ats/test_ats_api_scheduling_destroy_inbound_connection.c
+++ b/src/ats/test_ats_api_scheduling_destroy_inbound_connection.c
@@ -162,7 +162,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_destroy_session.c b/src/ats/test_ats_api_scheduling_destroy_session.c
index 523822667..dc53a894d 100644
--- a/src/ats/test_ats_api_scheduling_destroy_session.c
+++ b/src/ats/test_ats_api_scheduling_destroy_session.c
@@ -167,7 +167,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_init.c b/src/ats/test_ats_api_scheduling_init.c
index 7fd954eb5..aab5f2373 100644
--- a/src/ats/test_ats_api_scheduling_init.c
+++ b/src/ats/test_ats_api_scheduling_init.c
@@ -117,7 +117,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/ats/test_ats_api_scheduling_min_bw.c b/src/ats/test_ats_api_scheduling_min_bw.c
index 5a59c23bb..4da07628c 100644
--- a/src/ats/test_ats_api_scheduling_min_bw.c
+++ b/src/ats/test_ats_api_scheduling_min_bw.c
@@ -117,7 +117,7 @@ address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
}
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/block/block.c b/src/block/block.c
index d2c7a067b..f38e7e0bf 100644
--- a/src/block/block.c
+++ b/src/block/block.c
@@ -97,15 +97,15 @@ GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode *in,
* @param lib_ret the plugin API
*/
static void
-add_plugin (void *cls,
- const char *library_name,
+add_plugin (void *cls,
+ const char *library_name,
void *lib_ret)
{
struct GNUNET_BLOCK_Context *ctx = cls;
struct GNUNET_BLOCK_PluginFunctions *api = lib_ret;
struct Plugin *plugin;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Loading block plugin `%s'\n",
library_name);
plugin = GNUNET_new (struct Plugin);
diff --git a/src/block/plugin_block_template.c b/src/block/plugin_block_template.c
index 1675fdb1c..7c62de6b1 100644
--- a/src/block/plugin_block_template.c
+++ b/src/block/plugin_block_template.c
@@ -56,7 +56,7 @@ block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
struct GNUNET_HashCode chash;
struct GNUNET_HashCode mhash;
/* FIXME: check validity first... */
-
+
/* mandatory duplicate-detection code... */
if (NULL != bf)
{
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c
index 130c2ac3c..9390562a4 100644
--- a/src/block/plugin_block_test.c
+++ b/src/block/plugin_block_test.c
@@ -116,7 +116,7 @@ block_plugin_test_get_key (void *cls, enum GNUNET_BLOCK_Type type,
* Entry point for the plugin.
*
* @param cls NULL
- * @return the exported block API
+ * @return the exported block API
*/
void *
libgnunet_plugin_block_test_init (void *cls)
diff --git a/src/consensus/consensus_api.c b/src/consensus/consensus_api.c
index b2b3694d6..d8e65c52f 100644
--- a/src/consensus/consensus_api.c
+++ b/src/consensus/consensus_api.c
@@ -20,7 +20,7 @@
/**
* @file consensus/consensus_api.c
- * @brief
+ * @brief
* @author Florian Dold
*/
#include "platform.h"
@@ -103,7 +103,7 @@ struct InsertDoneInfo
/**
* Called when the server has sent is a new element
- *
+ *
* @param cls consensus handle
* @param mh element message
*/
@@ -129,7 +129,7 @@ handle_new_element (void *cls,
/**
* Called when the server has announced
* that the conclusion is over.
- *
+ *
* @param cls consensus handle
* @param msg conclude done message
*/
@@ -220,7 +220,7 @@ idc_adapter (void *cls)
*
* @param consensus handle for the consensus session
* @param element the element to be inserted
- * @param idc function called when we are done with this element and it
+ * @param idc function called when we are done with this element and it
* is thus allowed to call GNUNET_CONSENSUS_insert again
* @param idc_cls closure for 'idc'
*/
@@ -240,7 +240,7 @@ GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus,
GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_INSERT);
memcpy (&element_msg[1], element->data, element->size);
-
+
if (NULL != idc)
{
i = GNUNET_new (struct InsertDoneInfo);
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c
index 00e017246..bade332b5 100644
--- a/src/consensus/gnunet-consensus-profiler.c
+++ b/src/consensus/gnunet-consensus-profiler.c
@@ -206,7 +206,7 @@ new_element_cb (void *cls,
int idx = chp - consensus_handles;
GNUNET_assert (NULL != cls);
-
+
results_for_peer[idx]++;
GNUNET_assert (sizeof (struct GNUNET_HashCode) == element->size);
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 74f758034..914943f11 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -147,7 +147,7 @@ struct ConsensusSession
* Only valid once the current round is not CONSENSUS_ROUND_BEGIN.
*/
struct GNUNET_TIME_Relative conclude_timeout;
-
+
/**
* Timeout task identifier for the current round.
*/
@@ -286,7 +286,7 @@ have_exp_subround_finished (const struct ConsensusSession *session)
{
int not_finished;
not_finished = 0;
- if ( (NULL != session->partner_outgoing) &&
+ if ( (NULL != session->partner_outgoing) &&
(GNUNET_NO == session->partner_outgoing->exp_subround_finished) )
not_finished++;
if ( (NULL != session->partner_incoming) &&
@@ -300,7 +300,7 @@ have_exp_subround_finished (const struct ConsensusSession *session)
/**
* Destroy a session, free all resources associated with it.
- *
+ *
* @param session the session to destroy
*/
static void
@@ -404,7 +404,7 @@ send_to_client_iter (void *cls,
* @param tc task context, for when this task is invoked by the scheduler,
* NULL if invoked for another reason
*/
-static void
+static void
round_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct ConsensusSession *session;
@@ -459,7 +459,7 @@ shuffle (struct ConsensusSession *session)
if (NULL == session->shuffle_inv)
session->shuffle_inv = GNUNET_malloc (session->num_peers * sizeof (*session->shuffle_inv));
- GNUNET_CRYPTO_kdf (randomness, sizeof (randomness),
+ GNUNET_CRYPTO_kdf (randomness, sizeof (randomness),
&session->exp_round, sizeof (uint32_t),
&session->global_id, sizeof (struct GNUNET_HashCode),
NULL);
@@ -559,7 +559,7 @@ find_partners (struct ConsensusSession *session)
* @param element a result element, only valid if status is GNUNET_SET_STATUS_OK
* @param status see enum GNUNET_SET_Status
*/
-static void
+static void
set_result_cb (void *cls,
const struct GNUNET_SET_Element *element,
enum GNUNET_SET_Status status)
@@ -674,7 +674,7 @@ subround_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_SCHEDULER_cancel (session->round_timeout_tid);
session->round_timeout_tid = GNUNET_SCHEDULER_NO_TASK;
}
-
+
if (session->exp_round >= NUM_EXP_ROUNDS)
{
round_over (session, NULL);
@@ -700,7 +700,7 @@ subround_over (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
session->exp_subround = 0;
shuffle (session);
}
- else
+ else
{
session->exp_subround++;
}
@@ -810,7 +810,7 @@ get_peer_idx (const struct GNUNET_PeerIdentity *peer, const struct ConsensusSess
* @param session_id local id of the consensus session
*/
static void
-compute_global_id (struct ConsensusSession *session,
+compute_global_id (struct ConsensusSession *session,
const struct GNUNET_HashCode *session_id)
{
int i;
@@ -865,7 +865,7 @@ initialize_session_peer_list (struct ConsensusSession *session,
/* peers in the join message, may or may not include the local peer */
listed_peers = ntohl (join_msg->num_peers);
-
+
session->num_peers = listed_peers;
msg_peers = (struct GNUNET_PeerIdentity *) &join_msg[1];
@@ -1025,7 +1025,7 @@ initialize_session (struct ConsensusSession *session,
other_session = sessions_head;
while (NULL != other_session)
{
- if ((other_session != session) &&
+ if ((other_session != session) &&
(0 == GNUNET_CRYPTO_hash_cmp (&session->global_id, &other_session->global_id)))
{
if (CONSENSUS_ROUND_FINISH != other_session->current_round)
diff --git a/src/consensus/test_consensus_api.c b/src/consensus/test_consensus_api.c
index 37a5eb692..9b6f71f7a 100644
--- a/src/consensus/test_consensus_api.c
+++ b/src/consensus/test_consensus_api.c
@@ -82,7 +82,7 @@ on_shutdown (void *cls,
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/conversation/conversation.h b/src/conversation/conversation.h
index 685d98d16..4b42277a5 100644
--- a/src/conversation/conversation.h
+++ b/src/conversation/conversation.h
@@ -116,7 +116,7 @@ struct ClientPhonePickupMessage
* Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP
*/
struct GNUNET_MessageHeader header;
-
+
/* followed by variable length 0-terminated string with meta data */
};
@@ -132,7 +132,7 @@ struct ClientPhoneHangupMessage
* Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP
*/
struct GNUNET_MessageHeader header;
-
+
/* followed by variable length 0-terminated string with meta data */
};
@@ -190,7 +190,7 @@ struct ClientPhonePickedupMessage
* Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP
*/
struct GNUNET_MessageHeader header;
-
+
/* followed by variable length 0-terminated string with meta data */
};
@@ -233,7 +233,7 @@ struct MeshPhoneRingMessage
/**
* When does the signature expire?
- */
+ */
struct GNUNET_TIME_AbsoluteNBO expiration_time;
/**
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c
index 11eb2b7e7..6e1cbe3fb 100644
--- a/src/conversation/conversation_api.c
+++ b/src/conversation/conversation_api.c
@@ -1,17 +1,17 @@
/*
This file is part of GNUnet
(C) 2013 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
-
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -75,7 +75,7 @@ struct GNUNET_CONVERSATION_Phone
* Our configuration.
*/
const struct GNUNET_CONFIGURATION_Handle *cfg;
-
+
/**
* Handle to talk with CONVERSATION service.
*/
@@ -103,7 +103,7 @@ struct GNUNET_CONVERSATION_Phone
/**
* Connection to NAMESTORE (for reverse lookup).
- */
+ */
struct GNUNET_NAMESTORE_Handle *ns;
/**
@@ -119,7 +119,7 @@ struct GNUNET_CONVERSATION_Phone
/**
* This phone's record.
*/
- struct GNUNET_CONVERSATION_PhoneRecord my_record;
+ struct GNUNET_CONVERSATION_PhoneRecord my_record;
/**
* My GNS zone.
@@ -316,7 +316,7 @@ handle_phone_audio_message (void *cls,
/**
- * We encountered an error talking with the conversation service.
+ * We encountered an error talking with the conversation service.
*
* @param cls the `struct GNUNET_CONVERSATION_Phone`
* @param error details about the error
@@ -326,7 +326,7 @@ phone_error_handler (void *cls,
enum GNUNET_MQ_Error error)
{
struct GNUNET_CONVERSATION_Phone *phone = cls;
-
+
GNUNET_break (0);
FPRINTF (stderr,
_("Internal error %d\n"),
@@ -346,15 +346,15 @@ reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone)
static struct GNUNET_MQ_MessageHandler handlers[] =
{
{ &handle_phone_ring,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
sizeof (struct ClientPhoneRingMessage) },
{ &handle_phone_hangup,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
0 },
{ &handle_phone_audio_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
- 0 },
- { NULL, 0, 0 }
+ 0 },
+ { NULL, 0, 0 }
};
struct GNUNET_MQ_Envelope *e;
struct ClientPhoneRegisterMessage *reg;
@@ -408,7 +408,7 @@ GNUNET_CONVERSATION_phone_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
unsigned long long line;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (cfg,
+ GNUNET_CONFIGURATION_get_value_number (cfg,
"CONVERSATION",
"LINE",
&line))
@@ -478,7 +478,7 @@ transmit_phone_audio (void *cls,
struct ClientAudioMessage *am;
GNUNET_assert (PS_ACTIVE == phone->state);
- e = GNUNET_MQ_msg_extra (am,
+ e = GNUNET_MQ_msg_extra (am,
data_size,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
memcpy (&am[1], data, data_size);
@@ -487,7 +487,7 @@ transmit_phone_audio (void *cls,
/**
- * Picks up a (ringing) phone. This will connect the speaker
+ * Picks up a (ringing) phone. This will connect the speaker
* to the microphone of the other party, and vice versa.
*
* @param phone phone to pick up
@@ -630,7 +630,7 @@ struct GNUNET_CONVERSATION_Call
* Our configuration.
*/
const struct GNUNET_CONFIGURATION_Handle *cfg;
-
+
/**
* Handle to talk with CONVERSATION service.
*/
@@ -655,7 +655,7 @@ struct GNUNET_CONVERSATION_Call
* Our microphone.
*/
struct GNUNET_MICROPHONE_Handle *mic;
-
+
/**
* Function to call with events.
*/
@@ -673,7 +673,7 @@ struct GNUNET_CONVERSATION_Call
/**
* Connection to GNS (can be NULL).
- */
+ */
struct GNUNET_GNS_Handle *gns;
/**
@@ -754,7 +754,7 @@ transmit_call_audio (void *cls,
struct ClientAudioMessage *am;
GNUNET_assert (CS_ACTIVE == call->state);
- e = GNUNET_MQ_msg_extra (am,
+ e = GNUNET_MQ_msg_extra (am,
data_size,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
memcpy (&am[1], data, data_size);
@@ -782,7 +782,7 @@ handle_call_picked_up (void *cls,
metadata = (const char *) &am[1];
if ( (0 == size) ||
('\0' != metadata[size - 1]) )
- metadata = NULL;
+ metadata = NULL;
switch (call->state)
{
case CS_LOOKUP:
@@ -830,7 +830,7 @@ handle_call_hangup (void *cls,
reason = (const char *) &am[1];
if ( (0 == size) ||
('\0' != reason[size - 1]) )
- reason = NULL;
+ reason = NULL;
switch (call->state)
{
case CS_LOOKUP:
@@ -900,7 +900,7 @@ handle_call_audio_message (void *cls,
* @param rd_count number of records in @a rd
* @param rd the records in reply
*/
-static void
+static void
handle_gns_response (void *cls,
uint32_t rd_count,
const struct GNUNET_NAMESTORE_RecordData *rd)
@@ -919,7 +919,7 @@ handle_gns_response (void *cls,
{
GNUNET_break_op (0);
continue;
- }
+ }
memcpy (&call->phone_record,
rd[i].data,
rd[i].data_size);
@@ -942,7 +942,7 @@ handle_gns_response (void *cls,
/**
- * We encountered an error talking with the conversation service.
+ * We encountered an error talking with the conversation service.
*
* @param cls the `struct GNUNET_CONVERSATION_Call`
* @param error details about the error
@@ -972,18 +972,18 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call)
static struct GNUNET_MQ_MessageHandler handlers[] =
{
{ &handle_call_busy,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_BUSY,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_BUSY,
sizeof (struct ClientPhoneBusyMessage) },
{ &handle_call_picked_up,
- GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
+ GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
0 },
{ &handle_call_hangup,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
0 },
{ &handle_call_audio_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
- 0 },
- { NULL, 0, 0 }
+ 0 },
+ { NULL, 0, 0 }
};
struct GNUNET_CRYPTO_EccPublicSignKey my_zone;
@@ -1013,7 +1013,7 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call)
call->state = CS_LOOKUP;
GNUNET_IDENTITY_ego_get_public_key (call->caller_id,
&my_zone);
- call->gns_lookup = GNUNET_GNS_lookup (call->gns,
+ call->gns_lookup = GNUNET_GNS_lookup (call->gns,
call->callee,
&my_zone,
GNUNET_NAMESTORE_TYPE_PHONE,
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c
index 1f44ca1fc..cc831a3ab 100644
--- a/src/conversation/gnunet-conversation-test.c
+++ b/src/conversation/gnunet-conversation-test.c
@@ -25,8 +25,8 @@
*/
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_speaker_lib.h"
-#include "gnunet_microphone_lib.h"
+#include "gnunet_speaker_lib.h"
+#include "gnunet_microphone_lib.h"
/**
* How long do we record before we replay?
@@ -117,7 +117,7 @@ do_shutdown (void *cls,
rec);
GNUNET_free (rec);
}
- fprintf (stderr,
+ fprintf (stderr,
_("\nEnd of transmission. Have a GNU day.\n"));
}
@@ -145,7 +145,7 @@ switch_to_speaker (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
- fprintf (stderr,
+ fprintf (stderr,
_("\nWe are now playing your recording back. If you can hear it, your audio settings are working..."));
for (rec=rec_head; NULL != rec; rec = rec->next)
{
@@ -170,7 +170,7 @@ switch_to_speaker (void *cls,
* @param data_size number of bytes in @a data
* @param data audio data to play
*/
-static void
+static void
record (void *cls,
size_t data_size,
const void *data)
@@ -211,7 +211,7 @@ run (void *cls, char *const *args, const char *cfgfile,
st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&do_shutdown,
NULL);
- fprintf (stderr,
+ fprintf (stderr,
_("We will now be recording you for %s. After that time, the recording will be played back to you..."),
GNUNET_STRINGS_relative_time_to_string (TIMEOUT, GNUNET_YES));
if (GNUNET_OK !=
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c
index ad91d3007..113c10098 100644
--- a/src/conversation/gnunet-conversation.c
+++ b/src/conversation/gnunet-conversation.c
@@ -1,17 +1,17 @@
/*
This file is part of GNUnet.
(C) 2013 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
-
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -173,7 +173,7 @@ phone_event_handler (void *cls,
...)
{
va_list va;
-
+
va_start (va, code);
switch (code)
{
@@ -268,7 +268,7 @@ call_event_handler (void *cls,
...)
{
va_list va;
-
+
va_start (va, code);
switch (code)
{
@@ -338,7 +338,7 @@ struct VoipCommand
* Command the user needs to enter.
*/
const char *command;
-
+
/**
* Function to call on command.
*/
@@ -380,8 +380,8 @@ do_quit (const char *args)
static void
do_unknown (const char *msg)
{
- FPRINTF (stderr,
- _("Unknown command `%s'\n"),
+ FPRINTF (stderr,
+ _("Unknown command `%s'\n"),
msg);
}
@@ -403,7 +403,7 @@ do_call (const char *arg)
}
switch (state)
{
- case CS_LOOKUP_EGO:
+ case CS_LOOKUP_EGO:
FPRINTF (stderr,
_("Ego `%s' not available\n"),
ego_name);
@@ -470,7 +470,7 @@ do_accept (const char *args)
{
switch (state)
{
- case CS_LOOKUP_EGO:
+ case CS_LOOKUP_EGO:
case CS_LISTEN:
case CS_ERROR:
FPRINTF (stderr,
@@ -497,7 +497,7 @@ do_accept (const char *args)
return;
}
GNUNET_assert (NULL != phone);
- GNUNET_CONVERSATION_phone_pick_up (phone,
+ GNUNET_CONVERSATION_phone_pick_up (phone,
args,
speaker,
mic);
@@ -536,7 +536,7 @@ do_status (const char *args)
{
switch (state)
{
- case CS_LOOKUP_EGO:
+ case CS_LOOKUP_EGO:
FPRINTF (stdout,
_("We are currently trying to locate the private key for the ego `%s'.\n"),
ego_name);
@@ -586,7 +586,7 @@ do_reject (const char *args)
{
switch (state)
{
- case CS_LOOKUP_EGO:
+ case CS_LOOKUP_EGO:
case CS_LISTEN:
case CS_ERROR:
FPRINTF (stderr,
@@ -604,7 +604,7 @@ do_reject (const char *args)
if (NULL == call)
{
GNUNET_assert (NULL != phone);
- GNUNET_CONVERSATION_phone_hang_up (phone,
+ GNUNET_CONVERSATION_phone_hang_up (phone,
args);
state = CS_LISTEN;
}
@@ -621,9 +621,9 @@ do_reject (const char *args)
* List of supported commands.
*/
static struct VoipCommand commands[] = {
- {"/address", &do_address,
+ {"/address", &do_address,
gettext_noop ("Use `/address' to find out which address this phone should have in GNS")},
- {"/call", &do_call,
+ {"/call", &do_call,
gettext_noop ("Use `/call USER.gnu' to call USER")},
{"/accept", &do_accept,
gettext_noop ("Use `/accept MESSAGE' to accept an incoming call")},
@@ -631,11 +631,11 @@ static struct VoipCommand commands[] = {
gettext_noop ("Use `/cancel MESSAGE' to reject or terminate a call")},
{"/status", &do_status,
gettext_noop ("Use `/status' to print status information")},
- {"/quit", &do_quit,
+ {"/quit", &do_quit,
gettext_noop ("Use `/quit' to terminate gnunet-conversation")},
{"/help", &do_help,
gettext_noop ("Use `/help command' to get help for a specific command")},
- {"", &do_unknown,
+ {"", &do_unknown,
NULL},
{NULL, NULL, NULL},
};
@@ -650,8 +650,8 @@ static void
do_help (const char *args)
{
unsigned int i;
-
- i = 0;
+
+ i = 0;
while ( (NULL != args) &&
(0 != strlen (args)) &&
(commands[i].Action != &do_help))
@@ -659,7 +659,7 @@ do_help (const char *args)
if (0 ==
strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1))
{
- FPRINTF (stdout,
+ FPRINTF (stdout,
"%s\n",
gettext (commands[i].helptext));
return;
@@ -667,13 +667,13 @@ do_help (const char *args)
i++;
}
i = 0;
- FPRINTF (stdout,
- "%s",
+ FPRINTF (stdout,
+ "%s",
"Available commands:\n");
while (commands[i].Action != &do_help)
{
- FPRINTF (stdout,
- "%s\n",
+ FPRINTF (stdout,
+ "%s\n",
gettext (commands[i].command));
i++;
}
@@ -710,7 +710,7 @@ do_stop_task (void *cls,
{
GNUNET_SCHEDULER_cancel (handle_cmd_task);
handle_cmd_task = GNUNET_SCHEDULER_NO_TASK;
- }
+ }
if (NULL != id)
{
GNUNET_IDENTITY_disconnect (id);
@@ -799,7 +799,7 @@ identity_cb (void *cls,
ego_name))
return;
if (NULL == ego)
- {
+ {
if (verbose)
FPRINTF (stdout,
_("Our ego `%s' was deleted!\n"),
@@ -826,7 +826,7 @@ identity_cb (void *cls,
*/
static void
run (void *cls,
- char *const *args,
+ char *const *args,
const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
@@ -851,7 +851,7 @@ run (void *cls,
}
-/**
+/**
* The main function to conversation.
*
* @param argc number of arguments from the command line
diff --git a/src/conversation/gnunet-helper-audio-playback.c b/src/conversation/gnunet-helper-audio-playback.c
index c0ef217cd..97abd4430 100644
--- a/src/conversation/gnunet-helper-audio-playback.c
+++ b/src/conversation/gnunet-helper-audio-playback.c
@@ -102,7 +102,7 @@ static int ready_pipe[2];
* Message callback
*/
static int
-stdin_receiver (void *cls,
+stdin_receiver (void *cls,
void *client,
const struct GNUNET_MessageHeader *msg)
{
@@ -113,7 +113,7 @@ stdin_receiver (void *cls,
{
case GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO:
audio = (struct AudioMessage *) msg;
-
+
ret = opus_decode_float (dec,
(const unsigned char *) &audio[1],
ntohs (audio->header.size) - sizeof (struct AudioMessage),
@@ -132,12 +132,12 @@ stdin_receiver (void *cls,
if (pa_stream_write
(stream_out, pcm_buffer, pcm_length, NULL, 0,
PA_SEEK_RELATIVE) < 0)
- {
+ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_stream_write() failed: %s\n"),
pa_strerror (pa_context_errno (context)));
return GNUNET_OK;
- }
+ }
break;
default:
break;
@@ -161,8 +161,8 @@ quit (int ret)
* Callback when data is there for playback
*/
static void
-stream_write_callback (pa_stream * s,
- size_t length,
+stream_write_callback (pa_stream * s,
+ size_t length,
void *userdata)
{
/* unblock 'main' */
@@ -192,7 +192,7 @@ exit_signal_callback (pa_mainloop_api * m, pa_signal_event * e, int sig,
* Pulseaudio stream state callback
*/
static void
-context_state_callback (pa_context * c,
+context_state_callback (pa_context * c,
void *userdata)
{
int p;
@@ -203,7 +203,7 @@ context_state_callback (pa_context * c,
case PA_CONTEXT_CONNECTING:
case PA_CONTEXT_AUTHORIZING:
case PA_CONTEXT_SETTING_NAME:
- break;
+ break;
case PA_CONTEXT_READY:
{
GNUNET_assert (!stream_out);
@@ -216,12 +216,12 @@ context_state_callback (pa_context * c,
_("pa_stream_new() failed: %s\n"),
pa_strerror (pa_context_errno (c)));
goto fail;
- }
- pa_stream_set_write_callback (stream_out,
+ }
+ pa_stream_set_write_callback (stream_out,
&stream_write_callback,
NULL);
if ((p =
- pa_stream_connect_playback (stream_out, NULL,
+ pa_stream_connect_playback (stream_out, NULL,
NULL,
PA_STREAM_ADJUST_LATENCY | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE,
NULL, NULL)) < 0)
@@ -232,19 +232,19 @@ context_state_callback (pa_context * c,
goto fail;
}
break;
- }
+ }
case PA_CONTEXT_TERMINATED:
quit (0);
break;
-
+
case PA_CONTEXT_FAILED:
default:
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Connection failure: %s\n"),
pa_strerror (pa_context_errno (c)));
goto fail;
- }
- return;
+ }
+ return;
fail:
quit (1);
}
@@ -260,13 +260,13 @@ pa_init ()
if (!pa_sample_spec_valid (&sample_spec))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Wrong Spec\n"));
- }
- /* set up threaded playback mainloop */
+ }
+ /* set up threaded playback mainloop */
if (!(m = pa_threaded_mainloop_new ()))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_mainloop_new() failed.\n"));
}
mainloop_api = pa_threaded_mainloop_get_api (m);
@@ -280,9 +280,9 @@ pa_init ()
/* connect to the main pulseaudio context */
if (!(context = pa_context_new (mainloop_api, "GNUnet VoIP")))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_context_new() failed.\n"));
- }
+ }
pa_context_set_state_callback (context, context_state_callback, NULL);
if (pa_context_connect (context, NULL, 0, NULL) < 0)
@@ -290,10 +290,10 @@ pa_init ()
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_context_connect() failed: %s\n"),
pa_strerror (pa_context_errno (context)));
- }
+ }
if (pa_threaded_mainloop_start (m) < 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_mainloop_run() failed.\n"));
}
}
@@ -354,7 +354,7 @@ main (int argc, char *argv[])
ready_pipe[1] = -1;
while (1)
{
- ret = read (0, readbuf, sizeof (readbuf));
+ ret = read (0, readbuf, sizeof (readbuf));
toff += ret;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %d bytes of audio data (total: %llu)\n",
@@ -363,10 +363,10 @@ main (int argc, char *argv[])
if (0 > ret)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Read error from STDIN: %s\n"),
+ _("Read error from STDIN: %s\n"),
strerror (errno));
break;
- }
+ }
if (0 == ret)
break;
GNUNET_SERVER_mst_receive (stdin_mst, NULL,
diff --git a/src/conversation/gnunet-helper-audio-record.c b/src/conversation/gnunet-helper-audio-record.c
index 54c9b7909..5e42de2b5 100644
--- a/src/conversation/gnunet-helper-audio-record.c
+++ b/src/conversation/gnunet-helper-audio-record.c
@@ -92,7 +92,7 @@ static unsigned char *opus_data;
static float *pcm_buffer;
/**
- * Length of the pcm data needed for one OPUS frame
+ * Length of the pcm data needed for one OPUS frame
*/
static int pcm_length;
@@ -151,7 +151,7 @@ packetizer ()
size_t off;
ssize_t ret;
int len; // FIXME: int?
- size_t msg_size;
+ size_t msg_size;
while (transmit_buffer_length >= transmit_buffer_index + pcm_length)
{
@@ -195,9 +195,9 @@ packetizer ()
if (0 != new_size)
{
nbuf = pa_xmalloc (new_size);
- memmove (nbuf,
+ memmove (nbuf,
&transmit_buffer[transmit_buffer_index],
- new_size);
+ new_size);
pa_xfree (transmit_buffer);
transmit_buffer = nbuf;
}
@@ -207,7 +207,7 @@ packetizer ()
transmit_buffer = NULL;
}
transmit_buffer_index = 0;
- transmit_buffer_length = new_size;
+ transmit_buffer_length = new_size;
}
@@ -216,7 +216,7 @@ packetizer ()
*/
static void
stream_read_callback (pa_stream * s,
- size_t length,
+ size_t length,
void *userdata)
{
const void *data;
@@ -233,7 +233,7 @@ stream_read_callback (pa_stream * s,
if (pa_stream_peek (s, (const void **) &data, &length) < 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_stream_peek() failed: %s\n"),
pa_strerror (pa_context_errno (context)));
quit (1);
@@ -243,9 +243,9 @@ stream_read_callback (pa_stream * s,
GNUNET_assert (length > 0);
if (NULL != transmit_buffer)
{
- transmit_buffer = pa_xrealloc (transmit_buffer,
+ transmit_buffer = pa_xrealloc (transmit_buffer,
transmit_buffer_length + length);
- memcpy (&transmit_buffer[transmit_buffer_length],
+ memcpy (&transmit_buffer[transmit_buffer_length],
data,
length);
transmit_buffer_length += length;
@@ -266,12 +266,12 @@ stream_read_callback (pa_stream * s,
* Exit callback for SIGTERM and SIGINT
*/
static void
-exit_signal_callback (pa_mainloop_api * m,
- pa_signal_event * e,
+exit_signal_callback (pa_mainloop_api * m,
+ pa_signal_event * e,
int sig,
void *userdata)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Got signal, exiting.\n"));
quit (1);
}
@@ -289,17 +289,17 @@ stream_state_callback (pa_stream * s, void *userdata)
{
case PA_STREAM_CREATING:
case PA_STREAM_TERMINATED:
- break;
+ break;
case PA_STREAM_READY:
{
const pa_buffer_attr *a;
char cmt[PA_CHANNEL_MAP_SNPRINT_MAX],
sst[PA_SAMPLE_SPEC_SNPRINT_MAX];
-
+
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Stream successfully created.\n"));
-
+
if (!(a = pa_stream_get_buffer_attr (s)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -313,24 +313,24 @@ stream_state_callback (pa_stream * s, void *userdata)
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Buffer metrics: maxlength=%u, fragsize=%u\n"),
a->maxlength, a->fragsize);
- }
+ }
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Using sample spec '%s', channel map '%s'.\n"),
pa_sample_spec_snprint (sst, sizeof (sst),
pa_stream_get_sample_spec (s)),
pa_channel_map_snprint (cmt, sizeof (cmt),
pa_stream_get_channel_map (s)));
-
+
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Connected to device %s (%u, %ssuspended).\n"),
pa_stream_get_device_name (s),
pa_stream_get_device_index (s),
pa_stream_is_suspended (s) ? "" : "not ");
- }
+ }
break;
case PA_STREAM_FAILED:
default:
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Stream error: %s\n"),
pa_strerror (pa_context_errno (pa_stream_get_context (s))));
quit (1);
@@ -357,9 +357,9 @@ context_state_callback (pa_context * c,
{
int r;
pa_buffer_attr na;
-
- GNUNET_assert (!stream_in);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+
+ GNUNET_assert (!stream_in);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Connection established.\n"));
if (! (stream_in =
pa_stream_new (c, "GNUNET_VoIP recorder", &sample_spec, NULL)))
@@ -374,7 +374,7 @@ context_state_callback (pa_context * c,
memset (&na, 0, sizeof (na));
na.maxlength = UINT32_MAX;
na.fragsize = pcm_length;
- if ((r = pa_stream_connect_record (stream_in, NULL, &na,
+ if ((r = pa_stream_connect_record (stream_in, NULL, &na,
PA_STREAM_ADJUST_LATENCY)) < 0)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -382,12 +382,12 @@ context_state_callback (pa_context * c,
pa_strerror (pa_context_errno (c)));
goto fail;
}
-
+
break;
- }
+ }
case PA_CONTEXT_TERMINATED:
quit (0);
- break;
+ break;
case PA_CONTEXT_FAILED:
default:
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -413,13 +413,13 @@ pa_init ()
if (!pa_sample_spec_valid (&sample_spec))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Wrong Spec\n"));
}
/* set up main record loop */
if (!(m = pa_mainloop_new ()))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_mainloop_new() failed.\n"));
}
mainloop_api = pa_mainloop_get_api (m);
@@ -434,9 +434,9 @@ pa_init ()
if (!(context = pa_context_new (mainloop_api, "GNUNET VoIP")))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_context_new() failed.\n"));
- }
+ }
pa_context_set_state_callback (context, &context_state_callback, NULL);
if (pa_context_connect (context, NULL, 0, NULL) < 0)
{
@@ -446,7 +446,7 @@ pa_init ()
}
if (pa_mainloop_run (m, &i) < 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("pa_mainloop_run() failed.\n"));
}
}
@@ -466,7 +466,7 @@ opus_init ()
pcm_buffer = pa_xmalloc (pcm_length);
opus_data = GNUNET_malloc (max_payload_bytes);
enc = opus_encoder_create (SAMPLING_RATE,
- channels,
+ channels,
OPUS_APPLICATION_VOIP,
&err);
opus_encoder_ctl (enc,
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index 85bbc0481..d19be5318 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -1,17 +1,17 @@
/*
This file is part of GNUnet.
(C) 2013 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
-
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -105,7 +105,7 @@ struct Line
* Handle for the reliable tunnel (contol data)
*/
struct GNUNET_MESH_Tunnel *tunnel_reliable;
-
+
/**
* Handle for unreliable tunnel (audio data)
*/
@@ -153,7 +153,7 @@ struct Line
/**
* Current status of this line.
- */
+ */
enum LineStatus status;
};
@@ -374,7 +374,7 @@ mq_done_finish_caller_shutdown (void *cls)
case LS_CALLER_SHUTDOWN:
destroy_line_mesh_tunnels (line);
break;
- }
+ }
}
@@ -536,7 +536,7 @@ transmit_line_audio (void *cls,
{
struct Line *line = cls;
struct MeshAudioMessage *mam = buf;
-
+
line->unreliable_mth = NULL;
if ( (NULL == buf) ||
(size < sizeof (struct MeshAudioMessage) + line->audio_size) )
@@ -553,7 +553,7 @@ transmit_line_audio (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending %u bytes of audio data via mesh\n",
line->audio_size);
- return sizeof (struct MeshAudioMessage) + line->audio_size;
+ return sizeof (struct MeshAudioMessage) + line->audio_size;
}
@@ -610,7 +610,7 @@ handle_client_audio_message (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO | GNUNET_ERROR_TYPE_BULK,
_("Mesh audio channel not ready; audio data dropped\n"));
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
}
if (NULL != line->unreliable_mth)
@@ -632,7 +632,7 @@ handle_client_audio_message (void *cls,
line->unreliable_mth = GNUNET_MESH_notify_transmit_ready (line->tunnel_unreliable,
GNUNET_NO,
GNUNET_TIME_UNIT_FOREVER_REL,
- sizeof (struct MeshAudioMessage)
+ sizeof (struct MeshAudioMessage)
+ line->audio_size,
&transmit_line_audio,
line);
@@ -641,7 +641,7 @@ handle_client_audio_message (void *cls,
/**
- * We are done signalling shutdown to the other peer.
+ * We are done signalling shutdown to the other peer.
* Destroy the tunnel.
*
* @param cls the `struct GNUNET_MESH_tunnel` to destroy
@@ -650,7 +650,7 @@ static void
mq_done_destroy_tunnel (void *cls)
{
struct GNUNET_MESH_Tunnel *tunnel = cls;
-
+
GNUNET_MESH_tunnel_destroy (tunnel);
}
@@ -675,7 +675,7 @@ handle_mesh_ring_message (void *cls,
struct GNUNET_MQ_Envelope *e;
struct MeshPhoneBusyMessage *busy;
struct ClientPhoneRingMessage cring;
-
+
msg = (const struct MeshPhoneRingMessage *) message;
if ( (msg->purpose.size != htonl (sizeof (struct GNUNET_PeerIdentity) * 2 +
sizeof (struct GNUNET_TIME_AbsoluteNBO) +
@@ -690,11 +690,11 @@ handle_mesh_ring_message (void *cls,
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- for (line = lines_head; NULL != line; line = line->next)
+ for (line = lines_head; NULL != line; line = line->next)
if ( (line->local_line == ntohl (msg->remote_line)) &&
(LS_CALLEE_LISTEN == line->status) )
break;
- if (NULL == line)
+ if (NULL == line)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("No available phone for incoming call on line %u, sending BUSY signal\n"),
@@ -748,7 +748,7 @@ handle_mesh_hangup_message (void *cls,
size_t len = ntohs (message->size) - sizeof (struct MeshPhoneHangupMessage);
char buf[len + sizeof (struct ClientPhoneHangupMessage)];
struct ClientPhoneHangupMessage *hup;
-
+
msg = (const struct MeshPhoneHangupMessage *) message;
len = ntohs (msg->header.size) - sizeof (struct MeshPhoneHangupMessage);
reason = (const char *) &msg[1];
@@ -831,7 +831,7 @@ handle_mesh_pickup_message (void *cls,
size_t len = ntohs (message->size) - sizeof (struct MeshPhonePickupMessage);
char buf[len + sizeof (struct ClientPhonePickupMessage)];
struct ClientPhonePickupMessage *pick;
-
+
msg = (const struct MeshPhonePickupMessage *) message;
len = ntohs (msg->header.size) - sizeof (struct MeshPhonePickupMessage);
metadata = (const char *) &msg[1];
@@ -895,7 +895,7 @@ handle_mesh_pickup_message (void *cls,
if (NULL == line->tunnel_unreliable)
{
GNUNET_break (0);
- }
+ }
return GNUNET_OK;
}
@@ -988,7 +988,7 @@ handle_mesh_audio_message (void *cls,
char buf[msize + sizeof (struct ClientAudioMessage)];
struct ClientAudioMessage *cam;
const union GNUNET_MESH_TunnelInfo *info;
-
+
msg = (const struct MeshAudioMessage *) message;
if (NULL == line)
{
@@ -1014,7 +1014,7 @@ handle_mesh_audio_message (void *cls,
"Received AUDIO data for non-existing line %u, dropping.\n",
ntohl (msg->remote_line));
return GNUNET_SYSERR;
- }
+ }
line->tunnel_unreliable = tunnel;
*tunnel_ctx = line;
}
@@ -1047,11 +1047,11 @@ handle_mesh_audio_message (void *cls,
static void *
inbound_tunnel (void *cls,
struct GNUNET_MESH_Tunnel *tunnel,
- const struct GNUNET_PeerIdentity *initiator,
+ const struct GNUNET_PeerIdentity *initiator,
uint32_t port)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Received incoming tunnel on port %u\n"),
+ _("Received incoming tunnel on port %u\n"),
(unsigned int) port);
return NULL;
}
@@ -1131,7 +1131,7 @@ inbound_end (void *cls,
* @param client identification of the client
*/
static void
-handle_client_disconnect (void *cls,
+handle_client_disconnect (void *cls,
struct GNUNET_SERVER_Client *client)
{
struct Line *line;
@@ -1155,7 +1155,7 @@ handle_client_disconnect (void *cls,
/**
* Shutdown nicely
- *
+ *
* @param cls closure, NULL
* @param tc the task context
*/
@@ -1184,7 +1184,7 @@ do_shutdown (void *cls,
* @param c configuration
*/
static void
-run (void *cls,
+run (void *cls,
struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *c)
{
@@ -1210,23 +1210,23 @@ run (void *cls,
{&handle_mesh_ring_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_RING,
sizeof (struct MeshPhoneRingMessage)},
- {&handle_mesh_hangup_message,
+ {&handle_mesh_hangup_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_HANG_UP,
0},
- {&handle_mesh_pickup_message,
+ {&handle_mesh_pickup_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_PICK_UP,
0},
- {&handle_mesh_busy_message,
+ {&handle_mesh_busy_message,
GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_BUSY,
sizeof (struct MeshPhoneBusyMessage)},
{&handle_mesh_audio_message, GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_AUDIO,
0},
{NULL, 0, 0}
};
- static uint32_t ports[] = {
+ static uint32_t ports[] = {
GNUNET_APPLICATION_TYPE_CONVERSATION_CONTROL,
GNUNET_APPLICATION_TYPE_CONVERSATION_AUDIO,
- 0
+ 0
};
cfg = c;
@@ -1236,8 +1236,8 @@ run (void *cls,
mesh = GNUNET_MESH_connect (cfg,
NULL,
&inbound_tunnel,
- &inbound_end,
- mesh_handlers,
+ &inbound_end,
+ mesh_handlers,
ports);
if (NULL == mesh)
@@ -1249,7 +1249,7 @@ run (void *cls,
nc = GNUNET_SERVER_notification_context_create (server, 16);
GNUNET_SERVER_add_handlers (server, server_handlers);
GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&do_shutdown,
NULL);
}
@@ -1263,12 +1263,12 @@ run (void *cls,
* @return 0 ok, 1 on error
*/
int
-main (int argc,
+main (int argc,
char *const *argv)
{
return (GNUNET_OK ==
GNUNET_SERVICE_run (argc, argv,
- "conversation",
+ "conversation",
GNUNET_SERVICE_OPTION_NONE,
&run, NULL)) ? 0 : 1;
}
diff --git a/src/conversation/microphone.c b/src/conversation/microphone.c
index 2c399c74d..bc6044120 100644
--- a/src/conversation/microphone.c
+++ b/src/conversation/microphone.c
@@ -1,17 +1,17 @@
/*
This file is part of GNUnet
(C) 2013 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
-
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -101,8 +101,8 @@ enable (void *cls,
GNUNET_MICROPHONE_RecordedDataCallback rdc,
void *rdc_cls)
{
- struct Microphone *mic = cls;
- static char * const record_helper_argv[] =
+ struct Microphone *mic = cls;
+ static char * const record_helper_argv[] =
{
"gnunet-helper-audio-record",
NULL
@@ -113,14 +113,14 @@ enable (void *cls,
mic->record_helper = GNUNET_HELPER_start (GNUNET_NO,
"gnunet-helper-audio-record",
record_helper_argv,
- &process_record_messages,
- NULL, mic);
+ &process_record_messages,
+ NULL, mic);
if (NULL == mic->record_helper)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Could not start record audio helper\n"));
return GNUNET_SYSERR;
- }
+ }
return GNUNET_OK;
}
diff --git a/src/conversation/speaker.c b/src/conversation/speaker.c
index d67346f1f..0f8661834 100644
--- a/src/conversation/speaker.c
+++ b/src/conversation/speaker.c
@@ -1,17 +1,17 @@
/*
This file is part of GNUnet
(C) 2013 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
-
+
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -57,17 +57,17 @@ struct Speaker
static int
enable (void *cls)
{
- struct Speaker *spe = cls;
- static char *playback_helper_argv[] =
+ struct Speaker *spe = cls;
+ static char *playback_helper_argv[] =
{
"gnunet-helper-audio-playback",
NULL
};
-
+
spe->playback_helper = GNUNET_HELPER_start (GNUNET_NO,
"gnunet-helper-audio-playback",
playback_helper_argv,
- NULL,
+ NULL,
NULL, spe);
if (NULL == spe->playback_helper)
{
@@ -143,8 +143,8 @@ play (void *cls,
am->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO);
memcpy (&am[1], data, data_size);
(void) GNUNET_HELPER_send (spe->playback_helper,
- &am->header,
- GNUNET_NO,
+ &am->header,
+ GNUNET_NO,
NULL, NULL);
}
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c
index af2ff75e4..d18616721 100644
--- a/src/conversation/test_conversation_api.c
+++ b/src/conversation/test_conversation_api.c
@@ -76,7 +76,7 @@ check ()
int
main (int argc, char *argv[])
{
- GNUNET_log_setup ("test_conversation_api",
+ GNUNET_log_setup ("test_conversation_api",
"WARNING",
NULL);
return check ();
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 8b9389bdf..7aa3e0519 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -357,7 +357,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return #GNUNET_YES (continue)
*/
static int
-disconnect_and_free_peer_entry (void *cls,
+disconnect_and_free_peer_entry (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -572,7 +572,7 @@ transmission_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @param cls closure with the 'struct GNUNET_CORE_Handle'
* @param size number of bytes available in @a buf
* @param buf where the callee should write the message
- * @return number of bytes written to buf
+ * @return number of bytes written to buf
*/
static size_t
transmit_message (void *cls, size_t size, void *buf)
@@ -649,7 +649,7 @@ transmit_message (void *cls, size_t size, void *buf)
ret =
th->get_message (th->get_message_cls,
size - sizeof (struct SendMessage), &sm[1]);
-
+
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting SEND request to `%s' yielded %u bytes.\n",
GNUNET_i2s (&pr->peer), ret);
@@ -1093,7 +1093,7 @@ reconnect (struct GNUNET_CORE_Handle *h)
else
opt |= GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND;
}
- LOG (GNUNET_ERROR_TYPE_INFO,
+ LOG (GNUNET_ERROR_TYPE_INFO,
"(Re)connecting to CORE service, monitoring messages of type %u\n",
opt);
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c
index cfdae33bf..4dbe49c50 100644
--- a/src/core/gnunet-core.c
+++ b/src/core/gnunet-core.c
@@ -72,7 +72,7 @@ shutdown_task (void *cls,
* @param peer peer identity this notification is about
*/
static void
-connected_peer_callback (void *cls,
+connected_peer_callback (void *cls,
const struct GNUNET_PeerIdentity *peer)
{
if (NULL == peer)
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 5665fc82a..ada9b7bd9 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -58,7 +58,7 @@ static struct GNUNET_SERVER_Handle *GSC_server;
/**
* Last task run during shutdown. Disconnects us from
* the transport.
- *
+ *
* @param cls NULL, unused
* @param tc scheduler context, unused
*/
@@ -114,7 +114,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
pk = GNUNET_CRYPTO_ecc_key_create_from_file (keyfile);
GNUNET_free (keyfile);
GNUNET_assert (NULL != pk);
- if ((GNUNET_OK != GSC_KX_init (pk)) ||
+ if ((GNUNET_OK != GSC_KX_init (pk)) ||
(GNUNET_OK != GSC_NEIGHBOURS_init ()))
{
GNUNET_SCHEDULER_shutdown ();
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index bcbb56ef3..55ebb9132 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -517,7 +517,7 @@ client_tokenizer_callback (void *cls, void *client,
GNUNET_snprintf (buf, sizeof (buf),
gettext_noop ("# bytes of messages of type %u received"),
(unsigned int) ntohs (message->type));
- GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO);
+ GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO);
if (0 ==
memcmp (&car->target, &GSC_my_identity,
sizeof (struct GNUNET_PeerIdentity)))
@@ -536,7 +536,7 @@ client_tokenizer_callback (void *cls, void *client,
GNUNET_CORE_OPTION_SEND_FULL_INBOUND);
GSC_CLIENTS_deliver_message (&GSC_my_identity, message,
sizeof (struct GNUNET_MessageHeader),
- GNUNET_CORE_OPTION_SEND_HDR_INBOUND);
+ GNUNET_CORE_OPTION_SEND_HDR_INBOUND);
}
else
{
@@ -548,7 +548,7 @@ client_tokenizer_callback (void *cls, void *client,
GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND);
GSC_CLIENTS_deliver_message (&car->target, message,
sizeof (struct GNUNET_MessageHeader),
- GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND);
+ GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND);
GSC_SESSIONS_transmit (car, message, tc->cork);
}
return GNUNET_OK;
@@ -564,7 +564,7 @@ client_tokenizer_callback (void *cls, void *client,
* @return #GNUNET_YES (continue iteration)
*/
static int
-destroy_active_client_request (void *cls,
+destroy_active_client_request (void *cls,
const struct GNUNET_PeerIdentity *key,
void *value)
{
@@ -765,7 +765,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity
struct GSC_Client *c;
for (c = client_head; c != NULL; c = c->next)
- GSC_CLIENTS_notify_client_about_neighbour (c, neighbour,
+ GSC_CLIENTS_notify_client_about_neighbour (c, neighbour,
tmap_old, tmap_new);
}
@@ -784,7 +784,7 @@ GSC_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity
void
GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
const struct GNUNET_MessageHeader *msg,
- uint16_t msize,
+ uint16_t msize,
uint32_t options)
{
size_t size = msize + sizeof (struct NotifyTrafficMessage);
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index bf3c5cdaf..a74b3ae74 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -101,7 +101,7 @@ struct EphemeralKeyMessage
* At what time was this key created (beginning of validity).
*/
struct GNUNET_TIME_AbsoluteNBO creation_time;
-
+
/**
* When does the given ephemeral key expire (end of validity).
*/
@@ -111,7 +111,7 @@ struct EphemeralKeyMessage
* Ephemeral public ECC key (always for NIST P-521) encoded in a format suitable
* for network transmission as created using 'gcry_sexp_sprint'.
*/
- struct GNUNET_CRYPTO_EccPublicEncryptKey ephemeral_key;
+ struct GNUNET_CRYPTO_EccPublicEncryptKey ephemeral_key;
/**
* Public key of the signing peer (persistent version, not the ephemeral public key).
@@ -407,7 +407,7 @@ static struct GSC_KeyExchangeInfo *kx_tail;
/**
* Task scheduled for periodic re-generation (and thus rekeying) of our
* ephemeral key.
- */
+ */
static GNUNET_SCHEDULER_TaskIdentifier rekey_task;
@@ -424,10 +424,10 @@ derive_auth_key (struct GNUNET_CRYPTO_AuthKey *akey,
{
static const char ctx[] = "authentication key";
- GNUNET_CRYPTO_hmac_derive_key (akey, skey,
- &seed, sizeof (seed),
- skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey),
- ctx, sizeof (ctx),
+ GNUNET_CRYPTO_hmac_derive_key (akey, skey,
+ &seed, sizeof (seed),
+ skey, sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey),
+ ctx, sizeof (ctx),
NULL);
}
@@ -473,8 +473,8 @@ derive_pong_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
GNUNET_CRYPTO_symmetric_derive_iv (iv, skey, &seed, sizeof (seed),
identity,
sizeof (struct GNUNET_PeerIdentity),
- &challenge, sizeof (challenge),
- ctx, sizeof (ctx),
+ &challenge, sizeof (challenge),
+ ctx, sizeof (ctx),
NULL);
}
@@ -485,7 +485,7 @@ derive_pong_iv (struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
* @param sender peer identity of the sender
* @param receiver peer identity of the sender
* @param key_material high entropy key material to use
- * @param skey set to derived session key
+ * @param skey set to derived session key
*/
static void
derive_aes_key (const struct GNUNET_PeerIdentity *sender,
@@ -661,7 +661,7 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid)
struct GNUNET_HashCode h1;
struct GNUNET_HashCode h2;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Initiating key exchange with `%s'\n",
GNUNET_i2s (pid));
GNUNET_STATISTICS_update (GSC_stats,
@@ -675,12 +675,12 @@ GSC_KX_start (const struct GNUNET_PeerIdentity *pid)
kx);
GNUNET_CRYPTO_hash (pid, sizeof (struct GNUNET_PeerIdentity), &h1);
GNUNET_CRYPTO_hash (&GSC_my_identity, sizeof (struct GNUNET_PeerIdentity), &h2);
-
- if (0 < GNUNET_CRYPTO_hash_cmp (&h1,
+
+ if (0 < GNUNET_CRYPTO_hash_cmp (&h1,
&h2))
{
/* peer with "lower" identity starts KX, otherwise we typically end up
- with both peers starting the exchange and transmit the 'set key'
+ with both peers starting the exchange and transmit the 'set key'
message twice */
kx->status = KX_STATE_KEY_SENT;
send_key (kx);
@@ -744,10 +744,10 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
struct GNUNET_TIME_Absolute start_t;
struct GNUNET_TIME_Absolute end_t;
struct GNUNET_TIME_Absolute now;
- enum KxStateMachine sender_status;
+ enum KxStateMachine sender_status;
uint16_t size;
struct GNUNET_HashCode key_material;
-
+
size = ntohs (msg->size);
if (sizeof (struct EphemeralKeyMessage) != size)
{
@@ -758,7 +758,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
end_t = GNUNET_TIME_absolute_ntoh (m->expiration_time);
if ( ( (KX_STATE_KEY_RECEIVED == kx->status) ||
(KX_STATE_UP == kx->status) ||
- (KX_STATE_REKEY_SENT == kx->status) ) &&
+ (KX_STATE_REKEY_SENT == kx->status) ) &&
(end_t.abs_value_us <= kx->foreign_key_expires.abs_value_us) )
{
GNUNET_STATISTICS_update (GSC_stats, gettext_noop ("# old ephemeral keys ignored"),
@@ -777,7 +777,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
memcmp (&m->origin_identity,
&kx->peer.public_key,
sizeof (struct GNUNET_PeerIdentity)))
- {
+ {
GNUNET_break_op (0);
return;
}
@@ -810,7 +810,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
}
if (GNUNET_OK !=
GNUNET_CRYPTO_ecc_ecdh (my_ephemeral_key,
- &m->ephemeral_key,
+ &m->ephemeral_key,
&key_material))
{
GNUNET_break (0);
@@ -834,7 +834,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
setup_fresh_ping (kx);
/* check if we still need to send the sender our key */
- sender_status = (enum KxStateMachine) ntohl (m->sender_status);
+ sender_status = (enum KxStateMachine) ntohl (m->sender_status);
switch (sender_status)
{
case KX_STATE_DOWN:
@@ -844,7 +844,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
/* fine, need to send our key after updating our status, see below */
break;
case KX_STATE_KEY_RECEIVED:
- case KX_STATE_UP:
+ case KX_STATE_UP:
case KX_STATE_REKEY_SENT:
/* other peer already got our key */
break;
@@ -875,7 +875,7 @@ GSC_KX_handle_ephemeral_key (struct GSC_KeyExchangeInfo *kx,
send_key (kx);
send_ping (kx);
break;
- case KX_STATE_UP:
+ case KX_STATE_UP:
kx->status = KX_STATE_REKEY_SENT;
if (KX_STATE_KEY_SENT == sender_status)
send_key (kx);
@@ -922,7 +922,7 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx,
GNUNET_STATISTICS_update (GSC_stats,
gettext_noop ("# PING messages received"), 1,
GNUNET_NO);
- if ( (kx->status != KX_STATE_KEY_RECEIVED) &&
+ if ( (kx->status != KX_STATE_KEY_RECEIVED) &&
(kx->status != KX_STATE_UP) &&
(kx->status != KX_STATE_REKEY_SENT))
{
@@ -1128,7 +1128,7 @@ GSC_KX_handle_pong (struct GSC_KeyExchangeInfo *kx,
{
GNUNET_SCHEDULER_cancel (kx->retry_set_key_task);
kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK;
- }
+ }
switch (kx->status)
{
case KX_STATE_DOWN:
@@ -1184,11 +1184,11 @@ send_key (struct GSC_KeyExchangeInfo *kx)
kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK;
}
/* always update sender status in SET KEY message */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending key to `%s' (my status: %d)\n",
GNUNET_i2s (&kx->peer),
kx->status);
- current_ekm.sender_status = htonl ((int32_t) (kx->status));
+ current_ekm.sender_status = htonl ((int32_t) (kx->status));
GSC_NEIGHBOURS_transmit (&kx->peer, &current_ekm.header,
kx->set_key_retry_frequency);
kx->retry_set_key_task =
@@ -1236,8 +1236,8 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo *kx,
used - ENCRYPTED_HEADER_SIZE));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Encrypted %u bytes for %s\n",
used - ENCRYPTED_HEADER_SIZE, GNUNET_i2s (&kx->peer));
- derive_auth_key (&auth_key,
- &kx->encrypt_key,
+ derive_auth_key (&auth_key,
+ &kx->encrypt_key,
ph->iv_seed);
GNUNET_CRYPTO_hmac (&auth_key, &em->sequence_number,
used - ENCRYPTED_HEADER_SIZE, &em->hmac);
@@ -1327,8 +1327,8 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
if (0 != memcmp (&ph, &m->hmac, sizeof (struct GNUNET_HashCode)))
{
/* checksum failed */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Failed checksum validation for a message from `%s'\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Failed checksum validation for a message from `%s'\n",
GNUNET_i2s (&kx->peer));
return;
}
@@ -1542,7 +1542,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk)
{
GNUNET_assert (NULL != pk);
my_private_key = pk;
- GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key,
+ GNUNET_CRYPTO_ecc_key_get_public_for_signature (my_private_key,
&GSC_my_identity.public_key);
if (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno (GSC_cfg,
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c
index d82d119d7..6eff065d9 100644
--- a/src/core/gnunet-service-core_neighbours.c
+++ b/src/core/gnunet-service-core_neighbours.c
@@ -479,8 +479,8 @@ GSC_NEIGHBOURS_init ()
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_neighbour_helper (void *cls,
- const struct GNUNET_PeerIdentity * key,
+free_neighbour_helper (void *cls,
+ const struct GNUNET_PeerIdentity * key,
void *value)
{
struct Neighbour *n = value;
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 6c66086bd..a8d3d3609 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -199,7 +199,7 @@ GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
GNUNET_free (sme);
}
GNUNET_SCHEDULER_cancel (session->typemap_task);
- GSC_CLIENTS_notify_clients_about_neighbour (&session->peer,
+ GSC_CLIENTS_notify_clients_about_neighbour (&session->peer,
session->tmap, NULL);
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multipeermap_remove (sessions,
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index 0ec3112a1..12745c984 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -263,7 +263,7 @@ connect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-init_notify (void *cls,
+init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
@@ -299,8 +299,8 @@ setup_peer (struct PeerContext *p, const char *cfgname)
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL,
binary,
"gnunet-service-arm",
"-c", cfgname, NULL);
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index 14e1e4db3..ddc3c585e 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -356,7 +356,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = {
static void
-init_notify (void *cls,
+init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c
index 4e2ee3fe4..913ae3848 100644
--- a/src/core/test_core_api_send_to_self.c
+++ b/src/core/test_core_api_send_to_self.c
@@ -103,7 +103,7 @@ send_message (void *cls, size_t size, void *buf)
static void
-init (void *cls,
+init (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
if (NULL == my_identity)
@@ -152,7 +152,7 @@ run (void *cls,
};
core =
GNUNET_CORE_connect (cfg, NULL, &init, &connect_cb, NULL, NULL,
- 0, NULL, 0, handlers);
+ 0, NULL, 0, handlers);
die_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 300), &cleanup,
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index dfcc40e87..0389a908e 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -103,7 +103,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-init_notify (void *cls,
+init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 94adc804b..7c1b198c9 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -498,7 +498,7 @@ static struct GNUNET_CORE_MessageHandler handlers[] = {
static void
-init_notify (void *cls,
+init_notify (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
struct PeerContext *p = cls;
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c
index 848979979..e6b49fd75 100644
--- a/src/datacache/datacache.c
+++ b/src/datacache/datacache.c
@@ -154,7 +154,7 @@ GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
bf_size = quota / 32; /* 8 bit per entry, 1 bit per 32 kb in DB */
ret = GNUNET_malloc (sizeof (struct GNUNET_DATACACHE_Handle));
-
+
if (GNUNET_YES !=
GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "DISABLE_BF"))
{
@@ -166,12 +166,12 @@ GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
if (NULL != ret->bloom_name)
{
ret->filter = GNUNET_CONTAINER_bloomfilter_load (ret->bloom_name, quota / 1024, /* 8 bit per entry in DB, expect 1k entries */
- 5);
- }
+ 5);
+ }
if (NULL == ret->filter)
{
ret->filter = GNUNET_CONTAINER_bloomfilter_init (NULL, bf_size, 5); /* approx. 3% false positives at max use */
- }
+ }
}
ret->stats = GNUNET_STATISTICS_create ("datacache", cfg);
ret->section = GNUNET_strdup (section);
@@ -247,8 +247,8 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
{
ssize_t used;
- used = h->api->put (h->api->cls, key,
- size, data,
+ used = h->api->put (h->api->cls, key,
+ size, data,
type, discard_time,
path_info_len, path_info);
if (-1 == used)
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index 027999d22..e422f91ca 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -44,7 +44,7 @@ static const char *plugin_name;
static int
-checkIt (void *cls,
+checkIt (void *cls,
const struct GNUNET_HashCode * key, size_t size, const char *data,
enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute exp,
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c
index aee6cd5b8..e930705f2 100644
--- a/src/datacache/plugin_datacache_heap.c
+++ b/src/datacache/plugin_datacache_heap.c
@@ -95,7 +95,7 @@ struct Value
* Type of the block.
*/
enum GNUNET_BLOCK_Type type;
-
+
};
@@ -110,7 +110,7 @@ struct PutContext
/**
* Expiration time for the new value.
*/
- struct GNUNET_TIME_Absolute discard_time;
+ struct GNUNET_TIME_Absolute discard_time;
/**
* Data for the new value.
@@ -155,7 +155,7 @@ struct PutContext
*
* @param cls the 'struct PutContext'
* @param key the key for the value(s)
- * @param value an existing value
+ * @param value an existing value
* @return GNUNET_YES if not found (to continue to iterate)
*/
static int
@@ -170,16 +170,16 @@ put_cb (void *cls,
(val->type == put_ctx->type) &&
(0 == memcmp (&val[1], put_ctx->data, put_ctx->size)) )
{
- put_ctx->found = GNUNET_YES;
+ put_ctx->found = GNUNET_YES;
val->discard_time = GNUNET_TIME_absolute_max (val->discard_time,
put_ctx->discard_time);
/* replace old path with new path */
GNUNET_array_grow (val->path_info,
val->path_info_len,
put_ctx->path_info_len);
- memcpy (val->path_info,
+ memcpy (val->path_info,
put_ctx->path_info,
- put_ctx->path_info_len * sizeof (struct GNUNET_PeerIdentity));
+ put_ctx->path_info_len * sizeof (struct GNUNET_PeerIdentity));
GNUNET_CONTAINER_heap_update_cost (put_ctx->heap,
val->hn,
val->discard_time.abs_value_us);
@@ -289,7 +289,7 @@ struct GetContext
*
* @param cls the 'struct GetContext'
* @param key the key for the value(s)
- * @param value an existing value
+ * @param value an existing value
* @return GNUNET_YES to continue to iterate
*/
static int
@@ -341,7 +341,7 @@ heap_plugin_get (void *cls, const struct GNUNET_HashCode * key,
get_ctx.type = type;
get_ctx.iter = iter;
- get_ctx.iter_cls = iter_cls;
+ get_ctx.iter_cls = iter_cls;
get_ctx.cnt = 0;
GNUNET_CONTAINER_multihashmap_get_multiple (plugin->map,
key,
@@ -363,7 +363,7 @@ heap_plugin_del (void *cls)
{
struct Plugin *plugin = cls;
struct Value *val;
-
+
val = GNUNET_CONTAINER_heap_remove_root (plugin->heap);
if (NULL == val)
return GNUNET_SYSERR;
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index c8d66ead1..6d7e28021 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -78,14 +78,14 @@ init_connection (struct Plugin *plugin)
" value BYTEA NOT NULL DEFAULT '',"
" path BYTEA DEFAULT '')"
"WITH OIDS");
- if ( (ret == NULL) ||
- ((PQresultStatus (ret) != PGRES_COMMAND_OK) &&
+ if ( (ret == NULL) ||
+ ((PQresultStatus (ret) != PGRES_COMMAND_OK) &&
(0 != strcmp ("42P07", /* duplicate table */
PQresultErrorField
(ret,
PG_DIAG_SQLSTATE)))))
{
- (void) GNUNET_POSTGRES_check_result (plugin->dbh, ret,
+ (void) GNUNET_POSTGRES_check_result (plugin->dbh, ret,
PGRES_COMMAND_OK, "CREATE TABLE",
"gn090dc");
PQfinish (plugin->dbh);
@@ -198,7 +198,7 @@ postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
PQexecPrepared (plugin->dbh, "put", 5, paramValues, paramLengths,
paramFormats, 1);
if (GNUNET_OK !=
- GNUNET_POSTGRES_check_result (plugin->dbh, ret,
+ GNUNET_POSTGRES_check_result (plugin->dbh, ret,
PGRES_COMMAND_OK, "PQexecPrepared", "put"))
return -1;
PQclear (ret);
@@ -258,7 +258,7 @@ postgres_plugin_get (void *cls, const struct GNUNET_HashCode * key,
if (0 == (cnt = PQntuples (res)))
{
/* no result */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Ending iteration (no more results)\n");
PQclear (res);
return 0;
@@ -289,7 +289,7 @@ postgres_plugin_get (void *cls, const struct GNUNET_HashCode * key,
}
path_len %= sizeof (struct GNUNET_PeerIdentity);
path = (const struct GNUNET_PeerIdentity *) PQgetvalue (res, i, 3);
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Found result of size %u bytes and type %u in database\n",
(unsigned int) size, (unsigned int) type);
if (GNUNET_SYSERR ==
@@ -299,7 +299,7 @@ postgres_plugin_get (void *cls, const struct GNUNET_HashCode * key,
path_len,
path))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Ending iteration (client error)\n");
PQclear (res);
return cnt;
@@ -330,14 +330,14 @@ postgres_plugin_del (void *cls)
if (GNUNET_OK !=
GNUNET_POSTGRES_check_result (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "getm"))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Ending iteration (postgres error)\n");
return 0;
}
if (0 == PQntuples (res))
{
/* no result */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
"Ending iteration (no more results)\n");
PQclear (res);
return GNUNET_SYSERR;
@@ -388,7 +388,7 @@ libgnunet_plugin_datacache_postgres_init (void *cls)
api->get = &postgres_plugin_get;
api->put = &postgres_plugin_put;
api->del = &postgres_plugin_del;
- LOG (GNUNET_ERROR_TYPE_INFO,
+ LOG (GNUNET_ERROR_TYPE_INFO,
_("Postgres datacache running\n"));
return api;
}
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index 34aa61363..1901bdedd 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -96,13 +96,13 @@ sq_prepare (sqlite3 * dbh, const char *zSql, /* SQL statement, UTF-8 encoded
* @param type type of the value
* @param discard_time when to discard the value in any case
* @param path_info_len number of entries in 'path_info'
- * @param path_info array of peers that have processed the request
+ * @param path_info array of peers that have processed the request
* @return 0 if duplicate, -1 on error, number of bytes used otherwise
*/
static ssize_t
sqlite_plugin_put (void *cls,
const struct GNUNET_HashCode *key,
- size_t size, const char *data,
+ size_t size, const char *data,
enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time,
unsigned int path_info_len,
@@ -135,11 +135,11 @@ sqlite_plugin_put (void *cls,
key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK != sqlite3_bind_blob (stmt, 4,
- data, size,
+ data, size,
SQLITE_TRANSIENT)) ||
- (SQLITE_OK != sqlite3_bind_blob (stmt, 5,
- path_info,
- path_info_len * sizeof (struct GNUNET_PeerIdentity),
+ (SQLITE_OK != sqlite3_bind_blob (stmt, 5,
+ path_info,
+ path_info_len * sizeof (struct GNUNET_PeerIdentity),
SQLITE_TRANSIENT)))
{
LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index 071ae721f..d0b7e5457 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -38,8 +38,8 @@ static const char *plugin_name;
static int
-checkIt (void *cls,
- const struct GNUNET_HashCode *key,
+checkIt (void *cls,
+ const struct GNUNET_HashCode *key,
size_t size, const char *data,
enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute exp,
@@ -75,7 +75,7 @@ run (void *cls, char *const *args, const char *cfgfile,
if (h == NULL)
{
FPRINTF (stderr,
- "%s",
+ "%s",
"Failed to initialize datacache. Database likely not setup, skipping test.\n");
return;
}
@@ -87,7 +87,7 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
ASSERT (GNUNET_OK ==
GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
- (const char *) &n, 1 + i % 16, exp,
+ (const char *) &n, 1 + i % 16, exp,
0, NULL));
k = n;
}
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 2fb250b96..461440c85 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -475,7 +475,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize,
GNUNET_assert (pos->response_proc != NULL);
/* move 'pos' element to head so that it will be
* killed on 'NULL' call below */
- LOG (GNUNET_ERROR_TYPE_DEBUG, "Dropping request from datastore queue\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Dropping request from datastore queue\n");
GNUNET_CONTAINER_DLL_remove (h->queue_head, h->queue_tail, pos);
GNUNET_CONTAINER_DLL_insert (h->queue_head, h->queue_tail, pos);
GNUNET_STATISTICS_update (h->stats,
@@ -691,7 +691,7 @@ process_queue (struct GNUNET_DATASTORE_Handle *h)
* @param emsg error message
*/
static void
-drop_status_cont (void *cls, int32_t result,
+drop_status_cont (void *cls, int32_t result,
struct GNUNET_TIME_Absolute min_expiration,
const char *emsg)
{
@@ -800,7 +800,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
h->retry_time = GNUNET_TIME_UNIT_ZERO;
process_queue (h);
if (rc.cont != NULL)
- rc.cont (rc.cont_cls, status,
+ rc.cont (rc.cont_cls, status,
GNUNET_TIME_absolute_ntoh (sm->min_expiration),
emsg);
}
@@ -1039,7 +1039,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
cont = &drop_status_cont;
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Asked to update entry %llu raising priority by %u and expiration to %s\n",
- uid,
+ uid,
(unsigned int) priority,
GNUNET_STRINGS_absolute_time_to_string (expiration));
qc.sc.cont = cont;
diff --git a/src/datastore/gnunet-datastore.c b/src/datastore/gnunet-datastore.c
index 4388818d7..9daad04c7 100644
--- a/src/datastore/gnunet-datastore.c
+++ b/src/datastore/gnunet-datastore.c
@@ -84,7 +84,7 @@ do_shutdown (void *cls,
/**
* Perform next GET operation.
*/
-static void
+static void
do_get (void);
@@ -101,7 +101,7 @@ do_get (void);
* space for 0-priority content
* @param msg NULL on success, otherwise an error message
*/
-static void
+static void
do_finish (void *cls,
int32_t success,
struct GNUNET_TIME_Absolute min_expiration,
@@ -135,7 +135,7 @@ do_finish (void *cls,
* @param uid unique identifier for the datum;
* maybe 0 if no unique identifier is available
*/
-static void
+static void
do_put (void *cls,
const struct GNUNET_HashCode *key,
size_t size, const void *data,
@@ -156,8 +156,8 @@ do_put (void *cls,
first_uid = uid;
qe = GNUNET_DATASTORE_put (db_dst, 0,
key, size, data, type,
- priority, anonymity,
- 0 /* FIXME: replication is lost... */,
+ priority, anonymity,
+ 0 /* FIXME: replication is lost... */,
expiration,
0, 1, GNUNET_TIME_UNIT_FOREVER_REL,
&do_finish, NULL);
@@ -167,7 +167,7 @@ do_put (void *cls,
/**
* Perform next GET operation.
*/
-static void
+static void
do_get ()
{
qe = GNUNET_DATASTORE_get_key (db_src,
@@ -185,7 +185,7 @@ do_get ()
*
* @param cls closure
* @param args remaining command-line arguments
- * @param cfgfile name of the configuration file used
+ * @param cfgfile name of the configuration file used
* @param cfg configuration -- for destination datastore
*/
static void
@@ -196,7 +196,7 @@ run (void *cls, char *const *args, const char *cfgfile,
return; /* nothing to be done */
if (0 == strcmp (cfgfile, alternative_cfg))
{
- fprintf (stderr,
+ fprintf (stderr,
_("Cannot use the same configuration for source and destination\n"));
ret = 1;
return;
@@ -253,7 +253,7 @@ main (int argc, char *const *argv)
if (GNUNET_OK !=
GNUNET_PROGRAM_run (argc, argv, "gnunet-datastore",
gettext_noop ("Manipulate GNUnet datastore"),
- options, &run, NULL))
+ options, &run, NULL))
ret = 1;
GNUNET_free ((void*) argv);
return ret;
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index e605da8fc..7c4c47e90 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -409,7 +409,7 @@ quota_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
"Deleting %llu bytes of low-priority (%u) content `%s' of type %u at %s prior to expiration (still trying to free another %llu bytes)\n",
(unsigned long long) (size + GNUNET_DATASTORE_ENTRY_OVERHEAD),
(unsigned int) priority,
- GNUNET_h2s (key), type,
+ GNUNET_h2s (key), type,
GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (expiration),
GNUNET_YES),
*need);
@@ -1473,7 +1473,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
sizeof (struct GNUNET_MessageHeader)},
{NULL, NULL, 0, 0}
};
- char *fn;
+ char *fn;
char *pfn;
unsigned int bf_size;
int refresh_bf;
@@ -1504,7 +1504,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
cache_size = quota / 8; /* Or should we make this an option? */
GNUNET_STATISTICS_set (stats, gettext_noop ("# cache size"), cache_size,
GNUNET_NO);
- if (quota / (32 * 1024LL) > (1 << 31))
+ if (quota / (32 * 1024LL) > (1 << 31))
bf_size = (1 << 31); /* absolute limit: ~2 GB, beyond that BF just won't help anyway */
else
bf_size = quota / (32 * 1024LL); /* 8 bit per entry, 1 bit per 32 kb in DB */
@@ -1610,7 +1610,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Rebuilding bloomfilter. Please be patient.\n"));
if (NULL != plugin->api->get_keys)
- plugin->api->get_keys (plugin->api->cls, &add_key_to_bloomfilter, filter);
+ plugin->api->get_keys (plugin->api->cls, &add_key_to_bloomfilter, filter);
else
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Plugin does not support get_keys function. Please fix!\n"));
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 83be3ad5f..c51502cc6 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -294,7 +294,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 657acc66b..908a7ee55 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -163,10 +163,10 @@ iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
memcpy (&i, &cdata[4], sizeof (i));
hits[i / 8] |= (1 << (i % 8));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found result %d type=%u, priority=%u, size=%u, expire=%s\n",
i,
- type, priority, size,
+ type, priority, size,
GNUNET_STRINGS_absolute_time_to_string (expiration));
crc->cnt++;
if (crc->cnt == PUT_10 / 4 - 1)
@@ -349,7 +349,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_break (0);
crc->phase = RP_ERROR;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"In phase %d, iteration %u\n", crc->phase, crc->cnt);
switch (crc->phase)
{
diff --git a/src/datastore/plugin_datastore_heap.c b/src/datastore/plugin_datastore_heap.c
index 79dcb9043..1f756a95c 100644
--- a/src/datastore/plugin_datastore_heap.c
+++ b/src/datastore/plugin_datastore_heap.c
@@ -33,7 +33,7 @@
/**
* A value that we are storing.
- */
+ */
struct Value
{
@@ -67,11 +67,11 @@ struct Value
* only used if anonymity is zero.
*/
unsigned int zero_anon_offset;
-
+
/**
* Number of bytes in 'data'.
*/
- uint32_t size;
+ uint32_t size;
/**
* Priority of the value.
@@ -82,7 +82,7 @@ struct Value
* Anonymity level for the value.
*/
uint32_t anonymity;
-
+
/**
* Replication level for the value.
*/
@@ -209,10 +209,10 @@ heap_plugin_estimate_size (void *cls)
* @return GNUNET_OK on success
*/
static int
-heap_plugin_put (void *cls,
- const struct GNUNET_HashCode * key,
+heap_plugin_put (void *cls,
+ const struct GNUNET_HashCode * key,
uint32_t size,
- const void *data,
+ const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
@@ -328,7 +328,7 @@ struct GetContext
* The plugin.
*/
struct Plugin *plugin;
-
+
/**
* Requested value hash.
*/
@@ -343,7 +343,7 @@ struct GetContext
* Function to call with the result.
*/
PluginDatumProcessor proc;
-
+
/**
* Closure for 'proc'.
*/
@@ -358,7 +358,7 @@ struct GetContext
* @param value the value to check against the query
* @return GNUNET_YES if the value matches
*/
-static int
+static int
match (const struct GetContext *gc,
struct Value *value)
{
@@ -421,7 +421,7 @@ get_iterator (void *cls,
if (0 != gc->offset--)
return GNUNET_OK;
if (GNUNET_NO ==
- gc->proc (gc->proc_cls,
+ gc->proc (gc->proc_cls,
key,
value->size,
&value[1],
@@ -476,7 +476,7 @@ heap_plugin_get_key (void *cls, uint64_t offset,
&gc);
if (0 == gc.offset)
{
- proc (proc_cls,
+ proc (proc_cls,
NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
return;
}
@@ -489,11 +489,11 @@ heap_plugin_get_key (void *cls, uint64_t offset,
{
GNUNET_CONTAINER_multihashmap_get_multiple (plugin->keyvalue,
key,
- &count_iterator,
+ &count_iterator,
&gc);
if (0 == gc.offset)
{
- proc (proc_cls,
+ proc (proc_cls,
NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
return;
}
@@ -518,7 +518,7 @@ heap_plugin_get_key (void *cls, uint64_t offset,
* @param proc_cls closure for proc
*/
static void
-heap_plugin_get_replication (void *cls,
+heap_plugin_get_replication (void *cls,
PluginDatumProcessor proc,
void *proc_cls)
{
@@ -528,7 +528,7 @@ heap_plugin_get_replication (void *cls,
value = GNUNET_CONTAINER_heap_remove_root (plugin->by_replication);
if (NULL == value)
{
- proc (proc_cls,
+ proc (proc_cls,
NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
return;
}
@@ -537,18 +537,18 @@ heap_plugin_get_replication (void *cls,
value->replication--;
value->replication_heap = GNUNET_CONTAINER_heap_insert (plugin->by_replication,
value,
- value->replication);
+ value->replication);
}
else
{
/* need a better way to pick a random item, replication level is always 0 */
value->replication_heap = GNUNET_CONTAINER_heap_insert (plugin->by_replication,
value,
- value->replication);
+ value->replication);
value = GNUNET_CONTAINER_heap_walk_get_next (plugin->by_replication);
}
if (GNUNET_NO ==
- proc (proc_cls,
+ proc (proc_cls,
&value->key,
value->size,
&value[1],
@@ -579,12 +579,12 @@ heap_plugin_get_expiration (void *cls, PluginDatumProcessor proc,
value = GNUNET_CONTAINER_heap_peek (plugin->by_expiration);
if (NULL == value)
{
- proc (proc_cls,
+ proc (proc_cls,
NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
return;
}
if (GNUNET_NO ==
- proc (proc_cls,
+ proc (proc_cls,
&value->key,
value->size,
&value[1],
@@ -618,8 +618,8 @@ heap_plugin_get_expiration (void *cls, PluginDatumProcessor proc,
* @return GNUNET_OK on success
*/
static int
-heap_plugin_update (void *cls,
- uint64_t uid,
+heap_plugin_update (void *cls,
+ uint64_t uid,
int delta,
struct GNUNET_TIME_Absolute expire, char **msg)
{
@@ -675,10 +675,10 @@ heap_plugin_get_zero_anonymity (void *cls, uint64_t offset,
}
if (0 == count)
{
- proc (proc_cls,
+ proc (proc_cls,
NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
return;
- }
+ }
offset = offset % count;
for (zabt = plugin->zero_head; NULL != zabt; zabt = zabt->next)
{
@@ -695,7 +695,7 @@ heap_plugin_get_zero_anonymity (void *cls, uint64_t offset,
GNUNET_assert (NULL != zabt);
value = zabt->array[offset];
if (GNUNET_NO ==
- proc (proc_cls,
+ proc (proc_cls,
&value->key,
value->size,
&value[1],
@@ -749,8 +749,8 @@ return_value (void *cls,
void *val)
{
struct GetAllContext *gac = cls;
-
- gac->proc (gac->proc_cls,
+
+ gac->proc (gac->proc_cls,
key,
1);
return GNUNET_OK;
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index 40f25deee..923660dc2 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -363,7 +363,7 @@ mysql_plugin_update (void *cls, uint64_t uid, int delta,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Updating value %llu adding %d to priority and maxing exp at %s\n",
- vkey, delta,
+ vkey, delta,
GNUNET_STRINGS_absolute_time_to_string (expire));
ret =
GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_entry, NULL,
@@ -454,7 +454,7 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Found %u-byte value under key `%s' with prio %u, anon %u, expire %s selecting from gn090 table\n",
(unsigned int) size, GNUNET_h2s (&key),
- priority, anonymity,
+ priority, anonymity,
GNUNET_STRINGS_absolute_time_to_string (expiration));
GNUNET_assert (size < MAX_DATUM_SIZE);
ret =
@@ -769,7 +769,7 @@ mysql_plugin_get_keys (void *cls,
struct GNUNET_HashCode key;
MYSQL_BIND cbind[1];
unsigned long length;
-
+
statement = GNUNET_MYSQL_statement_get_stmt (plugin->mc,
plugin->get_all_keys);
if (statement == NULL)
@@ -812,14 +812,14 @@ mysql_plugin_get_keys (void *cls,
while (0 == (ret = mysql_stmt_fetch (statement)))
{
if (sizeof (struct GNUNET_HashCode) == length)
- proc (proc_cls, &key, 1);
+ proc (proc_cls, &key, 1);
}
if (ret != MYSQL_NO_DATA)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("`%s' failed at %s:%d with error: %s\n"),
"mysql_stmt_fetch", __FILE__, __LINE__,
- mysql_stmt_error (statement));
+ mysql_stmt_error (statement));
GNUNET_MYSQL_statements_invalidate (plugin->mc);
return;
}
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 98109d4da..6a96ad5d3 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -257,7 +257,7 @@ postgres_plugin_estimate_size (void *cls)
/**
* Store an item in the datastore.
*
- * @param cls closure with the 'struct Plugin'
+ * @param cls closure with the 'struct Plugin'
* @param key key for the item
* @param size number of bytes in data
* @param data content stored
@@ -335,7 +335,7 @@ postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t siz
*/
static void
process_result (struct Plugin *plugin, PluginDatumProcessor proc,
- void *proc_cls, PGresult * res,
+ void *proc_cls, PGresult * res,
const char *filename, int line)
{
int iret;
@@ -802,7 +802,7 @@ postgres_plugin_get_keys (void *cls,
if (sizeof (struct GNUNET_HashCode) != PQgetlength (res, i, 0))
{
memcpy (&key, PQgetvalue (res, i, 0), sizeof (struct GNUNET_HashCode));
- proc (proc_cls, &key, 1);
+ proc (proc_cls, &key, 1);
}
}
PQclear (res);
@@ -819,7 +819,7 @@ static void
postgres_plugin_drop (void *cls)
{
struct Plugin *plugin = cls;
-
+
if (GNUNET_OK != GNUNET_POSTGRES_exec (plugin->dbh, "DROP TABLE gn090"))
GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "postgres", _("Failed to drop table from database.\n"));
}
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index a88dd0c20..03939cee3 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -191,7 +191,7 @@ check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
return;
}
#if 0
- FPRINTF (stderr,
+ FPRINTF (stderr,
"Check value got `%s' of size %u, type %d, expire %s\n",
GNUNET_h2s (key), (unsigned int) size, type,
GNUNET_STRINGS_absolute_time_to_string (expiration));
@@ -464,7 +464,7 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 8baeeede8..7f330031a 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -258,7 +258,7 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index 3efd7b4ce..844d32a7b 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -226,7 +226,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n");
crc->phase = RP_ERROR;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"In phase %d, iteration %u\n", crc->phase, crc->cnt);
switch (crc->phase)
{
diff --git a/src/dht/dht.h b/src/dht/dht.h
index a2c83e5ec..86fbc16bb 100644
--- a/src/dht/dht.h
+++ b/src/dht/dht.h
@@ -281,7 +281,7 @@ struct GNUNET_DHT_MonitorPutMessage
* Hop count so far.
*/
uint32_t hop_count GNUNET_PACKED;
-
+
/**
* Replication level for this message
*/
@@ -377,7 +377,7 @@ struct GNUNET_DHT_MonitorGetMessage
* Hop count
*/
uint32_t hop_count GNUNET_PACKED;
-
+
/**
* Replication level for this message
*/
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 3a6fcdc53..7b83c14c3 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -115,7 +115,7 @@ struct GNUNET_DHT_PutHandle
GNUNET_DHT_PutContinuation cont;
/**
- * Pending message associated with this PUT operation,
+ * Pending message associated with this PUT operation,
* NULL after the message has been transmitted to the service.
*/
struct PendingMessage *pending;
@@ -181,7 +181,7 @@ struct GNUNET_DHT_GetHandle
/**
* Key that this get request is for
*/
- struct GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Unique identifier for this request (for key collisions).
@@ -201,7 +201,7 @@ struct GNUNET_DHT_GetHandle
unsigned int seen_results_end;
/**
- * Offset into the 'seen_results' array marking the
+ * Offset into the 'seen_results' array marking the
* position up to where we've send the hash codes to
* the DHT for blocking (needed as we might not be
* able to send all hash codes at once).
@@ -226,7 +226,7 @@ struct GNUNET_DHT_MonitorHandle
* DLL.
*/
struct GNUNET_DHT_MonitorHandle *prev;
-
+
/**
* Main handle to this DHT api.
*/
@@ -261,7 +261,7 @@ struct GNUNET_DHT_MonitorHandle
* Closure for cb.
*/
void *cb_cls;
-
+
};
@@ -297,7 +297,7 @@ struct GNUNET_DHT_Handle
struct PendingMessage *pending_tail;
/**
- * Head of linked list of messages we would like to monitor.
+ * Head of linked list of messages we would like to monitor.
*/
struct GNUNET_DHT_MonitorHandle *monitor_head;
@@ -353,7 +353,7 @@ struct GNUNET_DHT_Handle
* @param msg the incoming message
*/
static void
-service_message_handler (void *cls,
+service_message_handler (void *cls,
const struct GNUNET_MessageHeader *msg);
@@ -401,7 +401,7 @@ queue_filter_messages (struct GNUNET_DHT_GetHandle *get_handle)
if (delta > max)
delta = max;
msize = sizeof (struct GNUNET_DHT_ClientGetResultSeenMessage) + delta * sizeof (struct GNUNET_HashCode);
-
+
pm = GNUNET_malloc (sizeof (struct PendingMessage) + msize);
msg = (struct GNUNET_DHT_ClientGetResultSeenMessage *) &pm[1];
pm->msg = &msg->header;
@@ -419,7 +419,7 @@ queue_filter_messages (struct GNUNET_DHT_GetHandle *get_handle)
get_handle->seen_results_transmission_offset += delta;
GNUNET_CONTAINER_DLL_insert_tail (get_handle->dht_handle->pending_head,
get_handle->dht_handle->pending_tail,
- pm);
+ pm);
}
}
@@ -434,8 +434,8 @@ queue_filter_messages (struct GNUNET_DHT_GetHandle *get_handle)
* @return #GNUNET_YES (always)
*/
static int
-add_request_to_pending (void *cls,
- const struct GNUNET_HashCode *key,
+add_request_to_pending (void *cls,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct GNUNET_DHT_Handle *handle = cls;
@@ -472,7 +472,7 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle);
* @param tc scheduler context
*/
static void
-try_reconnect (void *cls,
+try_reconnect (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_DHT_Handle *handle = cls;
@@ -542,8 +542,8 @@ do_disconnect (struct GNUNET_DHT_Handle *handle)
* @return number of bytes written to @a buf
*/
static size_t
-transmit_pending (void *cls,
- size_t size,
+transmit_pending (void *cls,
+ size_t size,
void *buf);
@@ -591,8 +591,8 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle)
* @return number of bytes written to @a buf
*/
static size_t
-transmit_pending (void *cls,
- size_t size,
+transmit_pending (void *cls,
+ size_t size,
void *buf)
{
struct GNUNET_DHT_Handle *handle = cls;
@@ -601,7 +601,7 @@ transmit_pending (void *cls,
handle->th = NULL;
if (NULL == buf)
- {
+ {
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Transmission to DHT service failed! Reconnecting!\n");
do_disconnect (handle);
@@ -653,8 +653,8 @@ transmit_pending (void *cls,
* #GNUNET_NO if the reply is malformed or we found a matching request
*/
static int
-process_reply (void *cls,
- const struct GNUNET_HashCode *key,
+process_reply (void *cls,
+ const struct GNUNET_HashCode *key,
void *value)
{
const struct GNUNET_DHT_ClientResultMessage *dht_msg = cls;
@@ -700,14 +700,14 @@ process_reply (void *cls,
data = &get_path[get_path_length];
/* remember that we've seen this result */
GNUNET_CRYPTO_hash (data, data_length, &hc);
- if (get_handle->seen_results_size == get_handle->seen_results_end)
+ if (get_handle->seen_results_size == get_handle->seen_results_end)
GNUNET_array_grow (get_handle->seen_results,
get_handle->seen_results_size,
get_handle->seen_results_size * 2 + 1);
GNUNET_assert (get_handle->seen_results_end == get_handle->seen_results_transmission_offset);
get_handle->seen_results[get_handle->seen_results_end++] = hc;
/* no need to block it explicitly, service already knows about it! */
- get_handle->seen_results_transmission_offset++;
+ get_handle->seen_results_transmission_offset++;
get_handle->iter (get_handle->iter_cls,
GNUNET_TIME_absolute_ntoh (dht_msg->expiration), key,
get_path, get_path_length, put_path, put_path_length,
@@ -746,7 +746,7 @@ process_monitor_get_message (struct GNUNET_DHT_Handle *handle,
ntohl (msg->desired_replication_level),
ntohl (msg->get_path_length),
(struct GNUNET_PeerIdentity *) &msg[1],
- &msg->key);
+ &msg->key);
}
return GNUNET_OK;
}
@@ -879,7 +879,7 @@ process_put_confirmation_message (struct GNUNET_DHT_Handle *handle,
cont = ph->cont;
cont_cls = ph->cont_cls;
GNUNET_DHT_put_cancel (ph);
- if (NULL != cont)
+ if (NULL != cont)
cont (cont_cls, GNUNET_OK);
return GNUNET_OK;
}
@@ -1132,11 +1132,11 @@ mark_put_message_gone (void *cls,
* @param cont_cls closure for @a cont
*/
struct GNUNET_DHT_PutHandle *
-GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options,
- enum GNUNET_BLOCK_Type type, size_t size,
+ enum GNUNET_BLOCK_Type type, size_t size,
const void *data,
struct GNUNET_TIME_Absolute exp,
struct GNUNET_TIME_Relative timeout,
@@ -1194,7 +1194,7 @@ GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
* go out over the network (we can't stop that); However, if the PUT
* has not yet been sent to the service, cancelling the PUT will stop
* this from happening (but there is no way for the user of this API
- * to tell if that is the case). The only use for this API is to
+ * to tell if that is the case). The only use for this API is to
* prevent a later call to 'cont' from #GNUNET_DHT_put (i.e. because
* the system is shutting down).
*
@@ -1310,7 +1310,7 @@ GNUNET_DHT_get_filter_known_results (struct GNUNET_DHT_GetHandle *get_handle,
unsigned int needed;
needed = get_handle->seen_results_end + num_results;
- if (needed > get_handle->seen_results_size)
+ if (needed > get_handle->seen_results_size)
GNUNET_array_grow (get_handle->seen_results,
get_handle->seen_results_size,
needed);
@@ -1483,7 +1483,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle)
pending);
pending->in_pending_queue = GNUNET_YES;
process_pending_messages (handle->dht_handle);
-
+
GNUNET_free_non_null (handle->key);
GNUNET_free (handle);
}
diff --git a/src/dht/dht_test_lib.c b/src/dht/dht_test_lib.c
index de41b2ecc..9864da949 100644
--- a/src/dht/dht_test_lib.c
+++ b/src/dht/dht_test_lib.c
@@ -49,7 +49,7 @@ struct GNUNET_DHT_TEST_Context
* Main function of the test to run once all DHTs are available.
*/
GNUNET_DHT_TEST_AppMain app_main;
-
+
/**
* Closure for 'app_main'.
*/
@@ -73,7 +73,7 @@ struct GNUNET_DHT_TEST_Context
* from GNUNET_TESTBED_service_connect()
* @return service handle to return in 'op_result', NULL on error
*/
-static void *
+static void *
dht_connect_adapter (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
@@ -88,7 +88,7 @@ dht_connect_adapter (void *cls,
* @param cls closure
* @param op_result service handle returned from the connect adapter
*/
-static void
+static void
dht_disconnect_adapter (void *cls,
void *op_result)
{
@@ -107,7 +107,7 @@ dht_disconnect_adapter (void *cls,
* @param emsg error message in case the operation has failed; will be NULL if
* operation has executed successfully.
*/
-static void
+static void
dht_connect_cb (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
@@ -115,7 +115,7 @@ dht_connect_cb (void *cls,
{
struct GNUNET_DHT_TEST_Context *ctx = cls;
unsigned int i;
-
+
if (NULL != emsg)
{
fprintf (stderr, "Failed to connect to DHT service: %s\n",
@@ -134,7 +134,7 @@ dht_connect_cb (void *cls,
ctx,
ctx->num_peers,
ctx->peers,
- ctx->dhts);
+ ctx->dhts);
}
@@ -192,7 +192,7 @@ dht_test_run (void *cls,
* @param tmain main function to run once the testbed is ready
* @param tmain_cls closure for 'tmain'
*/
-void
+void
GNUNET_DHT_TEST_run (const char *testname,
const char *cfgname,
unsigned int num_peers,
@@ -200,7 +200,7 @@ GNUNET_DHT_TEST_run (const char *testname,
void *tmain_cls)
{
struct GNUNET_DHT_TEST_Context *ctx;
-
+
ctx = GNUNET_malloc (sizeof (struct GNUNET_DHT_TEST_Context));
ctx->num_peers = num_peers;
ctx->ops = GNUNET_malloc (num_peers * sizeof (struct GNUNET_TESTBED_Operation *));
diff --git a/src/dht/dht_test_lib.h b/src/dht/dht_test_lib.h
index 061794af4..bfa9c1d85 100644
--- a/src/dht/dht_test_lib.h
+++ b/src/dht/dht_test_lib.h
@@ -68,7 +68,7 @@ typedef void (*GNUNET_DHT_TEST_AppMain) (void *cls,
* @param tmain main function to run once the testbed is ready
* @param tmain_cls closure for 'tmain'
*/
-void
+void
GNUNET_DHT_TEST_run (const char *testname,
const char *cfgname,
unsigned int num_peers,
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c
index 345a58a13..e7e809323 100644
--- a/src/dht/gnunet-dht-get.c
+++ b/src/dht/gnunet-dht-get.c
@@ -128,8 +128,8 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
size_t size, const void *data)
{
- FPRINTF (stdout,
- _("Result %d, type %d:\n%.*s\n"),
+ FPRINTF (stdout,
+ _("Result %d, type %d:\n%.*s\n"),
result_count, type,
(unsigned int) size, (char *) data);
result_count++;
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c
index b03c7c7c0..6ec29030d 100644
--- a/src/dht/gnunet-dht-monitor.c
+++ b/src/dht/gnunet-dht-monitor.c
@@ -152,7 +152,7 @@ get_resp_callback (void *cls,
const void *data,
size_t size)
{
- FPRINTF (stdout,
+ FPRINTF (stdout,
"RESPONSE #%u: type %d, key `%s', data `%.*s'\n",
result_count,
(int) type,
@@ -191,7 +191,7 @@ put_callback (void *cls,
const void *data,
size_t size)
{
- FPRINTF (stdout,
+ FPRINTF (stdout,
"PUT %u: type %d, key `%s', data `%.*s'\n",
result_count,
(int) type,
@@ -221,14 +221,14 @@ run (void *cls, char *const *args, const char *cfgfile,
if (NULL == (dht_handle = GNUNET_DHT_connect (cfg, 1)))
{
- FPRINTF (stderr, "%s",
+ FPRINTF (stderr, "%s",
_("Failed to connect to DHT service!\n"));
ret = 1;
return;
}
if (GNUNET_BLOCK_TYPE_ANY == block_type) /* Type of data not set */
block_type = GNUNET_BLOCK_TYPE_TEST;
- if (NULL != query_key)
+ if (NULL != query_key)
{
key = &hc;
if (GNUNET_OK !=
@@ -240,8 +240,8 @@ run (void *cls, char *const *args, const char *cfgfile,
key = NULL;
}
if (verbose)
- FPRINTF (stderr,
- "Monitoring for %s\n",
+ FPRINTF (stderr,
+ "Monitoring for %s\n",
GNUNET_STRINGS_relative_time_to_string (timeout_request, GNUNET_NO));
GNUNET_SCHEDULER_add_delayed (timeout_request, &cleanup_task, NULL);
monitor_handle = GNUNET_DHT_monitor_start (dht_handle,
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index 20fbba789..f91311cf3 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -199,7 +199,7 @@ struct ClientMonitorRecord
* Previous element in DLL.
*/
struct ClientMonitorRecord *prev;
-
+
/**
* Type of blocks that are of interest
*/
@@ -367,7 +367,7 @@ handle_client_disconnect (void *cls,
struct ClientMonitorRecord *monitor;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Local client %p disconnects\n",
+ "Local client %p disconnects\n",
client);
pos = find_active_client (client);
GNUNET_CONTAINER_DLL_remove (client_head, client_tail, pos);
@@ -384,7 +384,7 @@ handle_client_disconnect (void *cls,
if (monitor->client == pos)
{
struct ClientMonitorRecord *next;
-
+
GNUNET_free_non_null (monitor->key);
next = monitor->next;
GNUNET_CONTAINER_DLL_remove (monitor_head, monitor_tail, monitor);
@@ -550,7 +550,7 @@ handle_dht_local_put (void *cls, struct GNUNET_SERVER_Client *client,
&dht_msg[1],
size - sizeof (struct GNUNET_DHT_ClientPutMessage));
GNUNET_CONTAINER_bloomfilter_free (peer_bf);
- pm = GNUNET_malloc (sizeof (struct PendingMessage) +
+ pm = GNUNET_malloc (sizeof (struct PendingMessage) +
sizeof (struct GNUNET_DHT_ClientPutConfirmationMessage));
conf = (struct GNUNET_DHT_ClientPutConfirmationMessage *) &pm[1];
conf->header.size = htons (sizeof (struct GNUNET_DHT_ClientPutConfirmationMessage));
@@ -884,7 +884,7 @@ handle_dht_local_monitor_stop (void *cls, struct GNUNET_SERVER_Client *client,
}
r = r->next;
}
-
+
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
@@ -1226,7 +1226,7 @@ void
GDS_CLIENTS_process_get (uint32_t options,
enum GNUNET_BLOCK_Type type,
uint32_t hop_count,
- uint32_t desired_replication_level,
+ uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
const struct GNUNET_HashCode * key)
@@ -1386,7 +1386,7 @@ void
GDS_CLIENTS_process_put (uint32_t options,
enum GNUNET_BLOCK_Type type,
uint32_t hop_count,
- uint32_t desired_replication_level,
+ uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
diff --git a/src/dht/gnunet-service-dht_clients.h b/src/dht/gnunet-service-dht_clients.h
index f6d4253d5..44491377e 100644
--- a/src/dht/gnunet-service-dht_clients.h
+++ b/src/dht/gnunet-service-dht_clients.h
@@ -72,7 +72,7 @@ void
GDS_CLIENTS_process_get (uint32_t options,
enum GNUNET_BLOCK_Type type,
uint32_t hop_count,
- uint32_t desired_replication_level,
+ uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
const struct GNUNET_HashCode * key);
@@ -121,7 +121,7 @@ void
GDS_CLIENTS_process_put (uint32_t options,
enum GNUNET_BLOCK_Type type,
uint32_t hop_count,
- uint32_t desired_replication_level,
+ uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c
index 6f25a90d7..0e6daa120 100644
--- a/src/dht/gnunet-service-dht_datacache.c
+++ b/src/dht/gnunet-service-dht_datacache.c
@@ -137,7 +137,7 @@ struct GetRequestContext
* to stop iteration.
*/
static int
-datacache_get_iterator (void *cls,
+datacache_get_iterator (void *cls,
const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute exp,
@@ -239,7 +239,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
ctx.xquery_size = xquery_size;
ctx.reply_bf = reply_bf;
ctx.reply_bf_mutator = reply_bf_mutator;
- r = GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator,
+ r = GNUNET_DATACACHE_get (datacache, key, type, &datacache_get_iterator,
&ctx);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"DATACACHE GET for key %s completed (%d). %u results found.\n",
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c
index d3415d11d..bc964b91f 100644
--- a/src/dht/gnunet-service-dht_hello.c
+++ b/src/dht/gnunet-service-dht_hello.c
@@ -107,8 +107,8 @@ GDS_HELLO_init ()
* Free memory occopied by the HELLO.
*/
static int
-free_hello (void *cls,
- const struct GNUNET_PeerIdentity *key,
+free_hello (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *hello)
{
GNUNET_free (hello);
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 908575735..889ef25ba 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -313,7 +313,7 @@ struct PeerInfo
struct PeerInfo *prev;
/**
- * Count of outstanding messages for peer.
+ * Count of outstanding messages for peer.
*/
unsigned int pending_count;
@@ -553,8 +553,8 @@ struct BloomConstructorContext
* @return #GNUNET_YES (we should continue to iterate)
*/
static int
-add_known_to_bloom (void *cls,
- const struct GNUNET_PeerIdentity *key,
+add_known_to_bloom (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct BloomConstructorContext *ctx = cls;
@@ -649,7 +649,7 @@ handle_core_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
/* Check for connect to self message */
if (0 == memcmp (&my_identity, peer, sizeof (struct GNUNET_PeerIdentity)))
return;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Connected to %s\n",
GNUNET_i2s (peer));
if (GNUNET_YES ==
@@ -714,7 +714,7 @@ handle_core_disconnect (void *cls,
/* Check for disconnect from self message */
if (0 == memcmp (&my_identity, peer, sizeof (struct GNUNET_PeerIdentity)))
return;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Disconnected %s\n",
GNUNET_i2s (peer));
to_remove =
@@ -919,14 +919,14 @@ get_forward_count (uint32_t hop_count, uint32_t target_replication)
* Differences in the lower bits must count stronger than differences
* in the higher bits.
*
- * @param target
+ * @param target
* @param have
* @return 0 if have==target, otherwise a number
* that is larger as the distance between
* the two hash codes increases
*/
static unsigned int
-get_distance (const struct GNUNET_HashCode *target,
+get_distance (const struct GNUNET_HashCode *target,
const struct GNUNET_HashCode *have)
{
unsigned int bucket;
@@ -1197,7 +1197,7 @@ get_target_peers (const struct GNUNET_HashCode *key,
struct GNUNET_HashCode nhash;
GNUNET_assert (NULL != bloom);
- ret = get_forward_count (hop_count, target_replication);
+ ret = get_forward_count (hop_count, target_replication);
if (0 == ret)
{
*targets = NULL;
@@ -1231,7 +1231,7 @@ get_target_peers (const struct GNUNET_HashCode *key,
*targets = rtargets;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Forwarding query `%s' to %u peers (goal was %u peers)\n",
- GNUNET_h2s (key),
+ GNUNET_h2s (key),
off,
ret);
return off;
@@ -1601,7 +1601,7 @@ core_init (void *cls,
* #GNUNET_SYSERR to close it (signal serious error)
*/
static int
-handle_dht_p2p_put (void *cls,
+handle_dht_p2p_put (void *cls,
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message)
{
@@ -1654,7 +1654,7 @@ handle_dht_p2p_put (void *cls,
tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
- "XDHT PUT %s: %s->%s (%u, %u=>%u)\n",
+ "XDHT PUT %s: %s->%s (%u, %u=>%u)\n",
GNUNET_h2s (&put->key), GNUNET_i2s (peer), tmp,
ntohl(put->hop_count),
GNUNET_CRYPTO_hash_matching_bits (&phash, &put->key),
@@ -1913,7 +1913,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
- "XDHT GET %s: %s->%s (%u, %u=>%u) xq: %.*s\n",
+ "XDHT GET %s: %s->%s (%u, %u=>%u) xq: %.*s\n",
GNUNET_h2s (&get->key), GNUNET_i2s (peer), tmp,
ntohl(get->hop_count),
GNUNET_CRYPTO_hash_matching_bits (&phash, &get->key),
@@ -2059,7 +2059,7 @@ handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
char *tmp;
tmp = GNUNET_strdup (GNUNET_i2s (&my_identity));
- LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT RESULT %s: %s->%s (%u)\n",
+ LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT RESULT %s: %s->%s (%u)\n",
GNUNET_h2s (&prm->key), GNUNET_i2s (peer), tmp,
get_path_length + 1);
GNUNET_free (tmp);
@@ -2132,10 +2132,10 @@ handle_dht_p2p_result (void *cls, const struct GNUNET_PeerIdentity *peer,
struct GNUNET_PeerIdentity xput_path[get_path_length + 1 + put_path_length];
memcpy (xput_path, put_path, put_path_length * sizeof (struct GNUNET_PeerIdentity));
- memcpy (&xput_path[put_path_length],
- xget_path,
+ memcpy (&xput_path[put_path_length],
+ xget_path,
get_path_length * sizeof (struct GNUNET_PeerIdentity));
-
+
GDS_DATACACHE_handle_put (GNUNET_TIME_absolute_ntoh (prm->expiration_time),
&prm->key,
get_path_length + put_path_length, xput_path,
@@ -2214,7 +2214,7 @@ GDS_NEIGHBOURS_done ()
/**
* Get the ID of the local node.
- *
+ *
* @return identity of the local node
*/
struct GNUNET_PeerIdentity *
diff --git a/src/dht/gnunet-service-dht_neighbours.h b/src/dht/gnunet-service-dht_neighbours.h
index b3b33e318..225c4aae0 100644
--- a/src/dht/gnunet-service-dht_neighbours.h
+++ b/src/dht/gnunet-service-dht_neighbours.h
@@ -137,7 +137,7 @@ GDS_NEIGHBOURS_done (void);
/**
* Get the ID of the local node.
- *
+ *
* @return identity of the local node
*/
struct GNUNET_PeerIdentity *
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c
index d7e6505b0..e2995bd49 100644
--- a/src/dht/gnunet-service-dht_routing.c
+++ b/src/dht/gnunet-service-dht_routing.c
@@ -321,8 +321,8 @@ expire_oldest_entry ()
GNUNET_CONTAINER_heap_remove_node (recent_req->heap_node);
GNUNET_CONTAINER_bloomfilter_free (recent_req->reply_bf);
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (recent_map,
- &recent_req->key,
+ GNUNET_CONTAINER_multihashmap_remove (recent_map,
+ &recent_req->key,
recent_req));
GNUNET_free (recent_req);
}
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c
index b1c39e893..2295866d3 100644
--- a/src/dht/test_dht_api.c
+++ b/src/dht/test_dht_api.c
@@ -172,7 +172,7 @@ test_get (void *cls, int success)
retry_context.next_timeout = BASE_TIMEOUT;
get_handle =
- GNUNET_DHT_get_start (dht_handle,
+ GNUNET_DHT_get_start (dht_handle,
GNUNET_BLOCK_TYPE_TEST, &hash, 1,
GNUNET_DHT_RO_NONE, NULL, 0, &test_get_iterator,
NULL);
diff --git a/src/dht/test_dht_monitor.c b/src/dht/test_dht_monitor.c
index 74024edf2..303fe8f87 100644
--- a/src/dht/test_dht_monitor.c
+++ b/src/dht/test_dht_monitor.c
@@ -42,7 +42,7 @@
/**
* Information we keep for each GET operation.
*/
-struct GetOperation
+struct GetOperation
{
/**
* DLL.
@@ -79,7 +79,7 @@ static struct GetOperation *get_tail;
/**
* Array of the testbed's peers.
- */
+ */
static struct GNUNET_TESTBED_Peer **my_peers;
/**
@@ -109,9 +109,9 @@ static unsigned int monitor_counter;
*
* @param cls the 'struct GNUNET_DHT_TestContext'
* @param tc scheduler context
- */
+ */
static void
-shutdown_task (void *cls,
+shutdown_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_DHT_TEST_Context *ctx = cls;
@@ -177,7 +177,7 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp,
GNUNET_break (0);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Get successful\n");
GNUNET_DHT_get_stop (get_op->get);
GNUNET_CONTAINER_DLL_remove (get_head,
@@ -195,7 +195,7 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp,
/**
* Task to put the id of each peer into the DHT.
- *
+ *
* @param cls array with NUM_PEERS DHT handles
* @param tc Task context
*/
@@ -208,7 +208,7 @@ do_puts (void *cls,
struct GNUNET_HashCode value;
unsigned int i;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Putting values into DHT\n");
for (i = 0; i < NUM_PEERS; i++)
{
@@ -217,13 +217,13 @@ do_puts (void *cls,
GNUNET_DHT_put (hs[i], &key, 10U,
GNUNET_DHT_RO_RECORD_ROUTE |
GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
- GNUNET_BLOCK_TYPE_TEST,
- sizeof (value), &value,
+ GNUNET_BLOCK_TYPE_TEST,
+ sizeof (value), &value,
GNUNET_TIME_UNIT_FOREVER_ABS,
- GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_TIME_UNIT_FOREVER_REL,
NULL, NULL);
}
- put_task = GNUNET_SCHEDULER_add_delayed (PUT_FREQUENCY,
+ put_task = GNUNET_SCHEDULER_add_delayed (PUT_FREQUENCY,
&do_puts, hs);
}
@@ -296,7 +296,7 @@ monitor_put_cb (void *cls,
i = (unsigned int) (long) cls;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"%u got a PUT message for key %s with %u bytes\n",
- i,
+ i,
GNUNET_h2s (key), size);
monitor_counter++;
}
@@ -334,7 +334,7 @@ monitor_res_cb (void *cls,
i = (unsigned int) (long) cls;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"%u got a REPLY message for key %s with %u bytes\n",
- i,
+ i,
GNUNET_h2s (key), size);
monitor_counter++;
}
@@ -372,7 +372,7 @@ run (void *cls,
&monitor_res_cb,
&monitor_put_cb,
(void *)(long)i);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peers setup, starting test\n");
put_task = GNUNET_SCHEDULER_add_now (&do_puts, dhts);
for (i=0;i<num_peers;i++)
@@ -384,7 +384,7 @@ run (void *cls,
GNUNET_CONTAINER_DLL_insert (get_head,
get_tail,
get_op);
- get_op->get = GNUNET_DHT_get_start (dhts[j],
+ get_op->get = GNUNET_DHT_get_start (dhts[j],
GNUNET_BLOCK_TYPE_TEST, /* type */
&key, /*key to search */
4U, /* replication level */
@@ -394,7 +394,7 @@ run (void *cls,
&dht_get_handler, get_op);
}
}
- timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
+ timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&shutdown_task, ctx);
}
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c
index 1ab580d5b..1fd61129b 100644
--- a/src/dht/test_dht_topo.c
+++ b/src/dht/test_dht_topo.c
@@ -43,7 +43,7 @@
/**
* Information we keep for each GET operation.
*/
-struct GetOperation
+struct GetOperation
{
/**
* DLL.
@@ -90,7 +90,7 @@ static struct GetOperation *get_tail;
/**
* Array of the testbed's peers.
- */
+ */
static struct GNUNET_TESTBED_Peer **my_peers;
/**
@@ -173,10 +173,10 @@ stats_finished (void *cls,
return;
}
for (i = 0; NULL != stats[i].name; i++)
- FPRINTF (stderr,
- "%6s/%60s = %12llu\n",
+ FPRINTF (stderr,
+ "%6s/%60s = %12llu\n",
stats[i].subsystem,
- stats[i].name,
+ stats[i].name,
stats[i].total);
GNUNET_SCHEDULER_cancel (put_task);
GNUNET_DHT_TEST_cleanup (ctx);
@@ -194,7 +194,7 @@ stats_finished (void *cls,
* @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
* @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
*/
-static int
+static int
handle_stats (void *cls,
const struct GNUNET_TESTBED_Peer *peer,
const char *subsystem,
@@ -221,9 +221,9 @@ handle_stats (void *cls,
*
* @param cls the 'struct GNUNET_DHT_TestContext'
* @param tc scheduler context
- */
+ */
static void
-shutdown_task (void *cls,
+shutdown_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_DHT_TEST_Context *ctx = cls;
@@ -285,7 +285,7 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp,
GNUNET_break (0);
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Get successful\n");
#if 0
{
@@ -318,7 +318,7 @@ dht_get_handler (void *cls, struct GNUNET_TIME_Absolute exp,
/**
* Task to put the id of each peer into the DHT.
- *
+ *
* @param cls array with NUM_PEERS DHT handles
* @param tc Task context
*/
@@ -331,7 +331,7 @@ do_puts (void *cls,
struct GNUNET_HashCode value;
unsigned int i;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Putting values into DHT\n");
for (i = 0; i < NUM_PEERS; i++)
{
@@ -340,13 +340,13 @@ do_puts (void *cls,
GNUNET_DHT_put (hs[i], &key, 10U,
GNUNET_DHT_RO_RECORD_ROUTE |
GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
- GNUNET_BLOCK_TYPE_TEST,
- sizeof (value), &value,
+ GNUNET_BLOCK_TYPE_TEST,
+ sizeof (value), &value,
GNUNET_TIME_UNIT_FOREVER_ABS,
- GNUNET_TIME_UNIT_FOREVER_REL,
+ GNUNET_TIME_UNIT_FOREVER_REL,
NULL, NULL);
}
- put_task = GNUNET_SCHEDULER_add_delayed (PUT_FREQUENCY,
+ put_task = GNUNET_SCHEDULER_add_delayed (PUT_FREQUENCY,
&do_puts, hs);
}
@@ -374,7 +374,7 @@ run (void *cls,
GNUNET_assert (NUM_PEERS == num_peers);
my_peers = peers;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Peers setup, starting test\n");
put_task = GNUNET_SCHEDULER_add_now (&do_puts, dhts);
for (i=0;i<num_peers;i++)
@@ -386,7 +386,7 @@ run (void *cls,
GNUNET_CONTAINER_DLL_insert (get_head,
get_tail,
get_op);
- get_op->get = GNUNET_DHT_get_start (dhts[j],
+ get_op->get = GNUNET_DHT_get_start (dhts[j],
GNUNET_BLOCK_TYPE_TEST, /* type */
&key, /*key to search */
4U, /* replication level */
@@ -396,7 +396,7 @@ run (void *cls,
&dht_get_handler, get_op);
}
}
- timeout_task = GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT,
+ timeout_task = GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT,
&shutdown_task, ctx);
}
@@ -409,7 +409,7 @@ main (int xargc, char *xargv[])
{
const char *cfg_filename;
const char *test_name;
-
+
if (NULL != strstr (xargv[0], "test_dht_2dtorus"))
{
cfg_filename = "test_dht_2dtorus.conf";
@@ -418,19 +418,19 @@ main (int xargc, char *xargv[])
}
else if (NULL != strstr (xargv[0], "test_dht_line"))
{
- cfg_filename = "test_dht_line.conf";
+ cfg_filename = "test_dht_line.conf";
test_name = "test-dht-line";
NUM_PEERS = 5;
}
else if (NULL != strstr (xargv[0], "test_dht_twopeer"))
{
- cfg_filename = "test_dht_line.conf";
+ cfg_filename = "test_dht_line.conf";
test_name = "test-dht-twopeer";
NUM_PEERS = 2;
}
else if (NULL != strstr (xargv[0], "test_dht_multipeer"))
{
- cfg_filename = "test_dht_multipeer.conf";
+ cfg_filename = "test_dht_multipeer.conf";
test_name = "test-dht-multipeer";
NUM_PEERS = 10;
}
diff --git a/src/dns/dns.h b/src/dns/dns.h
index 7ee49a9c8..4c41335a3 100644
--- a/src/dns/dns.h
+++ b/src/dns/dns.h
@@ -60,7 +60,7 @@ struct GNUNET_DNS_Request
* Always zero.
*/
uint32_t reserved GNUNET_PACKED;
-
+
/**
* Unique request ID.
*/
@@ -85,7 +85,7 @@ struct GNUNET_DNS_Response
* Zero to drop, 1 for no change (no payload), 2 for update (message has payload).
*/
uint32_t drop_flag GNUNET_PACKED;
-
+
/**
* Unique request ID.
*/
diff --git a/src/dns/dns_api.c b/src/dns/dns_api.c
index f48457a01..9a8e1ca2d 100644
--- a/src/dns/dns_api.c
+++ b/src/dns/dns_api.c
@@ -20,7 +20,7 @@
/**
* @file dns/dns_api.c
- * @brief API to access the DNS service.
+ * @brief API to access the DNS service.
* @author Christian Grothoff
*/
#include "platform.h"
@@ -100,7 +100,7 @@ struct GNUNET_DNS_Handle
* Function to call to get replies.
*/
GNUNET_DNS_RequestHandler rh;
-
+
/**
* Closure for 'rh'.
*/
@@ -125,7 +125,7 @@ struct GNUNET_DNS_Handle
* Re-connect counter, to make sure we did not reconnect in the meantime.
*/
uint32_t generation;
-
+
/**
* Flags for events we care about.
*/
@@ -253,7 +253,7 @@ request_handler (void *cls,
req = (const struct GNUNET_DNS_Request *) msg;
GNUNET_break (ntohl (req->reserved) == 0);
payload_length = ntohs (req->header.size) - sizeof (struct GNUNET_DNS_Request);
- GNUNET_CLIENT_receive (dh->dns_connection,
+ GNUNET_CLIENT_receive (dh->dns_connection,
&request_handler, dh,
GNUNET_TIME_UNIT_FOREVER_REL);
@@ -261,7 +261,7 @@ request_handler (void *cls,
rh = GNUNET_malloc (sizeof (struct GNUNET_DNS_RequestHandle));
rh->dh =dh;
rh->request_id = req->request_id;
- rh->generation = dh->generation;
+ rh->generation = dh->generation;
dh->pending_requests++;
dh->rh (dh->rh_cls,
rh,
@@ -285,7 +285,7 @@ send_response (void *cls, size_t size, void *buf)
struct GNUNET_DNS_Handle *dh = cls;
struct ReplyQueueEntry *qe;
size_t len;
-
+
dh->dns_transmit_handle = NULL;
if (NULL == buf)
{
@@ -300,12 +300,12 @@ send_response (void *cls, size_t size, void *buf)
return 0;
len = ntohs (qe->msg->size);
if (len > size)
- {
+ {
dh->dns_transmit_handle =
GNUNET_CLIENT_notify_transmit_ready (dh->dns_connection,
len,
GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
+ GNUNET_NO,
&send_response, dh);
return 0;
}
@@ -317,7 +317,7 @@ send_response (void *cls, size_t size, void *buf)
if (GNUNET_NO == dh->in_receive)
{
dh->in_receive = GNUNET_YES;
- GNUNET_CLIENT_receive (dh->dns_connection,
+ GNUNET_CLIENT_receive (dh->dns_connection,
&request_handler, dh,
GNUNET_TIME_UNIT_FOREVER_REL);
}
@@ -327,11 +327,11 @@ send_response (void *cls, size_t size, void *buf)
GNUNET_CLIENT_notify_transmit_ready (dh->dns_connection,
ntohs (qe->msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
+ GNUNET_NO,
&send_response, dh);
}
return len;
-}
+}
/**
@@ -344,7 +344,7 @@ static void
queue_reply (struct GNUNET_DNS_Handle *dh,
struct ReplyQueueEntry *qe)
{
- if (NULL == dh->dns_connection)
+ if (NULL == dh->dns_connection)
{
GNUNET_free (qe);
return;
@@ -354,12 +354,12 @@ queue_reply (struct GNUNET_DNS_Handle *dh,
qe);
if (NULL != dh->dns_transmit_handle)
return;
- /* trigger sending */
+ /* trigger sending */
dh->dns_transmit_handle =
GNUNET_CLIENT_notify_transmit_ready (dh->dns_connection,
ntohs (dh->rq_head->msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
+ GNUNET_NO,
&send_response, dh);
}
@@ -440,7 +440,7 @@ GNUNET_DNS_request_drop (struct GNUNET_DNS_RequestHandle *rh)
* @param reply reply data
*/
void
-GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh,
+GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh,
uint16_t reply_length,
const char *reply)
{
@@ -480,7 +480,7 @@ GNUNET_DNS_request_answer (struct GNUNET_DNS_RequestHandle *rh,
* @param flags when to call rh
* @param rh function to call with DNS requests
* @param rh_cls closure to pass to rh
- * @return DNS handle
+ * @return DNS handle
*/
struct GNUNET_DNS_Handle *
GNUNET_DNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -489,7 +489,7 @@ GNUNET_DNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
void *rh_cls)
{
struct GNUNET_DNS_Handle *dh;
-
+
dh = GNUNET_malloc (sizeof (struct GNUNET_DNS_Handle));
dh->cfg = cfg;
dh->flags = flags;
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 369f90215..d10da1ca9 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -20,7 +20,7 @@
/**
* @file dns/dnsparser.c
- * @brief helper library to parse DNS packets.
+ * @brief helper library to parse DNS packets.
* @author Philipp Toelke
* @author Christian Grothoff
*/
@@ -47,10 +47,10 @@ GNUNET_DNSPARSER_check_label (const char *label)
{
char *output;
size_t slen;
-
+
if (NULL != strchr (label, '.'))
return GNUNET_SYSERR; /* not a label! Did you mean GNUNET_DNSPARSER_check_name? */
- if (IDNA_SUCCESS !=
+ if (IDNA_SUCCESS !=
idna_to_ascii_8z (label, &output, IDNA_ALLOW_UNASSIGNED))
return GNUNET_SYSERR;
slen = strlen (output);
@@ -78,7 +78,7 @@ GNUNET_DNSPARSER_check_name (const char *name)
char *output;
size_t slen;
char *tok;
-
+
ldup = GNUNET_strdup (name);
for (tok = strtok (ldup, "."); NULL != tok; tok = strtok (NULL, "."))
if (GNUNET_OK !=
@@ -88,7 +88,7 @@ GNUNET_DNSPARSER_check_name (const char *name)
return GNUNET_SYSERR;
}
GNUNET_free (ldup);
- if (IDNA_SUCCESS !=
+ if (IDNA_SUCCESS !=
idna_to_ascii_8z (name, &output, IDNA_ALLOW_UNASSIGNED))
return GNUNET_SYSERR;
slen = strlen (output);
@@ -113,7 +113,7 @@ GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa)
return;
GNUNET_free_non_null (soa->mname);
GNUNET_free_non_null (soa->rname);
- GNUNET_free (soa);
+ GNUNET_free (soa);
}
@@ -131,7 +131,7 @@ GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv)
GNUNET_free_non_null (srv->domain_name);
GNUNET_free_non_null (srv->proto);
GNUNET_free_non_null (srv->service);
- GNUNET_free (srv);
+ GNUNET_free (srv);
}
@@ -146,13 +146,13 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx)
if (NULL == mx)
return;
GNUNET_free_non_null (mx->mxhost);
- GNUNET_free (mx);
+ GNUNET_free (mx);
}
/**
* Free the given DNS record.
- *
+ *
* @param r record to free
*/
void
@@ -206,7 +206,7 @@ parse_name (const char *udp_payload,
size_t xoff;
char *utf8;
Idna_rc rc;
-
+
ret = GNUNET_strdup ("");
while (1)
{
@@ -301,7 +301,7 @@ parse_name (const char *udp_payload,
*off += 2;
/* pointers always terminate names */
break;
- }
+ }
else
{
/* neither pointer nor inline string, not supported... */
@@ -312,7 +312,7 @@ parse_name (const char *udp_payload,
if (0 < strlen(ret))
ret[strlen(ret)-1] = '\0'; /* eat tailing '.' */
return ret;
- error:
+ error:
GNUNET_break_op (0);
GNUNET_free (ret);
return NULL;
@@ -356,7 +356,7 @@ GNUNET_DNSPARSER_parse_query (const char *udp_payload,
char *name;
struct GNUNET_TUN_DnsQueryLine ql;
- name = GNUNET_DNSPARSER_parse_name (udp_payload,
+ name = GNUNET_DNSPARSER_parse_name (udp_payload,
udp_payload_length,
off);
if (NULL == name)
@@ -414,7 +414,7 @@ GNUNET_DNSPARSER_parse_soa (const char *udp_payload,
return NULL;
}
memcpy (&soa_bin,
- &udp_payload[*off],
+ &udp_payload[*off],
sizeof (struct GNUNET_TUN_DnsSoaRecord));
soa->serial = ntohl (soa_bin.serial);
soa->refresh = ntohl (soa_bin.refresh);
@@ -450,7 +450,7 @@ GNUNET_DNSPARSER_parse_mx (const char *udp_payload,
GNUNET_break_op (0);
return NULL;
}
- memcpy (&mxpref, &udp_payload[*off], sizeof (uint16_t));
+ memcpy (&mxpref, &udp_payload[*off], sizeof (uint16_t));
(*off) += sizeof (uint16_t);
mx = GNUNET_new (struct GNUNET_DNSPARSER_MxRecord);
mx->preference = ntohs (mxpref);
@@ -498,8 +498,8 @@ GNUNET_DNSPARSER_parse_srv (const char *r_name,
if (*off + sizeof (struct GNUNET_TUN_DnsSrvRecord) > udp_payload_length)
return NULL;
memcpy (&srv_bin,
- &udp_payload[*off],
- sizeof (struct GNUNET_TUN_DnsSrvRecord));
+ &udp_payload[*off],
+ sizeof (struct GNUNET_TUN_DnsSrvRecord));
(*off) += sizeof (struct GNUNET_TUN_DnsSrvRecord);
srv = GNUNET_new (struct GNUNET_DNSPARSER_SrvRecord);
srv->priority = ntohs (srv_bin.prio);
@@ -565,7 +565,7 @@ GNUNET_DNSPARSER_parse_record (const char *udp_payload,
size_t old_off;
uint16_t data_len;
- name = GNUNET_DNSPARSER_parse_name (udp_payload,
+ name = GNUNET_DNSPARSER_parse_name (udp_payload,
udp_payload_length,
off);
if (NULL == name)
@@ -599,7 +599,7 @@ GNUNET_DNSPARSER_parse_record (const char *udp_payload,
case GNUNET_DNSPARSER_TYPE_PTR:
r->data.hostname = GNUNET_DNSPARSER_parse_name (udp_payload,
udp_payload_length,
- off);
+ off);
if ( (NULL == r->data.hostname) ||
(old_off + data_len != *off) )
return GNUNET_SYSERR;
@@ -645,7 +645,7 @@ GNUNET_DNSPARSER_parse_record (const char *udp_payload,
break;
}
(*off) += data_len;
- return GNUNET_OK;
+ return GNUNET_OK;
}
@@ -654,7 +654,7 @@ GNUNET_DNSPARSER_parse_record (const char *udp_payload,
* processing and manipulation.
*
* @param udp_payload wire-format of the DNS packet
- * @param udp_payload_length number of bytes in @a udp_payload
+ * @param udp_payload_length number of bytes in @a udp_payload
* @return NULL on error, otherwise the parsed packet
*/
struct GNUNET_DNSPARSER_Packet *
@@ -664,7 +664,7 @@ GNUNET_DNSPARSER_parse (const char *udp_payload,
struct GNUNET_DNSPARSER_Packet *p;
const struct GNUNET_TUN_DnsHeader *dns;
size_t off;
- unsigned int n;
+ unsigned int n;
unsigned int i;
if (udp_payload_length < sizeof (struct GNUNET_TUN_DnsHeader))
@@ -711,7 +711,7 @@ GNUNET_DNSPARSER_parse (const char *udp_payload,
udp_payload_length,
&off,
&p->authority_records[i]))
- goto error;
+ goto error;
}
n = ntohs (dns->additional_rcount);
if (n > 0)
@@ -724,7 +724,7 @@ GNUNET_DNSPARSER_parse (const char *udp_payload,
udp_payload_length,
&off,
&p->additional_records[i]))
- goto error;
+ goto error;
}
return p;
error:
@@ -793,7 +793,7 @@ GNUNET_DNSPARSER_builder_add_name (char *dst,
if (NULL == name)
return GNUNET_SYSERR;
- if (IDNA_SUCCESS !=
+ if (IDNA_SUCCESS !=
(rc = idna_to_ascii_8z (name, &idna_start, IDNA_ALLOW_UNASSIGNED)))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -815,7 +815,7 @@ GNUNET_DNSPARSER_builder_add_name (char *dst,
else
len = dot - idna_name;
if ( (len >= 64) || (0 == len) )
- goto fail; /* segment too long or empty */
+ goto fail; /* segment too long or empty */
dst[pos++] = (char) (uint8_t) len;
memcpy (&dst[pos], idna_name, len);
pos += len;
@@ -836,7 +836,7 @@ GNUNET_DNSPARSER_builder_add_name (char *dst,
#else
free (idna_start);
#endif
- return GNUNET_NO;
+ return GNUNET_NO;
}
@@ -1004,7 +1004,7 @@ add_record (char *dst,
size_t pos;
struct GNUNET_TUN_DnsRecordLine rl;
char *name;
-
+
start = *off;
/* for SRV records, we can create the name from the details
of the record if needed */
@@ -1025,9 +1025,9 @@ add_record (char *dst,
pos = *off + sizeof (struct GNUNET_TUN_DnsRecordLine);
switch (record->type)
- {
+ {
case GNUNET_DNSPARSER_TYPE_MX:
- ret = GNUNET_DNSPARSER_builder_add_mx (dst, dst_len, &pos, record->data.mx);
+ ret = GNUNET_DNSPARSER_builder_add_mx (dst, dst_len, &pos, record->data.mx);
break;
case GNUNET_DNSPARSER_TYPE_SOA:
ret = GNUNET_DNSPARSER_builder_add_soa (dst, dst_len, &pos, record->data.soa);
@@ -1069,14 +1069,14 @@ add_record (char *dst,
rl.data_len = htons ((uint16_t) (pos - (*off + sizeof (struct GNUNET_TUN_DnsRecordLine))));
memcpy (&dst[*off], &rl, sizeof (struct GNUNET_TUN_DnsRecordLine));
*off = pos;
- return GNUNET_OK;
+ return GNUNET_OK;
}
/**
* Given a DNS packet @a p, generate the corresponding UDP payload.
* Note that we do not attempt to pack the strings with pointers
- * as this would complicate the code and this is about being
+ * as this would complicate the code and this is about being
* simple and secure, not fast, fancy and broken like bind.
*
* @param p packet to pack
@@ -1092,14 +1092,14 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
uint16_t max,
char **buf,
size_t *buf_length)
-{
+{
struct GNUNET_TUN_DnsHeader dns;
size_t off;
char tmp[max];
unsigned int i;
int ret;
int trc;
-
+
if ( (p->num_queries > UINT16_MAX) ||
(p->num_answers > UINT16_MAX) ||
(p->num_authority_records > UINT16_MAX) ||
@@ -1116,55 +1116,55 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p,
trc = GNUNET_NO;
for (i=0;i<p->num_queries;i++)
{
- ret = GNUNET_DNSPARSER_builder_add_query (tmp, sizeof (tmp), &off, &p->queries[i]);
+ ret = GNUNET_DNSPARSER_builder_add_query (tmp, sizeof (tmp), &off, &p->queries[i]);
if (GNUNET_SYSERR == ret)
return GNUNET_SYSERR;
if (GNUNET_NO == ret)
{
dns.query_count = htons ((uint16_t) (i-1));
- trc = GNUNET_YES;
+ trc = GNUNET_YES;
break;
}
}
for (i=0;i<p->num_answers;i++)
{
- ret = add_record (tmp, sizeof (tmp), &off, &p->answers[i]);
+ ret = add_record (tmp, sizeof (tmp), &off, &p->answers[i]);
if (GNUNET_SYSERR == ret)
return GNUNET_SYSERR;
if (GNUNET_NO == ret)
{
dns.answer_rcount = htons ((uint16_t) (i-1));
- trc = GNUNET_YES;
+ trc = GNUNET_YES;
break;
}
}
for (i=0;i<p->num_authority_records;i++)
{
- ret = add_record (tmp, sizeof (tmp), &off, &p->authority_records[i]);
+ ret = add_record (tmp, sizeof (tmp), &off, &p->authority_records[i]);
if (GNUNET_SYSERR == ret)
return GNUNET_SYSERR;
if (GNUNET_NO == ret)
{
dns.authority_rcount = htons ((uint16_t) (i-1));
- trc = GNUNET_YES;
+ trc = GNUNET_YES;
break;
}
}
for (i=0;i<p->num_additional_records;i++)
{
- ret = add_record (tmp, sizeof (tmp), &off, &p->additional_records[i]);
+ ret = add_record (tmp, sizeof (tmp), &off, &p->additional_records[i]);
if (GNUNET_SYSERR == ret)
return GNUNET_SYSERR;
if (GNUNET_NO == ret)
{
dns.additional_rcount = htons (i-1);
- trc = GNUNET_YES;
+ trc = GNUNET_YES;
break;
}
}
if (GNUNET_YES == trc)
- dns.flags.message_truncated = 1;
+ dns.flags.message_truncated = 1;
memcpy (tmp, &dns, sizeof (struct GNUNET_TUN_DnsHeader));
*buf = GNUNET_malloc (off);
diff --git a/src/dns/dnsstub.c b/src/dns/dnsstub.c
index 0e130a77f..bd85bf896 100644
--- a/src/dns/dnsstub.c
+++ b/src/dns/dnsstub.c
@@ -43,7 +43,7 @@
*/
struct GNUNET_DNSSTUB_RequestSocket
{
-
+
/**
* UDP socket we use for this request for IPv4
*/
@@ -89,12 +89,12 @@ struct GNUNET_DNSSTUB_RequestSocket
/**
* Handle to the stub resolver.
- */
+ */
struct GNUNET_DNSSTUB_Context
{
/**
- * Array of all open sockets for DNS requests.
+ * Array of all open sockets for DNS requests.
*/
struct GNUNET_DNSSTUB_RequestSocket sockets[DNS_SOCKET_MAX];
@@ -138,7 +138,7 @@ cleanup_rs (struct GNUNET_DNSSTUB_RequestSocket *rs)
*
* @param af AF_INET or AF_INET6
* @return GNUNET_OK on success
- */
+ */
static struct GNUNET_NETWORK_Handle *
open_socket (int af)
{
@@ -168,11 +168,11 @@ open_socket (int af)
}
sa->sa_family = af;
if (GNUNET_OK != GNUNET_NETWORK_socket_bind (ret,
- sa,
+ sa,
alen,
0))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Could not bind to any port: %s\n"),
STRERROR (errno));
GNUNET_NETWORK_socket_close (ret);
@@ -195,7 +195,7 @@ read_response (void *cls,
/**
* Get a socket of the specified address family to send out a
- * UDP DNS request to the Internet.
+ * UDP DNS request to the Internet.
*
* @param ctx the DNSSTUB context
* @param af desired address family
@@ -208,7 +208,7 @@ get_request_socket (struct GNUNET_DNSSTUB_Context *ctx,
struct GNUNET_DNSSTUB_RequestSocket *rs;
struct GNUNET_NETWORK_FDSet *rset;
- rs = &ctx->sockets[GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
+ rs = &ctx->sockets[GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
DNS_SOCKET_MAX)];
rs->timeout = GNUNET_TIME_relative_to_absolute (REQUEST_TIMEOUT);
switch (af)
@@ -223,7 +223,7 @@ get_request_socket (struct GNUNET_DNSSTUB_Context *ctx,
break;
default:
return NULL;
- }
+ }
if (GNUNET_SCHEDULER_NO_TASK != rs->read_task)
{
GNUNET_SCHEDULER_cancel (rs->read_task);
@@ -286,7 +286,7 @@ GNUNET_DNSSTUB_resolve (struct GNUNET_DNSSTUB_Context *ctx,
rs->addrlen = sa_len;
rs->rc = rc;
rs->rc_cls = rc_cls;
- if (GNUNET_SYSERR ==
+ if (GNUNET_SYSERR ==
GNUNET_NETWORK_socket_sendto (ret,
request,
request_len,
@@ -351,7 +351,7 @@ GNUNET_DNSSTUB_resolve2 (struct GNUNET_DNSSTUB_Context *ctx,
#endif
sa = (struct sockaddr *) &v6;
af = AF_INET6;
- }
+ }
else
{
GNUNET_break (0);
@@ -384,7 +384,7 @@ GNUNET_DNSSTUB_resolve2 (struct GNUNET_DNSSTUB_Context *ctx,
_("Failed to send DNS request to %s\n"),
GNUNET_a2s (sa, salen));
rs->timeout = GNUNET_TIME_relative_to_absolute (REQUEST_TIMEOUT);
-
+
return rs;
}
@@ -420,13 +420,13 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
#endif
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Receiving %d byte DNS reply\n",
- len);
+ len);
{
unsigned char buf[len] GNUNET_ALIGN;
addrlen = sizeof (addr);
- memset (&addr, 0, sizeof (addr));
- r = GNUNET_NETWORK_socket_recvfrom (dnsout,
+ memset (&addr, 0, sizeof (addr));
+ r = GNUNET_NETWORK_socket_recvfrom (dnsout,
buf, sizeof (buf),
(struct sockaddr*) &addr, &addrlen);
if (-1 == r)
@@ -437,7 +437,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
}
if (sizeof (struct GNUNET_TUN_DnsHeader) > r)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Received DNS response that is too small (%u bytes)"),
r);
return GNUNET_NO;
@@ -446,11 +446,11 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
if ( (addrlen != rs->addrlen) ||
(0 != memcmp (&rs->addr,
&addr,
- addrlen)) ||
+ addrlen)) ||
(0 == GNUNET_TIME_absolute_get_remaining (rs->timeout).rel_value_us) )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Request timeout or invalid sender address; ignoring reply\n");
+ "Request timeout or invalid sender address; ignoring reply\n");
return GNUNET_NO;
}
if (NULL != rs->rc)
@@ -458,7 +458,7 @@ do_dns_read (struct GNUNET_DNSSTUB_RequestSocket *rs,
rs,
dns,
r);
- }
+ }
return GNUNET_OK;
}
@@ -530,7 +530,7 @@ struct GNUNET_DNSSTUB_Context *
GNUNET_DNSSTUB_start (const char *dns_ip)
{
struct GNUNET_DNSSTUB_Context *ctx;
-
+
ctx = GNUNET_malloc (sizeof (struct GNUNET_DNSSTUB_Context));
if (NULL != dns_ip)
ctx->dns_exit = GNUNET_strdup (dns_ip);
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c
index 4c92009eb..48dd7a12d 100644
--- a/src/dns/gnunet-dns-monitor.c
+++ b/src/dns/gnunet-dns-monitor.c
@@ -130,7 +130,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record)
const char *format;
char buf[INET6_ADDRSTRLEN];
char *tmp;
-
+
tmp = NULL;
switch (record->type)
{
@@ -164,7 +164,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record)
(unsigned int) record->data.soa->refresh,
(unsigned int) record->data.soa->retry,
(unsigned int) record->data.soa->expire,
- (unsigned int) record->data.soa->minimum_ttl);
+ (unsigned int) record->data.soa->minimum_ttl);
format = tmp;
}
break;
@@ -242,7 +242,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record)
* @param request_length number of bytes in request
* @param request udp payload of the DNS request
*/
-static void
+static void
display_request (void *cls,
struct GNUNET_DNS_RequestHandle *rh,
size_t request_length,
@@ -284,13 +284,13 @@ display_request (void *cls,
p->flags.authenticated_data ? "AD " : "",
p->flags.recursion_available ? "RA " : "",
return_codes[p->flags.return_code & 15],
- op_codes[p->flags.opcode & 15]);
+ op_codes[p->flags.opcode & 15]);
if (p->num_queries > 0)
fprintf (stdout,
"\tQueries:\n");
for (i=0;i<p->num_queries;i++)
display_query (&p->queries[i]);
-
+
if (p->num_answers > 0)
fprintf (stdout,
"\tAnswers:\n");
@@ -338,7 +338,7 @@ run (void *cls, char *const *args, const char *cfgfile,
if (outbound_only)
flags |= GNUNET_DNS_FLAG_RESPONSE_MONITOR;
handle =
- GNUNET_DNS_connect (cfg,
+ GNUNET_DNS_connect (cfg,
flags,
&display_request,
NULL);
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c
index 3df2ac21a..4d1a452a5 100644
--- a/src/dns/gnunet-dns-redirector.c
+++ b/src/dns/gnunet-dns-redirector.c
@@ -67,13 +67,13 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
switch (record->type)
{
- case GNUNET_DNSPARSER_TYPE_A:
+ case GNUNET_DNSPARSER_TYPE_A:
if (record->data.raw.data_len != sizeof (struct in_addr))
return;
if (NULL != n4)
{
if (verbosity > 1)
- fprintf (stderr,
+ fprintf (stderr,
"Changing A record from `%s' to `%s'\n",
inet_ntop (AF_INET, record->data.raw.data, buf, sizeof (buf)),
n4);
@@ -86,7 +86,7 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
if (NULL != n6)
{
if (verbosity > 1)
- fprintf (stderr,
+ fprintf (stderr,
"Changing AAAA record from `%s' to `%s'\n",
inet_ntop (AF_INET6, record->data.raw.data, buf, sizeof (buf)),
n6);
@@ -129,7 +129,7 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
* @param request_length number of bytes in request
* @param request udp payload of the DNS request
*/
-static void
+static void
modify_request (void *cls,
struct GNUNET_DNS_RequestHandle *rh,
size_t request_length,
@@ -156,7 +156,7 @@ modify_request (void *cls,
if (GNUNET_OK != ret)
{
if (GNUNET_NO == ret)
- fprintf (stderr,
+ fprintf (stderr,
"Modified DNS response did not fit, keeping old response\n");
else
GNUNET_break (0); /* our modifications should have been sane! */
@@ -169,7 +169,7 @@ modify_request (void *cls,
"Injecting modified DNS response\n");
GNUNET_DNS_request_answer (rh, len, buf);
}
- GNUNET_free_non_null (buf);
+ GNUNET_free_non_null (buf);
}
@@ -219,7 +219,7 @@ run (void *cls, char *const *args, const char *cfgfile,
}
handle =
- GNUNET_DNS_connect (cfg,
+ GNUNET_DNS_connect (cfg,
GNUNET_DNS_FLAG_POST_RESOLUTION,
&modify_request,
NULL);
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c
index bc83da027..8ff6413f8 100644
--- a/src/dns/gnunet-helper-dns.c
+++ b/src/dns/gnunet-helper-dns.c
@@ -23,7 +23,7 @@
* @brief helper to install firewall rules to hijack all DNS traffic
* and send it to our virtual interface (except for DNS traffic
* that originates on the specified port). We then
- * allow interacting with our virtual interface via stdin/stdout.
+ * allow interacting with our virtual interface via stdin/stdout.
* @author Philipp Tölke
* @author Christian Grothoff
*
@@ -55,13 +55,13 @@
* Naturally, neither of these problems can be helped as this is the
* fundamental purpose of the binary. Certifying that this code is
* "safe" thus only means that it doesn't allow anything else (such
- * as local priv. escalation, etc.).
+ * as local priv. escalation, etc.).
*
* The following list of people have reviewed this code and considered
* it safe (within specifications) since the last modification (if you
* reviewed it, please have your name added to the list):
*
- * - Christian Grothoff
+ * - Christian Grothoff
*/
#include "platform.h"
@@ -174,7 +174,7 @@ open_dev_null (int target_fd,
if (fd == target_fd)
return;
if (-1 == dup2 (fd, target_fd))
- {
+ {
(void) close (fd);
abort ();
}
@@ -184,13 +184,13 @@ open_dev_null (int target_fd,
/**
* Run the given command and wait for it to complete.
- *
+ *
* @param file name of the binary to run
* @param cmd command line arguments (as given to 'execv')
* @return 0 on success, 1 on any error
*/
static int
-fork_and_exec (const char *file,
+fork_and_exec (const char *file,
char *const cmd[])
{
int status;
@@ -200,8 +200,8 @@ fork_and_exec (const char *file,
pid = fork ();
if (-1 == pid)
{
- fprintf (stderr,
- "fork failed: %s\n",
+ fprintf (stderr,
+ "fork failed: %s\n",
strerror (errno));
return 1;
}
@@ -210,25 +210,25 @@ fork_and_exec (const char *file,
/* we are the child process */
/* close stdin/stdout to not cause interference
with the helper's main protocol! */
- (void) close (0);
+ (void) close (0);
open_dev_null (0, O_RDONLY);
- (void) close (1);
+ (void) close (1);
open_dev_null (1, O_WRONLY);
(void) execv (file, cmd);
/* can only get here on error */
- fprintf (stderr,
- "exec `%s' failed: %s\n",
+ fprintf (stderr,
+ "exec `%s' failed: %s\n",
file,
strerror (errno));
_exit (1);
}
/* keep running waitpid as long as the only error we get is 'EINTR' */
while ( (-1 == (ret = waitpid (pid, &status, 0))) &&
- (errno == EINTR) );
+ (errno == EINTR) );
if (-1 == ret)
{
- fprintf (stderr,
- "waitpid failed: %s\n",
+ fprintf (stderr,
+ "waitpid failed: %s\n",
strerror (errno));
return 1;
}
@@ -312,8 +312,8 @@ set_address6 (const char *dev, const char *address, unsigned long prefix_len)
sa6.sin6_family = AF_INET6;
if (1 != inet_pton (AF_INET6, address, sa6.sin6_addr.s6_addr))
{
- fprintf (stderr,
- "Failed to parse IPv6 address `%s': %s\n",
+ fprintf (stderr,
+ "Failed to parse IPv6 address `%s': %s\n",
address,
strerror (errno));
exit (1);
@@ -321,11 +321,11 @@ set_address6 (const char *dev, const char *address, unsigned long prefix_len)
if (-1 == (fd = socket (PF_INET6, SOCK_DGRAM, 0)))
{
- fprintf (stderr,
- "Error creating IPv6 socket: %s (ignored)\n",
+ fprintf (stderr,
+ "Error creating IPv6 socket: %s (ignored)\n",
strerror (errno));
/* ignore error, maybe only IPv4 works on this system! */
- return;
+ return;
}
memset (&ifr, 0, sizeof (struct ifreq));
@@ -410,8 +410,8 @@ set_address4 (const char *dev, const char *address, const char *mask)
*/
if (1 != inet_pton (AF_INET, address, &addr->sin_addr.s_addr))
{
- fprintf (stderr,
- "Failed to parse IPv4 address `%s': %s\n",
+ fprintf (stderr,
+ "Failed to parse IPv4 address `%s': %s\n",
address,
strerror (errno));
exit (1);
@@ -420,7 +420,7 @@ set_address4 (const char *dev, const char *address, const char *mask)
if (-1 == (fd = socket (PF_INET, SOCK_DGRAM, 0)))
{
fprintf (stderr,
- "Error creating IPv4 socket: %s\n",
+ "Error creating IPv4 socket: %s\n",
strerror (errno));
exit (1);
}
@@ -619,7 +619,7 @@ run (int fd_tun)
return;
}
buftun_size -= written;
- buftun_read += written;
+ buftun_read += written;
}
if (FD_ISSET (0, &fds_r))
@@ -749,7 +749,7 @@ main (int argc, char *const*argv)
return 254;
}
#else
- if (0 != seteuid (0))
+ if (0 != seteuid (0))
{
fprintf (stderr, "Failed to seteuid back to root: %s\n", strerror (errno));
return 254;
@@ -763,7 +763,7 @@ main (int argc, char *const*argv)
sbin_iptables = "/usr/sbin/iptables";
else
{
- fprintf (stderr,
+ fprintf (stderr,
"Fatal: executable iptables not found in approved directories: %s\n",
strerror (errno));
return 3;
@@ -805,7 +805,7 @@ main (int argc, char *const*argv)
/* setup pipe to shutdown nicely on SIGINT */
if (0 != pipe (cpipe))
{
- fprintf (stderr,
+ fprintf (stderr,
"Fatal: could not setup control pipe: %s\n",
strerror (errno));
return 6;
@@ -839,14 +839,14 @@ main (int argc, char *const*argv)
}
if ( (SIG_ERR == signal (SIGTERM, &signal_handler)) ||
(SIG_ERR == signal (SIGINT, &signal_handler)) ||
- (SIG_ERR == signal (SIGHUP, &signal_handler)) )
- {
- fprintf (stderr,
+ (SIG_ERR == signal (SIGHUP, &signal_handler)) )
+ {
+ fprintf (stderr,
"Fatal: could not initialize signal handler: %s\n",
strerror (errno));
(void) close (cpipe[0]);
(void) close (cpipe[1]);
- return 7;
+ return 7;
}
@@ -868,8 +868,8 @@ main (int argc, char *const*argv)
return 5;
}
}
-
-
+
+
/* now open virtual interface (first part that requires root) */
if (-1 == (fd_tun = init_tun (dev)))
{
@@ -907,14 +907,14 @@ main (int argc, char *const*argv)
set_address4 (dev, address, mask);
}
-
+
/* update routing tables -- next part why we need SUID! */
/* Forward everything from our EGID (which should only be held
by the 'gnunet-service-dns') and with destination
to port 53 on UDP, without hijacking */
r = 8; /* failed to fully setup routing table */
{
- char *const mangle_args[] =
+ char *const mangle_args[] =
{
"iptables", "-m", "owner", "-t", "mangle", "-I", "OUTPUT", "1", "-p",
"udp", "--gid-owner", mygid, "--dport", DNS_PORT, "-j",
@@ -922,7 +922,7 @@ main (int argc, char *const*argv)
};
if (0 != fork_and_exec (sbin_iptables, mangle_args))
goto cleanup_rest;
- }
+ }
/* Mark all of the other DNS traffic using our mark DNS_MARK */
{
char *const mark_args[] =
@@ -965,7 +965,7 @@ main (int argc, char *const*argv)
}
#else
/* Note: no 'setuid' here as we must keep our saved UID as root */
- if (0 != seteuid (uid))
+ if (0 != seteuid (uid))
{
fprintf (stderr, "Failed to seteuid: %s\n", strerror (errno));
r = 24;
@@ -977,7 +977,7 @@ main (int argc, char *const*argv)
/* now forward until we hit a problem */
run (fd_tun);
-
+
/* now need to regain privs so we can remove the firewall rules we added! */
#ifdef HAVE_SETRESUID
if (0 != setresuid (uid, 0, 0))
@@ -987,19 +987,19 @@ main (int argc, char *const*argv)
goto cleanup_route_4;
}
#else
- if (0 != seteuid (0))
+ if (0 != seteuid (0))
{
fprintf (stderr, "Failed to seteuid back to root: %s\n", strerror (errno));
r = 40;
goto cleanup_route_4;
}
#endif
-
+
/* update routing tables again -- this is why we could not fully drop privs */
/* now undo updating of routing tables; normal exit or clean-up-on-error case */
cleanup_route_4:
{
- char *const route_clean_args[] =
+ char *const route_clean_args[] =
{
"ip", "route", "del", "default", "dev", dev,
"table", DNS_TABLE, NULL
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index ac410d3ed..53c19d01c 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -34,7 +34,7 @@
* each request will be given one of 128 random source ports, and the
* 128 random source ports will also change "often" (less often if the
* system is very busy, each time if we are mostly idle). At the same
- * time, the system will never use more than 256 UDP sockets.
+ * time, the system will never use more than 256 UDP sockets.
*/
#include "platform.h"
#include "gnunet_util_lib.h"
@@ -88,7 +88,7 @@ enum RequestPhase
* Global Internet query is now pending.
*/
RP_INTERNET_DNS,
-
+
/**
* Client (or global DNS request) has resulted in a response.
* Forward to all POST-RESOLUTION clients. If client list is empty,
@@ -111,22 +111,22 @@ enum RequestPhase
/**
* Entry we keep for each client.
- */
+ */
struct ClientRecord
{
/**
* Kept in doubly-linked list.
- */
+ */
struct ClientRecord *next;
/**
* Kept in doubly-linked list.
- */
+ */
struct ClientRecord *prev;
/**
* Handle to the client.
- */
+ */
struct GNUNET_SERVER_Client *client;
/**
@@ -139,7 +139,7 @@ struct ClientRecord
/**
* Entry we keep for each active request.
- */
+ */
struct RequestRecord
{
@@ -180,7 +180,7 @@ struct RequestRecord
/**
* Number of bytes in payload.
- */
+ */
size_t payload_length;
/**
@@ -317,7 +317,7 @@ request_done (struct RequestRecord *rr)
GNUNET_array_grow (rr->client_wait_list,
rr->client_wait_list_length,
- 0);
+ 0);
if (RP_RESPONSE_MONITOR != rr->phase)
{
/* no response, drop */
@@ -330,7 +330,7 @@ request_done (struct RequestRecord *rr)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Transmitting response for request %llu\n",
- (unsigned long long) rr->request_id);
+ (unsigned long long) rr->request_id);
/* send response via hijacker */
reply_len = sizeof (struct GNUNET_MessageHeader);
reply_len += sizeof (struct GNUNET_TUN_Layer2PacketHeader);
@@ -345,7 +345,7 @@ request_done (struct RequestRecord *rr)
default:
GNUNET_break (0);
cleanup_rr (rr);
- return;
+ return;
}
reply_len += sizeof (struct GNUNET_TUN_UdpHeader);
reply_len += rr->payload_length;
@@ -354,7 +354,7 @@ request_done (struct RequestRecord *rr)
/* response too big, drop */
GNUNET_break (0); /* how can this be? */
cleanup_rr(rr);
- return;
+ return;
}
{
char buf[reply_len] GNUNET_ALIGN;
@@ -374,7 +374,7 @@ request_done (struct RequestRecord *rr)
tun.flags = htons (0);
if (rr->src_addr.ss_family == AF_INET)
- tun.proto = htons (ETH_P_IPV4);
+ tun.proto = htons (ETH_P_IPV4);
else
tun.proto = htons (ETH_P_IPV6);
memcpy (&buf[off], &tun, sizeof (struct GNUNET_TUN_Layer2PacketHeader));
@@ -483,14 +483,14 @@ send_request_to_client (struct RequestRecord *rr,
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Sending information about request %llu to local client\n",
- (unsigned long long) rr->request_id);
+ (unsigned long long) rr->request_id);
req = (struct GNUNET_DNS_Request*) buf;
req->header.type = htons (GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST);
req->header.size = htons (sizeof (buf));
req->reserved = htonl (0);
req->request_id = rr->request_id;
memcpy (&req[1], rr->payload, rr->payload_length);
- GNUNET_SERVER_notification_context_unicast (nc,
+ GNUNET_SERVER_notification_context_unicast (nc,
client,
&req->header,
GNUNET_NO);
@@ -541,8 +541,8 @@ next_phase (struct RequestRecord *rr)
nz = (int) j;
break;
}
- }
- if (-1 != nz)
+ }
+ if (-1 != nz)
{
send_request_to_client (rr, rr->client_wait_list[nz]->client);
return;
@@ -551,7 +551,7 @@ next_phase (struct RequestRecord *rr)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Request %llu now in phase %d\n",
rr->request_id,
- rr->phase);
+ rr->phase);
switch (rr->phase)
{
case RP_INIT:
@@ -647,7 +647,7 @@ next_phase (struct RequestRecord *rr)
*
* @param cls unused
* @param client handle of client that disconnected
- */
+ */
static void
client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
{
@@ -674,7 +674,7 @@ client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
if (rr->client_wait_list[j] == cr)
{
rr->client_wait_list[j] = NULL;
- next_phase (rr);
+ next_phase (rr);
}
}
}
@@ -714,8 +714,8 @@ process_dns_result (void *cls,
gettext_noop ("# External DNS response discarded (no matching request)"),
1, GNUNET_NO);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received DNS reply that does not match any pending request. Dropping.\n");
- return;
+ "Received DNS reply that does not match any pending request. Dropping.\n");
+ return;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Got a response from the stub resolver for DNS request %llu intercepted locally!\n",
@@ -736,7 +736,7 @@ process_dns_result (void *cls,
* @param message the init message (unused)
*/
static void
-handle_client_init (void *cls GNUNET_UNUSED,
+handle_client_init (void *cls GNUNET_UNUSED,
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
@@ -745,7 +745,7 @@ handle_client_init (void *cls GNUNET_UNUSED,
cr = GNUNET_malloc (sizeof (struct ClientRecord));
cr->client = client;
- cr->flags = (enum GNUNET_DNS_Flags) ntohl (reg->flags);
+ cr->flags = (enum GNUNET_DNS_Flags) ntohl (reg->flags);
GNUNET_SERVER_client_keep (client);
GNUNET_CONTAINER_DLL_insert (clients_head,
clients_tail,
@@ -763,7 +763,7 @@ handle_client_init (void *cls GNUNET_UNUSED,
* @param message the response
*/
static void
-handle_client_response (void *cls GNUNET_UNUSED,
+handle_client_response (void *cls GNUNET_UNUSED,
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
@@ -816,7 +816,7 @@ handle_client_response (void *cls GNUNET_UNUSED,
{
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- next_phase (rr);
+ next_phase (rr);
return;
}
GNUNET_free_non_null (rr->payload);
@@ -844,9 +844,9 @@ handle_client_response (void *cls GNUNET_UNUSED,
}
break;
}
- next_phase (rr);
+ next_phase (rr);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
- return;
+ return;
}
/* odd, client was not on our list for the request, that ought
to be an error */
@@ -936,7 +936,7 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client,
}
if ( (msize <= sizeof (struct GNUNET_TUN_UdpHeader) + sizeof (struct GNUNET_TUN_DnsHeader)) ||
(DNS_PORT != ntohs (udp->destination_port)) )
- {
+ {
/* non-DNS packet received on TUN, ignore */
GNUNET_STATISTICS_update (stats,
gettext_noop ("# Non-DNS UDP packet received via TUN interface"),
@@ -1025,7 +1025,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
{
static const struct GNUNET_SERVER_MessageHandler handlers[] = {
/* callback, cls, type, size */
- {&handle_client_init, NULL, GNUNET_MESSAGE_TYPE_DNS_CLIENT_INIT,
+ {&handle_client_init, NULL, GNUNET_MESSAGE_TYPE_DNS_CLIENT_INIT,
sizeof (struct GNUNET_DNS_Register)},
{&handle_client_response, NULL, GNUNET_MESSAGE_TYPE_DNS_CLIENT_RESPONSE, 0},
{NULL, NULL, 0, 0}
@@ -1059,7 +1059,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
cls);
dns_exit = NULL;
if ( ( (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg, "dns",
+ GNUNET_CONFIGURATION_get_value_string (cfg, "dns",
"DNS_EXIT",
&dns_exit)) ||
( (1 != inet_pton (AF_INET, dns_exit, &dns_exit4)) &&
@@ -1157,7 +1157,7 @@ main (int argc, char *const *argv)
strerror (errno));
}
else if (sgid != rgid)
- {
+ {
if (-1 == setregid (sgid, sgid))
fprintf (stderr, "setregid failed: %s\n", strerror (errno));
}
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index de9185a5a..a8846944e 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -85,14 +85,14 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
GNUNET_TIME_absolute_get_remaining (GNUNET_TIME_absolute_ntoh
(ad->expiration_time)).rel_value_us)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"DNS advertisement has expired\n");
return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
}
if (GNUNET_OK !=
GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD,
- &ad->purpose,
- &ad->signature,
+ &ad->purpose,
+ &ad->signature,
&ad->peer.public_key))
{
GNUNET_break_op (0);
@@ -117,9 +117,9 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
* (or if extracting a key from a block of this type does not work)
*/
static int
-block_plugin_dns_get_key (void *cls,
+block_plugin_dns_get_key (void *cls,
enum GNUNET_BLOCK_Type type,
- const void *block,
+ const void *block,
size_t block_size,
struct GNUNET_HashCode *key)
{
diff --git a/src/dv/dv.h b/src/dv/dv.h
index c0247218e..c0a4828a2 100644
--- a/src/dv/dv.h
+++ b/src/dv/dv.h
@@ -142,7 +142,7 @@ struct GNUNET_DV_AckMessage
/**
* Type: GNUNET_MESSAGE_TYPE_DV_SEND_ACK or
* GNUNET_MESSAGE_TYPE_DV_SEND_NACK.
- */
+ */
struct GNUNET_MessageHeader header;
/**
@@ -166,7 +166,7 @@ struct GNUNET_DV_DistanceUpdateMessage
{
/**
* Type: GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED.
- */
+ */
struct GNUNET_MessageHeader header;
/**
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c
index 1bbb789f9..412ab47ad 100644
--- a/src/dv/dv_api.c
+++ b/src/dv/dv_api.c
@@ -63,7 +63,7 @@ struct GNUNET_DV_TransmitHandle
* Closure for 'cb'.
*/
void *cb_cls;
-
+
/**
* The actual message (allocated at the end of this struct).
*/
@@ -78,7 +78,7 @@ struct GNUNET_DV_TransmitHandle
* UID of our message, if any.
*/
uint32_t uid;
-
+
};
@@ -107,7 +107,7 @@ struct GNUNET_DV_ServiceHandle
* Closure for the callbacks.
*/
void *cls;
-
+
/**
* Function to call on connect events.
*/
@@ -221,12 +221,12 @@ start_transmit (struct GNUNET_DV_ServiceHandle *sh)
if (NULL != sh->th)
return;
if (NULL == sh->th_head)
- return;
+ return;
sh->th =
GNUNET_CLIENT_notify_transmit_ready (sh->client,
ntohs (sh->th_head->msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
- GNUNET_NO,
+ GNUNET_NO,
&transmit_pending, sh);
}
@@ -291,7 +291,7 @@ process_ack (void *cls,
* @param msg the message that was received
*/
static void
-handle_message_receipt (void *cls,
+handle_message_receipt (void *cls,
const struct GNUNET_MessageHeader *msg)
{
struct GNUNET_DV_ServiceHandle *sh = cls;
@@ -302,7 +302,7 @@ handle_message_receipt (void *cls,
const struct GNUNET_MessageHeader *payload;
const struct GNUNET_DV_AckMessage *ack;
struct AckContext ctx;
-
+
if (NULL == msg)
{
/* Connection closed */
@@ -389,7 +389,7 @@ handle_message_receipt (void *cls,
reconnect (sh);
break;
}
- GNUNET_CLIENT_receive (sh->client,
+ GNUNET_CLIENT_receive (sh->client,
&handle_message_receipt, sh,
GNUNET_TIME_UNIT_FOREVER_REL);
}
@@ -402,7 +402,7 @@ handle_message_receipt (void *cls,
* @param size number of bytes available in buf
* @param buf where to copy the message
* @return number of bytes written to buf
- */
+ */
static size_t
transmit_start (void *cls,
size_t size,
@@ -464,7 +464,7 @@ cleanup_send_cb (void *cls,
*/
static void
reconnect (struct GNUNET_DV_ServiceHandle *sh)
-{
+{
if (NULL != sh->th)
{
GNUNET_CLIENT_notify_transmit_ready_cancel (sh->th);
@@ -538,7 +538,7 @@ void
GNUNET_DV_service_disconnect (struct GNUNET_DV_ServiceHandle *sh)
{
struct GNUNET_DV_TransmitHandle *pos;
-
+
if (NULL == sh)
return;
if (NULL != sh->th)
@@ -553,7 +553,7 @@ GNUNET_DV_service_disconnect (struct GNUNET_DV_ServiceHandle *sh)
pos);
GNUNET_free (pos);
}
- if (NULL != sh->client)
+ if (NULL != sh->client)
{
GNUNET_CLIENT_disconnect (sh->client);
sh->client = NULL;
@@ -607,7 +607,7 @@ GNUNET_DV_send (struct GNUNET_DV_ServiceHandle *sh,
th->msg = (const struct GNUNET_MessageHeader *) &th[1];
sm = (struct GNUNET_DV_SendMessage *) &th[1];
sm->header.type = htons (GNUNET_MESSAGE_TYPE_DV_SEND);
- sm->header.size = htons (sizeof (struct GNUNET_DV_SendMessage) +
+ sm->header.size = htons (sizeof (struct GNUNET_DV_SendMessage) +
ntohs (msg->size));
if (0 == sh->uid_gen)
sh->uid_gen = 1;
diff --git a/src/dv/gnunet-dv.c b/src/dv/gnunet-dv.c
index 77324978e..43af3458e 100644
--- a/src/dv/gnunet-dv.c
+++ b/src/dv/gnunet-dv.c
@@ -44,7 +44,7 @@ static int verbose;
* @param peer newly connected peer
* @param distance distance to the peer
*/
-static void
+static void
connect_cb (void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance)
@@ -62,7 +62,7 @@ connect_cb (void *cls,
* @param peer connected peer
* @param distance new distance to the peer
*/
-static void
+static void
change_cb (void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance)
@@ -79,7 +79,7 @@ change_cb (void *cls,
* @param cls closure
* @param peer peer that disconnected
*/
-static void
+static void
disconnect_cb (void *cls,
const struct GNUNET_PeerIdentity *peer)
{
@@ -96,7 +96,7 @@ disconnect_cb (void *cls,
* @param distance how far did the message travel
* @param msg actual message payload
*/
-static void
+static void
message_cb (void *cls,
const struct GNUNET_PeerIdentity *sender,
uint32_t distance,
@@ -171,7 +171,7 @@ main (int argc, char *const *argv)
return 2;
res = GNUNET_PROGRAM_run (argc, argv, "gnunet-dv",
- gettext_noop ("Print information about DV state"),
+ gettext_noop ("Print information about DV state"),
options, &run,
NULL);
GNUNET_free ((void *) argv);
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index 19303ed83..cd4517164 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -92,7 +92,7 @@ struct Target
/**
* Message exchanged between DV services (via core), requesting a
- * message to be routed.
+ * message to be routed.
*/
struct RouteMessage
{
@@ -176,7 +176,7 @@ struct DirectNeighbor
* with other applications.
*/
struct GNUNET_HashCode real_session_id;
-
+
/**
* Head of linked list of messages to send to this peer.
*/
@@ -197,7 +197,7 @@ struct DirectNeighbor
* Keys are peer identities, values are 'struct Target' entries.
* Note that the distances in the targets are from the point-of-view
* of the peer, not from us!
- */
+ */
struct GNUNET_CONTAINER_MultiPeerMap *neighbor_table;
/**
@@ -206,7 +206,7 @@ struct DirectNeighbor
* Keys are peer identities, values are 'struct Target' entries.
* Note that the distances in the targets are from the point-of-view
* of the peer, not from us!
- */
+ */
struct GNUNET_CONTAINER_MultiPeerMap *neighbor_table_consensus;
/**
@@ -318,13 +318,13 @@ struct ConsensusSet
/**
* Peermap of all of our neighbors; processing these usually requires
- * first checking to see if the peer is core-connected and if the
+ * first checking to see if the peer is core-connected and if the
* distance is 1, in which case they are direct neighbors.
*/
static struct GNUNET_CONTAINER_MultiPeerMap *direct_neighbors;
/**
- * Hashmap with all routes that we currently support; contains
+ * Hashmap with all routes that we currently support; contains
* routing information for all peers from distance 2
* up to distance DEFAULT_FISHEYE_DEPTH.
*/
@@ -367,7 +367,7 @@ static struct GNUNET_STATISTICS_Handle *stats;
* Handle to ATS service.
*/
static struct GNUNET_ATS_PerformanceHandle *ats;
-
+
/**
* Start creating a new DV set union by initiating the connection.
@@ -375,7 +375,7 @@ static struct GNUNET_ATS_PerformanceHandle *ats;
* @param cls the 'struct DirectNeighbor' of the peer we're building
* a routing consensus with
* @param tc scheduler context
- */
+ */
static void
initiate_set_union (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc);
@@ -396,7 +396,7 @@ initiate_set_union (void *cls,
* necessary to specify the set we want to do the operation with,
* whith sometimes can be derived from the context message.
* Also necessary to specify the timeout.
- */
+ */
static void
listen_set_union (void *cls,
const struct GNUNET_PeerIdentity *other_peer,
@@ -412,7 +412,7 @@ listen_set_union (void *cls,
* @param distance distance to the original sender of the message
*/
static void
-send_data_to_plugin (const struct GNUNET_MessageHeader *message,
+send_data_to_plugin (const struct GNUNET_MessageHeader *message,
const struct GNUNET_PeerIdentity *origin,
uint32_t distance)
{
@@ -422,10 +422,10 @@ send_data_to_plugin (const struct GNUNET_MessageHeader *message,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Delivering message from peer `%s'\n",
GNUNET_i2s (origin));
- size = sizeof (struct GNUNET_DV_ReceivedMessage) +
+ size = sizeof (struct GNUNET_DV_ReceivedMessage) +
ntohs (message->size);
if (size >= GNUNET_SERVER_MAX_MESSAGE_SIZE)
- {
+ {
GNUNET_break (0); /* too big */
return;
}
@@ -435,7 +435,7 @@ send_data_to_plugin (const struct GNUNET_MessageHeader *message,
received_msg->distance = htonl (distance);
received_msg->sender = *origin;
memcpy (&received_msg[1], message, ntohs (message->size));
- GNUNET_SERVER_notification_context_broadcast (nc,
+ GNUNET_SERVER_notification_context_broadcast (nc,
&received_msg->header,
GNUNET_YES);
GNUNET_free (received_msg);
@@ -450,7 +450,7 @@ send_data_to_plugin (const struct GNUNET_MessageHeader *message,
static void
send_control_to_plugin (const struct GNUNET_MessageHeader *message)
{
- GNUNET_SERVER_notification_context_broadcast (nc,
+ GNUNET_SERVER_notification_context_broadcast (nc,
message,
GNUNET_NO);
}
@@ -464,7 +464,7 @@ send_control_to_plugin (const struct GNUNET_MessageHeader *message)
* @param nack GNUNET_NO to send ACK, GNUNET_YES to send NACK
*/
static void
-send_ack_to_plugin (const struct GNUNET_PeerIdentity *target,
+send_ack_to_plugin (const struct GNUNET_PeerIdentity *target,
uint32_t uid,
int nack)
{
@@ -474,7 +474,7 @@ send_ack_to_plugin (const struct GNUNET_PeerIdentity *target,
"Delivering ACK for message to peer `%s'\n",
GNUNET_i2s (target));
ack_msg.header.size = htons (sizeof (ack_msg));
- ack_msg.header.type = htons ((GNUNET_YES == nack)
+ ack_msg.header.type = htons ((GNUNET_YES == nack)
? GNUNET_MESSAGE_TYPE_DV_SEND_NACK
: GNUNET_MESSAGE_TYPE_DV_SEND_ACK);
ack_msg.uid = htonl (uid);
@@ -490,7 +490,7 @@ send_ack_to_plugin (const struct GNUNET_PeerIdentity *target,
* @param distance new distance to the peer
*/
static void
-send_distance_change_to_plugin (const struct GNUNET_PeerIdentity *peer,
+send_distance_change_to_plugin (const struct GNUNET_PeerIdentity *peer,
uint32_t distance)
{
struct GNUNET_DV_DistanceUpdateMessage du_msg;
@@ -513,7 +513,7 @@ send_distance_change_to_plugin (const struct GNUNET_PeerIdentity *peer,
* @param distance distance to the target
*/
static void
-send_connect_to_plugin (const struct GNUNET_PeerIdentity *target,
+send_connect_to_plugin (const struct GNUNET_PeerIdentity *target,
uint32_t distance)
{
struct GNUNET_DV_ConnectMessage cm;
@@ -585,7 +585,7 @@ core_transmit_notify (void *cls, size_t size, void *buf)
dn->pm_tail,
pending);
memcpy (&cbuf[off], pending->msg, msize);
- if (0 != pending->uid)
+ if (0 != pending->uid)
send_ack_to_plugin (&pending->ultimate_target,
pending->uid,
GNUNET_NO);
@@ -599,7 +599,7 @@ core_transmit_notify (void *cls, size_t size, void *buf)
0 /* priority */,
GNUNET_TIME_UNIT_FOREVER_REL,
&dn->peer,
- msize,
+ msize,
&core_transmit_notify, dn);
return off;
}
@@ -662,7 +662,7 @@ forward_payload (struct DirectNeighbor *target,
0 /* priority */,
GNUNET_TIME_UNIT_FOREVER_REL,
&target->peer,
- msize,
+ msize,
&core_transmit_notify, target);
}
@@ -738,7 +738,7 @@ move_route (struct Route *route,
release_route (route);
i = get_consensus_slot (new_distance);
route->set_offset = i;
- consensi[new_distance].targets[i] = route;
+ consensi[new_distance].targets[i] = route;
route->target.distance = htonl (new_distance);
}
@@ -785,13 +785,13 @@ build_set (void *cls)
while ( (DEFAULT_FISHEYE_DEPTH - 1 > neighbor->consensus_insertion_distance) &&
(consensi[neighbor->consensus_insertion_distance].array_length < neighbor->consensus_insertion_offset) &&
(NULL == consensi[neighbor->consensus_insertion_distance].targets[neighbor->consensus_insertion_offset]) )
- neighbor->consensus_insertion_offset++;
+ neighbor->consensus_insertion_offset++;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Adding element to SET\n");
GNUNET_SET_add_element (neighbor->my_set,
&element,
&build_set, neighbor);
-
+
}
@@ -814,9 +814,9 @@ handle_direct_connect (struct DirectNeighbor *neighbor)
GNUNET_STATISTICS_update (stats,
"# peers connected (1-hop)",
1, GNUNET_NO);
- route = GNUNET_CONTAINER_multipeermap_get (all_routes,
+ route = GNUNET_CONTAINER_multipeermap_get (all_routes,
&neighbor->peer);
- if (NULL != route)
+ if (NULL != route)
{
send_disconnect_to_plugin (&neighbor->peer);
release_route (route);
@@ -839,7 +839,7 @@ handle_direct_connect (struct DirectNeighbor *neighbor)
sizeof (struct GNUNET_PeerIdentity)))
{
neighbor->initiate_task = GNUNET_SCHEDULER_add_now (&initiate_set_union,
- neighbor);
+ neighbor);
}
else
{
@@ -861,16 +861,16 @@ handle_direct_connect (struct DirectNeighbor *neighbor)
* @param peer peer identity this notification is about
*/
static void
-handle_core_connect (void *cls,
+handle_core_connect (void *cls,
const struct GNUNET_PeerIdentity *peer)
{
struct DirectNeighbor *neighbor;
-
+
/* Check for connect to self message */
if (0 == memcmp (&my_identity, peer, sizeof (struct GNUNET_PeerIdentity)))
return;
/* check if entry exists */
- neighbor = GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
+ neighbor = GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
peer);
if (NULL != neighbor)
{
@@ -929,14 +929,14 @@ free_targets (void *cls,
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-check_possible_route (void *cls,
- const struct GNUNET_PeerIdentity *key,
+check_possible_route (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct DirectNeighbor *neighbor = cls;
struct Target *target = value;
struct Route *route;
-
+
route = GNUNET_CONTAINER_multipeermap_get (all_routes,
key);
if (NULL != route)
@@ -975,15 +975,15 @@ check_possible_route (void *cls,
* @return GNUNET_YES to continue iteration
*/
static int
-refresh_routes (void *cls,
- const struct GNUNET_PeerIdentity *key,
+refresh_routes (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct DirectNeighbor *neighbor = value;
if ( (GNUNET_YES != neighbor->connected) ||
(DIRECT_NEIGHBOR_COST != neighbor->distance) )
- return GNUNET_YES;
+ return GNUNET_YES;
if (NULL != neighbor->neighbor_table)
GNUNET_CONTAINER_multipeermap_iterate (neighbor->neighbor_table,
&check_possible_route,
@@ -1024,8 +1024,8 @@ get_atsi_distance (const struct GNUNET_ATS_Information *atsi,
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-cull_routes (void *cls,
- const struct GNUNET_PeerIdentity *key,
+cull_routes (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
struct DirectNeighbor *neighbor = cls;
@@ -1047,7 +1047,7 @@ cull_routes (void *cls,
* disrupted. Remove all routes via that peer and
* stop the consensus with it.
*
- * @param neighbor peer that was disconnected (or at least is no
+ * @param neighbor peer that was disconnected (or at least is no
* longer at distance 1)
*/
static void
@@ -1118,7 +1118,7 @@ handle_ats_update (void *cls,
int active,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
- const struct GNUNET_ATS_Information *ats,
+ const struct GNUNET_ATS_Information *ats,
uint32_t ats_count)
{
struct DirectNeighbor *neighbor;
@@ -1126,25 +1126,25 @@ handle_ats_update (void *cls,
if (GNUNET_NO == active)
return;
- distance = get_atsi_distance (ats, ats_count);
+ distance = get_atsi_distance (ats, ats_count);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"ATS says distance to %s is %u\n",
GNUNET_i2s (&address->peer),
(unsigned int) distance);
/* check if entry exists */
- neighbor = GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
+ neighbor = GNUNET_CONTAINER_multipeermap_get (direct_neighbors,
&address->peer);
if (NULL != neighbor)
- {
+ {
if ( (DIRECT_NEIGHBOR_COST == neighbor->distance) &&
(DIRECT_NEIGHBOR_COST == distance) )
return; /* no change */
- if (DIRECT_NEIGHBOR_COST == neighbor->distance)
+ if (DIRECT_NEIGHBOR_COST == neighbor->distance)
{
neighbor->distance = distance;
GNUNET_STATISTICS_update (stats,
"# peers connected (1-hop)",
- -1, GNUNET_NO);
+ -1, GNUNET_NO);
handle_direct_disconnect (neighbor);
GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors,
&refresh_routes,
@@ -1153,7 +1153,7 @@ handle_ats_update (void *cls,
}
neighbor->distance = distance;
if (DIRECT_NEIGHBOR_COST != neighbor->distance)
- return;
+ return;
if (GNUNET_YES != neighbor->connected)
return;
handle_direct_connect (neighbor);
@@ -1167,7 +1167,7 @@ handle_ats_update (void *cls,
neighbor,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
neighbor->connected = GNUNET_NO; /* not yet */
- neighbor->distance = distance;
+ neighbor->distance = distance;
}
@@ -1357,7 +1357,7 @@ handle_set_union_result (void *cls,
/* check if we got an alternative for the removed routes */
GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors,
&refresh_routes,
- NULL);
+ NULL);
}
/* add targets that appeared (and check for improved routes) */
GNUNET_CONTAINER_multipeermap_iterate (neighbor->neighbor_table_consensus,
@@ -1406,7 +1406,7 @@ handle_set_union_result (void *cls,
* necessary to specify the set we want to do the operation with,
* whith sometimes can be derived from the context message.
* Also necessary to specify the timeout.
- */
+ */
static void
listen_set_union (void *cls,
const struct GNUNET_PeerIdentity *other_peer,
@@ -1446,7 +1446,7 @@ listen_set_union (void *cls,
* @param cls the 'struct DirectNeighbor' of the peer we're building
* a routing consensus with
* @param tc scheduler context
- */
+ */
static void
initiate_set_union (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -1550,7 +1550,7 @@ handle_dv_route_message (void *cls, const struct GNUNET_PeerIdentity *peer,
&rm->target,
&rm->sender,
payload);
- return GNUNET_OK;
+ return GNUNET_OK;
}
@@ -1627,12 +1627,12 @@ cleanup_neighbor (struct DirectNeighbor *neighbor)
neighbor->pm_queue_size--;
GNUNET_CONTAINER_DLL_remove (neighbor->pm_head,
neighbor->pm_tail,
- pending);
+ pending);
GNUNET_free (pending);
}
handle_direct_disconnect (neighbor);
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multipeermap_remove (direct_neighbors,
+ GNUNET_CONTAINER_multipeermap_remove (direct_neighbors,
&neighbor->peer,
neighbor));
GNUNET_free (neighbor);
@@ -1669,7 +1669,7 @@ handle_core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
GNUNET_STATISTICS_update (stats,
"# peers connected (1-hop)",
- -1, GNUNET_NO);
+ -1, GNUNET_NO);
}
cleanup_neighbor (neighbor);
GNUNET_CONTAINER_multipeermap_iterate (direct_neighbors,
@@ -1770,13 +1770,13 @@ add_route (void *cls,
struct GNUNET_SERVER_Client *client = cls;
struct Route *route = value;
struct GNUNET_DV_ConnectMessage cm;
-
+
cm.header.size = htons (sizeof (cm));
cm.header.type = htons (GNUNET_MESSAGE_TYPE_DV_CONNECT);
cm.distance = htonl (route->target.distance);
cm.peer = route->target.peer;
- GNUNET_SERVER_notification_context_unicast (nc,
+ GNUNET_SERVER_notification_context_unicast (nc,
client,
&cm.header,
GNUNET_NO);
@@ -1796,7 +1796,7 @@ static void
handle_start (void *cls, struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
- GNUNET_SERVER_notification_context_add (nc, client);
+ GNUNET_SERVER_notification_context_add (nc, client);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
GNUNET_CONTAINER_multipeermap_iterate (all_routes,
&add_route,
@@ -1837,11 +1837,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
{NULL, 0, 0}
};
static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = {
- {&handle_start, NULL,
- GNUNET_MESSAGE_TYPE_DV_START,
+ {&handle_start, NULL,
+ GNUNET_MESSAGE_TYPE_DV_START,
sizeof (struct GNUNET_MessageHeader) },
- { &handle_dv_send_message, NULL,
- GNUNET_MESSAGE_TYPE_DV_SEND,
+ { &handle_dv_send_message, NULL,
+ GNUNET_MESSAGE_TYPE_DV_SEND,
0},
{NULL, NULL, 0, 0}
};
@@ -1850,11 +1850,11 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
direct_neighbors = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_NO);
all_routes = GNUNET_CONTAINER_multipeermap_create (65536, GNUNET_NO);
core_api = GNUNET_CORE_connect (cfg, NULL,
- &core_init,
+ &core_init,
&handle_core_connect,
&handle_core_disconnect,
- NULL, GNUNET_NO,
- NULL, GNUNET_NO,
+ NULL, GNUNET_NO,
+ NULL, GNUNET_NO,
core_handlers);
if (NULL == core_api)
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c
index 76c823b17..2acc3da3f 100644
--- a/src/dv/plugin_transport_dv.c
+++ b/src/dv/plugin_transport_dv.c
@@ -160,7 +160,7 @@ struct Plugin
/**
* Tokenizer for boxed messages.
*/
- struct GNUNET_SERVER_MessageStreamTokenizer *mst;
+ struct GNUNET_SERVER_MessageStreamTokenizer *mst;
};
@@ -202,11 +202,11 @@ unbox_cb (void *cls,
struct Plugin *plugin = cls;
struct Session *session = client;
struct GNUNET_ATS_Information ats;
-
+
ats.type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
ats.value = htonl (session->distance);
session->active = GNUNET_YES;
- plugin->env->receive (plugin->env->cls,
+ plugin->env->receive (plugin->env->cls,
&session->sender,
message,
session, "", 0);
@@ -222,7 +222,7 @@ unbox_cb (void *cls,
* @param cls closure with the plugin
* @param sender sender of the message
* @param distance how far did the message travel
- * @param msg actual message payload
+ * @param msg actual message payload
*/
static void
handle_dv_message_received (void *cls,
@@ -236,7 +236,7 @@ handle_dv_message_received (void *cls,
session = GNUNET_CONTAINER_multipeermap_get (plugin->sessions,
sender);
- if (NULL == session)
+ if (NULL == session)
{
GNUNET_break (0);
return;
@@ -244,7 +244,7 @@ handle_dv_message_received (void *cls,
if (GNUNET_MESSAGE_TYPE_DV_BOX == ntohs (msg->type))
{
/* need to unbox using MST */
- GNUNET_SERVER_mst_receive (plugin->mst,
+ GNUNET_SERVER_mst_receive (plugin->mst,
session,
(const char *) &msg[1],
ntohs (msg->size) - sizeof (struct GNUNET_MessageHeader),
@@ -270,7 +270,7 @@ handle_dv_message_received (void *cls,
* @param peer newly connected peer
* @param distance distance to the peer
*/
-static void
+static void
handle_dv_connect (void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance)
@@ -280,13 +280,13 @@ handle_dv_connect (void *cls,
session = GNUNET_CONTAINER_multipeermap_get (plugin->sessions,
peer);
- if (NULL != session)
+ if (NULL != session)
{
GNUNET_break (0);
session->distance = distance;
if (GNUNET_YES == session->active)
notify_distance_change (session);
- return; /* nothing to do */
+ return; /* nothing to do */
}
session = GNUNET_new (struct Session);
session->sender = *peer;
@@ -306,7 +306,7 @@ handle_dv_connect (void *cls,
* @param peer connected peer
* @param distance new distance to the peer
*/
-static void
+static void
handle_dv_distance_changed (void *cls,
const struct GNUNET_PeerIdentity *peer,
uint32_t distance)
@@ -316,7 +316,7 @@ handle_dv_distance_changed (void *cls,
session = GNUNET_CONTAINER_multipeermap_get (plugin->sessions,
peer);
- if (NULL == session)
+ if (NULL == session)
{
GNUNET_break (0);
handle_dv_connect (plugin, peer, distance);
@@ -370,7 +370,7 @@ free_session (struct Session *session)
* @param cls closure with 'struct Plugin'
* @param peer peer that disconnected
*/
-static void
+static void
handle_dv_disconnect (void *cls,
const struct GNUNET_PeerIdentity *peer)
{
@@ -379,7 +379,7 @@ handle_dv_disconnect (void *cls,
session = GNUNET_CONTAINER_multipeermap_get (plugin->sessions,
peer);
- if (NULL == session)
+ if (NULL == session)
return; /* nothing to do */
free_session (session);
}
@@ -431,10 +431,10 @@ send_finished (void *cls,
* and does NOT mean that the message was not transmitted (DV)
*/
static ssize_t
-dv_plugin_send (void *cls,
+dv_plugin_send (void *cls,
struct Session *session,
const char *msgbuf, size_t msgbuf_size, unsigned int priority,
- struct GNUNET_TIME_Relative timeout,
+ struct GNUNET_TIME_Relative timeout,
GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls)
{
struct PendingRequest *pr;
@@ -486,8 +486,8 @@ dv_plugin_disconnect (void *cls, const struct GNUNET_PeerIdentity *target)
session = GNUNET_CONTAINER_multipeermap_get (plugin->sessions,
target);
- if (NULL == session)
- return; /* nothing to do */
+ if (NULL == session)
+ return; /* nothing to do */
while (NULL != (pr = session->pr_head))
{
GNUNET_CONTAINER_DLL_remove (session->pr_head,
@@ -548,7 +548,7 @@ dv_plugin_address_to_string (void *cls, const void *addr, size_t addrlen)
if (0 != addrlen)
{
GNUNET_break (0); /* malformed */
- return NULL;
+ return NULL;
}
return "dv";
}
@@ -588,7 +588,7 @@ dv_plugin_check_address (void *cls, const void *addr, size_t addrlen)
* @param address the address
* @return the session if the address is valid, NULL otherwise
*/
-static struct Session *
+static struct Session *
dv_get_session (void *cls,
const struct GNUNET_HELLO_Address *address)
{
@@ -618,7 +618,7 @@ dv_get_session (void *cls,
* @param added length of created address
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-static int
+static int
dv_plugin_string_to_address (void *cls,
const char *addr,
uint16_t addrlen,
@@ -646,7 +646,7 @@ dv_plugin_string_to_address (void *cls,
* @param session the session
* @return the network type
*/
-static enum GNUNET_ATS_Network_Type
+static enum GNUNET_ATS_Network_Type
dv_get_network (void *cls,
struct Session *session)
{
@@ -682,7 +682,7 @@ libgnunet_plugin_transport_dv_init (void *cls)
if (NULL == plugin->dvh)
{
GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
- GNUNET_SERVER_mst_destroy (plugin->mst);
+ GNUNET_SERVER_mst_destroy (plugin->mst);
GNUNET_free (plugin);
return NULL;
}
@@ -737,7 +737,7 @@ libgnunet_plugin_transport_dv_done (void *cls)
&free_session_iterator,
NULL);
GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
- GNUNET_SERVER_mst_destroy (plugin->mst);
+ GNUNET_SERVER_mst_destroy (plugin->mst);
GNUNET_free (plugin);
GNUNET_free (api);
return NULL;
diff --git a/src/dv/test_transport_blacklist.c b/src/dv/test_transport_blacklist.c
index 601544afa..e76964744 100644
--- a/src/dv/test_transport_blacklist.c
+++ b/src/dv/test_transport_blacklist.c
@@ -42,7 +42,7 @@ test_connection (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Links successful %u / %u failed\n", links_succeeded, links_failed);
if ( (4 == num_peers) && (0 == links_failed) )
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Testbed connect peers despite blacklist!\n");
ok = 1;
}
diff --git a/src/env/env.c b/src/env/env.c
index c977572ab..33d12c01e 100644
--- a/src/env/env.c
+++ b/src/env/env.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-/**
+/**
* @file env/env.c
* @brief Library providing operations for the @e environment of
* PSYC and Social messages, and for (de)serializing variable values.
@@ -29,7 +29,7 @@
#include "gnunet_util_lib.h"
#include "gnunet_env_lib.h"
-/**
+/**
* Environment for a message.
*
* Contains modifiers.
@@ -42,9 +42,9 @@ struct GNUNET_ENV_Environment
};
-/**
+/**
* Create an environment.
- *
+ *
* @return A newly allocated environment.
*/
struct GNUNET_ENV_Environment *
@@ -54,7 +54,7 @@ GNUNET_ENV_environment_create ()
}
-/**
+/**
* Add a modifier to the environment.
*
* @param env The environment.
@@ -78,7 +78,7 @@ GNUNET_ENV_environment_add_mod (struct GNUNET_ENV_Environment *env,
}
-/**
+/**
* Iterate through all modifiers in the environment.
*
* @param env The environment.
@@ -95,7 +95,7 @@ GNUNET_ENV_environment_iterate (const struct GNUNET_ENV_Environment *env,
}
-/**
+/**
* Get the number of modifiers in the environment.
*
* @param env The environment.
@@ -109,7 +109,7 @@ GNUNET_ENV_environment_get_mod_count (const struct GNUNET_ENV_Environment *env)
}
-/**
+/**
* Destroy an environment.
*
* @param env The environment to destroy.
diff --git a/src/env/test_env.c b/src/env/test_env.c
index 11ec9662b..6f6bda338 100644
--- a/src/env/test_env.c
+++ b/src/env/test_env.c
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-/**
+/**
* @file env/test_env.c
* @brief Tests for the environment library.
* @author Gabor X Toth
diff --git a/src/exit/exit.h b/src/exit/exit.h
index ff5e3f54c..b4cea4c23 100644
--- a/src/exit/exit.h
+++ b/src/exit/exit.h
@@ -91,7 +91,7 @@ struct GNUNET_EXIT_TcpInternetStartMessage
/**
- * Message send via mesh between VPN and entry and an exit daemon to
+ * Message send via mesh between VPN and entry and an exit daemon to
* transmit TCP data between the VPN entry and an exit session. This
* format is used for both Internet-exits and service-exits and
* in both directions (VPN to exit and exit to VPN).
@@ -136,7 +136,7 @@ struct GNUNET_EXIT_UdpServiceMessage
/**
* Destination port to use for the UDP request. In NBO.
- */
+ */
uint16_t destination_port GNUNET_PACKED;
/**
@@ -171,7 +171,7 @@ struct GNUNET_EXIT_UdpInternetMessage
/**
* Destination port to use for the UDP request. In NBO.
- */
+ */
uint16_t destination_port GNUNET_PACKED;
/* followed by IP address of the destination; either
@@ -201,7 +201,7 @@ struct GNUNET_EXIT_UdpReplyMessage
/**
* Destination port to use for the UDP reply (0 to use the same
* port as for the original request). In NBO.
- */
+ */
uint16_t destination_port GNUNET_PACKED;
/* followed by UDP payload */
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index a758162a7..f4d656f3c 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -31,7 +31,7 @@
* - which code should advertise services? the service model is right
* now a bit odd, especially as this code DOES the exit and knows
* the DNS "name", but OTOH this is clearly NOT the place to advertise
- * the service's existence; maybe the daemon should turn into a
+ * the service's existence; maybe the daemon should turn into a
* service with an API to add local-exit services dynamically?
*/
#include "platform.h"
@@ -111,7 +111,7 @@ struct SocketAddress
*/
struct in6_addr ipv6;
} address;
-
+
/**
* IPPROTO_TCP or IPPROTO_UDP;
*/
@@ -155,7 +155,7 @@ struct LocalService
* IP-version, protocol, source-IP, destination-IP, source-port and
* destinatin-port.
*/
-struct RedirectInformation
+struct RedirectInformation
{
/**
@@ -171,10 +171,10 @@ struct RedirectInformation
*/
struct SocketAddress local_address;
- /*
+ /*
Note 1: additional information might be added here in the
future to support protocols that require special handling,
- such as ftp/tftp
+ such as ftp/tftp
Note 2: we might also sometimes not match on all components
of the tuple, to support protocols where things do not always
@@ -235,42 +235,42 @@ struct TunnelState
struct GNUNET_MESH_TransmitHandle *th;
/**
- * #GNUNET_NO if this is a tunnel for TCP/UDP,
+ * #GNUNET_NO if this is a tunnel for TCP/UDP,
* #GNUNET_YES if this is a tunnel for DNS,
* #GNUNET_SYSERR if the tunnel is not yet initialized.
*/
int is_dns;
- union
+ union
{
- struct
+ struct
{
/**
* Heap node for this state in the connections_heap.
*/
struct GNUNET_CONTAINER_HeapNode *heap_node;
-
+
/**
* Key this state has in the connections_map.
*/
struct GNUNET_HashCode state_key;
-
+
/**
* Associated service record, or NULL for no service.
*/
struct LocalService *serv;
-
+
/**
* Head of DLL of messages for this tunnel.
*/
struct TunnelMessageQueue *head;
-
+
/**
* Tail of DLL of messages for this tunnel.
*/
struct TunnelMessageQueue *tail;
-
+
/**
* Primary redirection information for this connection.
*/
@@ -284,28 +284,28 @@ struct TunnelState
* DNS reply ready for transmission.
*/
char *reply;
-
+
/**
* Socket we are using to transmit this request (must match if we receive
* a response).
*/
struct GNUNET_DNSSTUB_RequestSocket *rs;
-
+
/**
* Number of bytes in 'reply'.
*/
size_t reply_length;
-
+
/**
* Original DNS request ID as used by the client.
*/
uint16_t original_id;
-
+
/**
* DNS request ID that we used for forwarding.
*/
uint16_t my_id;
-
+
} dns;
} specifics;
@@ -411,7 +411,7 @@ static struct GNUNET_DNSSTUB_Context *dnsstub;
/**
* Handle for ongoing DHT PUT operations to advertise exit service.
- */
+ */
static struct GNUNET_DHT_PutHandle *dht_put;
/**
@@ -487,7 +487,7 @@ transmit_reply_to_mesh (void *cls,
GNUNET_assert (ts->specifics.dns.reply != NULL);
if (size == 0)
return 0;
- ret = sizeof (struct GNUNET_MessageHeader) + ts->specifics.dns.reply_length;
+ ret = sizeof (struct GNUNET_MessageHeader) + ts->specifics.dns.reply_length;
GNUNET_assert (ret <= size);
hdr.size = htons (ret);
hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET);
@@ -502,7 +502,7 @@ transmit_reply_to_mesh (void *cls,
off += ts->specifics.dns.reply_length - sizeof (dns);
GNUNET_free (ts->specifics.dns.reply);
ts->specifics.dns.reply = NULL;
- ts->specifics.dns.reply_length = 0;
+ ts->specifics.dns.reply_length = 0;
GNUNET_assert (ret == off);
return ret;
}
@@ -558,7 +558,7 @@ process_dns_result (void *cls,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our `struct TunnelState *`
* @param message the actual message
- *
+ *
* @return #GNUNET_OK to keep the connection open,
* #GNUNET_SYSERR to close it (signal serious error)
*/
@@ -595,7 +595,7 @@ receive_dns_request (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
ts->specifics.dns.original_id = dns->id;
if (tunnels[ts->specifics.dns.my_id] == ts)
tunnels[ts->specifics.dns.my_id] = NULL;
- ts->specifics.dns.my_id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ ts->specifics.dns.my_id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
UINT16_MAX + 1);
tunnels[ts->specifics.dns.my_id] = ts;
memcpy (buf, dns, dlen);
@@ -619,7 +619,7 @@ receive_dns_request (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
* @param ri information about the connection
*/
static void
-hash_redirect_info (struct GNUNET_HashCode *hash,
+hash_redirect_info (struct GNUNET_HashCode *hash,
const struct RedirectInformation *ri)
{
char *off;
@@ -678,7 +678,7 @@ hash_redirect_info (struct GNUNET_HashCode *hash,
*/
static struct TunnelState *
get_redirect_state (int af,
- int protocol,
+ int protocol,
const void *destination_ip,
uint16_t destination_port,
const void *local_ip,
@@ -718,7 +718,7 @@ get_redirect_state (int af,
return NULL;
/* Mark this connection as freshly used */
if (NULL == state_key)
- GNUNET_CONTAINER_heap_update_cost (connections_heap,
+ GNUNET_CONTAINER_heap_update_cost (connections_heap,
state->specifics.tcp_udp.heap_node,
GNUNET_TIME_absolute_get ().abs_value_us);
return state;
@@ -774,7 +774,7 @@ free_service_record (void *cls,
* respective service entry.
*
* @param service_map map of services (TCP or UDP)
- * @param name name of the service
+ * @param name name of the service
* @param destination_port destination port
* @param service service information record to store (service->name will be set).
*/
@@ -827,8 +827,8 @@ send_to_peer_notify_callback (void *cls, size_t size, void *buf)
return 0;
if (0 == size)
{
- s->th = GNUNET_MESH_notify_transmit_ready (tunnel,
- GNUNET_NO /* corking */,
+ s->th = GNUNET_MESH_notify_transmit_ready (tunnel,
+ GNUNET_NO /* corking */,
GNUNET_TIME_UNIT_FOREVER_REL,
tnq->len,
&send_to_peer_notify_callback,
@@ -838,13 +838,13 @@ send_to_peer_notify_callback (void *cls, size_t size, void *buf)
GNUNET_assert (size >= tnq->len);
memcpy (buf, tnq->payload, tnq->len);
size = tnq->len;
- GNUNET_CONTAINER_DLL_remove (s->specifics.tcp_udp.head,
+ GNUNET_CONTAINER_DLL_remove (s->specifics.tcp_udp.head,
s->specifics.tcp_udp.tail,
- tnq);
+ tnq);
GNUNET_free (tnq);
if (NULL != (tnq = s->specifics.tcp_udp.head))
- s->th = GNUNET_MESH_notify_transmit_ready (tunnel,
- GNUNET_NO /* corking */,
+ s->th = GNUNET_MESH_notify_transmit_ready (tunnel,
+ GNUNET_NO /* corking */,
GNUNET_TIME_UNIT_FOREVER_REL,
tnq->len,
&send_to_peer_notify_callback,
@@ -887,16 +887,16 @@ send_packet_to_mesh_tunnel (struct TunnelState *s,
* @param icmp A pointer to the Packet
* @param pktlen number of bytes in 'icmp'
* @param af address family (AFINET or AF_INET6)
- * @param destination_ip destination IP-address of the IP packet (should
+ * @param destination_ip destination IP-address of the IP packet (should
* be our local address)
* @param source_ip original source IP-address of the IP packet (should
* be the original destination address)
*/
static void
-icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
+icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
size_t pktlen,
int af,
- const void *destination_ip,
+ const void *destination_ip,
const void *source_ip)
{
struct TunnelState *state;
@@ -920,7 +920,7 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
sbuf, sizeof (sbuf)),
inet_ntop (af,
destination_ip,
- dbuf, sizeof (dbuf)));
+ dbuf, sizeof (dbuf)));
}
if (pktlen < sizeof (struct GNUNET_TUN_IcmpHeader))
{
@@ -946,7 +946,7 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
case GNUNET_TUN_ICMPTYPE_DESTINATION_UNREACHABLE:
case GNUNET_TUN_ICMPTYPE_SOURCE_QUENCH:
case GNUNET_TUN_ICMPTYPE_TIME_EXCEEDED:
- if (pktlen <
+ if (pktlen <
sizeof (struct GNUNET_TUN_IcmpHeader) +
sizeof (struct GNUNET_TUN_IPv4Header) + 8)
{
@@ -980,7 +980,7 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
case GNUNET_TUN_ICMPTYPE6_PACKET_TOO_BIG:
case GNUNET_TUN_ICMPTYPE6_TIME_EXCEEDED:
case GNUNET_TUN_ICMPTYPE6_PARAMETER_PROBLEM:
- if (pktlen <
+ if (pktlen <
sizeof (struct GNUNET_TUN_IcmpHeader) +
sizeof (struct GNUNET_TUN_IPv6Header) + 8)
{
@@ -1055,7 +1055,7 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
return;
}
mlen = sizeof (struct GNUNET_EXIT_IcmpToVPNMessage) + pktlen - sizeof (struct GNUNET_TUN_IcmpHeader);
- tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueue) + mlen);
+ tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueue) + mlen);
tnq->payload = &tnq[1];
tnq->len = mlen;
i2v = (struct GNUNET_EXIT_IcmpToVPNMessage *) &tnq[1];
@@ -1075,16 +1075,16 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp,
* @param udp A pointer to the Packet
* @param pktlen number of bytes in 'udp'
* @param af address family (AFINET or AF_INET6)
- * @param destination_ip destination IP-address of the IP packet (should
+ * @param destination_ip destination IP-address of the IP packet (should
* be our local address)
* @param source_ip original source IP-address of the IP packet (should
* be the original destination address)
*/
static void
-udp_from_helper (const struct GNUNET_TUN_UdpHeader *udp,
+udp_from_helper (const struct GNUNET_TUN_UdpHeader *udp,
size_t pktlen,
int af,
- const void *destination_ip,
+ const void *destination_ip,
const void *source_ip)
{
struct TunnelState *state;
@@ -1131,7 +1131,7 @@ udp_from_helper (const struct GNUNET_TUN_UdpHeader *udp,
return;
}
mlen = sizeof (struct GNUNET_EXIT_UdpReplyMessage) + pktlen - sizeof (struct GNUNET_TUN_UdpHeader);
- tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueue) + mlen);
+ tnq = GNUNET_malloc (sizeof (struct TunnelMessageQueue) + mlen);
tnq->payload = &tnq[1];
tnq->len = mlen;
urm = (struct GNUNET_EXIT_UdpReplyMessage *) &tnq[1];
@@ -1152,13 +1152,13 @@ udp_from_helper (const struct GNUNET_TUN_UdpHeader *udp,
* @param tcp A pointer to the Packet
* @param pktlen the length of the packet, including its TCP header
* @param af address family (AFINET or AF_INET6)
- * @param destination_ip destination IP-address of the IP packet (should
+ * @param destination_ip destination IP-address of the IP packet (should
* be our local address)
* @param source_ip original source IP-address of the IP packet (should
* be the original destination address)
*/
static void
-tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
+tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
size_t pktlen,
int af,
const void *destination_ip,
@@ -1193,7 +1193,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
return;
}
state = get_redirect_state (af, IPPROTO_TCP,
- source_ip,
+ source_ip,
ntohs (tcp->source_port),
destination_ip,
ntohs (tcp->destination_port),
@@ -1202,12 +1202,12 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("TCP Packet dropped, have no matching connection information\n"));
-
+
return;
}
/* mug port numbers and crc to avoid information leakage;
sender will need to lookup the correct values anyway */
- memcpy (buf, tcp, pktlen);
+ memcpy (buf, tcp, pktlen);
mtcp = (struct GNUNET_TUN_TcpHeader *) buf;
mtcp->source_port = 0;
mtcp->destination_port = 0;
@@ -1228,7 +1228,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp,
tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN);
tdm->reserved = htonl (0);
memcpy (&tdm->tcp_header,
- buf,
+ buf,
pktlen);
send_packet_to_mesh_tunnel (state, tnq);
}
@@ -1296,26 +1296,26 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
_("IPv4 packet options received. Ignored.\n"));
return GNUNET_OK;
}
-
+
size -= sizeof (struct GNUNET_TUN_IPv4Header);
switch (pkt4->protocol)
{
case IPPROTO_UDP:
udp_from_helper ((const struct GNUNET_TUN_UdpHeader *) &pkt4[1], size,
AF_INET,
- &pkt4->destination_address,
+ &pkt4->destination_address,
&pkt4->source_address);
break;
case IPPROTO_TCP:
tcp_from_helper ((const struct GNUNET_TUN_TcpHeader *) &pkt4[1], size,
AF_INET,
- &pkt4->destination_address,
+ &pkt4->destination_address,
&pkt4->source_address);
break;
case IPPROTO_ICMP:
icmp_from_helper ((const struct GNUNET_TUN_IcmpHeader *) &pkt4[1], size,
AF_INET,
- &pkt4->destination_address,
+ &pkt4->destination_address,
&pkt4->source_address);
break;
default:
@@ -1349,19 +1349,19 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
case IPPROTO_UDP:
udp_from_helper ((const struct GNUNET_TUN_UdpHeader *) &pkt6[1], size,
AF_INET6,
- &pkt6->destination_address,
+ &pkt6->destination_address,
&pkt6->source_address);
break;
case IPPROTO_TCP:
tcp_from_helper ((const struct GNUNET_TUN_TcpHeader *) &pkt6[1], size,
AF_INET6,
- &pkt6->destination_address,
+ &pkt6->destination_address,
&pkt6->source_address);
break;
case IPPROTO_ICMPV6:
icmp_from_helper ((const struct GNUNET_TUN_IcmpHeader *) &pkt6[1], size,
AF_INET6,
- &pkt6->destination_address,
+ &pkt6->destination_address,
&pkt6->source_address);
break;
default:
@@ -1398,14 +1398,14 @@ setup_fresh_address (int af,
local_address->af = af;
local_address->proto = (uint8_t) proto;
/* default "local" port range is often 32768--61000,
- so we pick a random value in that range */
+ so we pick a random value in that range */
if ( ( (af == AF_INET) && (proto == IPPROTO_ICMP) ) ||
( (af == AF_INET6) && (proto == IPPROTO_ICMPV6) ) )
local_address->port = 0;
else
- local_address->port
- = (uint16_t) 32768 + GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
- 28232);
+ local_address->port
+ = (uint16_t) 32768 + GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ 28232);
switch (af)
{
case AF_INET:
@@ -1422,13 +1422,13 @@ setup_fresh_address (int af,
local_address->address.ipv4 = addr;
return;
}
- /* Given 192.168.0.1/255.255.0.0, we want a mask
+ /* Given 192.168.0.1/255.255.0.0, we want a mask
of '192.168.255.255', thus: */
mask.s_addr = addr.s_addr | ~mask.s_addr;
/* Pick random IPv4 address within the subnet, except 'addr' or 'mask' itself */
do
{
- rnd.s_addr = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ rnd.s_addr = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
UINT32_MAX);
local_address->address.ipv4.s_addr = (addr.s_addr | rnd.s_addr) & mask.s_addr;
}
@@ -1442,7 +1442,7 @@ setup_fresh_address (int af,
struct in6_addr mask;
struct in6_addr rnd;
int i;
-
+
addr = exit_ipv6addr;
GNUNET_assert (ipv6prefix < 128);
if (ipv6prefix == 127)
@@ -1456,13 +1456,13 @@ setup_fresh_address (int af,
mask = addr;
for (i=127;i>=ipv6prefix;i--)
mask.s6_addr[i / 8] |= (1 << (i % 8));
-
+
/* Pick random IPv6 address within the subnet, except 'addr' or 'mask' itself */
do
{
for (i=0;i<16;i++)
{
- rnd.s6_addr[i] = (unsigned char) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
+ rnd.s6_addr[i] = (unsigned char) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
256);
local_address->address.ipv6.s6_addr[i]
= (addr.s6_addr[i] | rnd.s6_addr[i]) & mask.s6_addr[i];
@@ -1478,7 +1478,7 @@ setup_fresh_address (int af,
break;
default:
GNUNET_assert (0);
- }
+ }
}
@@ -1531,19 +1531,19 @@ setup_state_record (struct TunnelState *state)
char buf[INET6_ADDRSTRLEN];
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Picked local address %s:%u for new connection\n",
- inet_ntop (state->specifics.tcp_udp.ri.local_address.af,
+ inet_ntop (state->specifics.tcp_udp.ri.local_address.af,
&state->specifics.tcp_udp.ri.local_address.address,
buf, sizeof (buf)),
(unsigned int) state->specifics.tcp_udp.ri.local_address.port);
}
state->specifics.tcp_udp.state_key = key;
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (connections_map,
+ GNUNET_CONTAINER_multihashmap_put (connections_map,
&key, state,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
state->specifics.tcp_udp.heap_node = GNUNET_CONTAINER_heap_insert (connections_heap,
state,
- GNUNET_TIME_absolute_get ().abs_value_us);
+ GNUNET_TIME_absolute_get ().abs_value_us);
while (GNUNET_CONTAINER_heap_get_size (connections_heap) > max_connections)
{
s = GNUNET_CONTAINER_heap_remove_root (connections_heap);
@@ -1552,7 +1552,7 @@ setup_state_record (struct TunnelState *state)
GNUNET_MESH_tunnel_destroy (s->tunnel);
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_remove (connections_map,
- &s->specifics.tcp_udp.state_key,
+ &s->specifics.tcp_udp.state_key,
s));
GNUNET_free (s);
}
@@ -1630,7 +1630,7 @@ prepare_ipv4_packet (const void *payload, size_t payload_length,
case IPPROTO_TCP:
{
struct GNUNET_TUN_TcpHeader *pkt4_tcp = (struct GNUNET_TUN_TcpHeader *) &pkt4[1];
-
+
*pkt4_tcp = *tcp_header;
pkt4_tcp->source_port = htons (src_address->port);
pkt4_tcp->destination_port = htons (dst_address->port);
@@ -1696,7 +1696,7 @@ prepare_ipv6_packet (const void *payload, size_t payload_length,
GNUNET_TUN_initialize_ipv6_header (pkt6,
protocol,
- len,
+ len,
&src_address->address.ipv6,
&dst_address->address.ipv6);
@@ -1785,7 +1785,7 @@ send_tcp_packet_via_tun (const struct SocketAddress *destination_address,
char buf[len] GNUNET_ALIGN;
struct GNUNET_MessageHeader *hdr;
struct GNUNET_TUN_Layer2PacketHeader *tun;
-
+
hdr = (struct GNUNET_MessageHeader *) buf;
hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_HELPER);
hdr->size = htons (len);
@@ -1800,7 +1800,7 @@ send_tcp_packet_via_tun (const struct SocketAddress *destination_address,
tun->proto = htons (ETH_P_IPV4);
prepare_ipv4_packet (payload, payload_length,
IPPROTO_TCP,
- tcp_header,
+ tcp_header,
source_address,
destination_address,
ipv4);
@@ -1811,9 +1811,9 @@ send_tcp_packet_via_tun (const struct SocketAddress *destination_address,
struct GNUNET_TUN_IPv6Header * ipv6 = (struct GNUNET_TUN_IPv6Header*) &tun[1];
tun->proto = htons (ETH_P_IPV6);
- prepare_ipv6_packet (payload, payload_length,
+ prepare_ipv6_packet (payload, payload_length,
IPPROTO_TCP,
- tcp_header,
+ tcp_header,
source_address,
destination_address,
ipv6);
@@ -1840,7 +1840,7 @@ send_tcp_packet_via_tun (const struct SocketAddress *destination_address,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -1853,7 +1853,7 @@ receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
const struct GNUNET_EXIT_TcpServiceStartMessage *start;
uint16_t pkt_len = ntohs (message->size);
- if (NULL == state)
+ if (NULL == state)
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -1899,11 +1899,11 @@ receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
"Received data from %s for forwarding to TCP service %s on port %u\n",
GNUNET_i2s (&state->peer),
GNUNET_h2s (&start->service_descriptor),
- (unsigned int) ntohs (start->tcp_header.destination_port));
- if (NULL == (state->specifics.tcp_udp.serv = find_service (tcp_services, &start->service_descriptor,
+ (unsigned int) ntohs (start->tcp_header.destination_port));
+ if (NULL == (state->specifics.tcp_udp.serv = find_service (tcp_services, &start->service_descriptor,
ntohs (start->tcp_header.destination_port))))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("No service found for %s on port %d!\n"),
"TCP",
ntohs (start->tcp_header.destination_port));
@@ -1912,7 +1912,7 @@ receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1, GNUNET_NO);
return GNUNET_SYSERR;
}
- state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
+ state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
setup_state_record (state);
send_tcp_packet_via_tun (&state->specifics.tcp_udp.ri.remote_address,
&state->specifics.tcp_udp.ri.local_address,
@@ -1929,7 +1929,7 @@ receive_tcp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -1946,7 +1946,7 @@ receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
const void *payload;
int af;
- if (NULL == state)
+ if (NULL == state)
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -1973,7 +1973,7 @@ receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
return GNUNET_SYSERR;
}
start = (const struct GNUNET_EXIT_TcpInternetStartMessage*) message;
- pkt_len -= sizeof (struct GNUNET_EXIT_TcpInternetStartMessage);
+ pkt_len -= sizeof (struct GNUNET_EXIT_TcpInternetStartMessage);
if ( (NULL != state->specifics.tcp_udp.serv) ||
(NULL != state->specifics.tcp_udp.heap_node) )
{
@@ -2030,10 +2030,10 @@ receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received data from %s for starting TCP stream to %s:%u\n",
GNUNET_i2s (&state->peer),
- inet_ntop (af,
+ inet_ntop (af,
&state->specifics.tcp_udp.ri.remote_address.address,
buf, sizeof (buf)),
- (unsigned int) ntohs (start->tcp_header.destination_port));
+ (unsigned int) ntohs (start->tcp_header.destination_port));
}
state->specifics.tcp_udp.ri.remote_address.proto = IPPROTO_TCP;
state->specifics.tcp_udp.ri.remote_address.port = ntohs (start->tcp_header.destination_port);
@@ -2047,14 +2047,14 @@ receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
/**
- * Process a request to forward TCP data on an established
+ * Process a request to forward TCP data on an established
* connection via this peer.
*
* @param cls closure, NULL
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -2089,7 +2089,7 @@ receive_tcp_data (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
return GNUNET_SYSERR;
}
data = (const struct GNUNET_EXIT_TcpDataMessage*) message;
- pkt_len -= sizeof (struct GNUNET_EXIT_TcpDataMessage);
+ pkt_len -= sizeof (struct GNUNET_EXIT_TcpDataMessage);
if ( (NULL == state) ||
(NULL == state->specifics.tcp_udp.heap_node) )
{
@@ -2112,7 +2112,7 @@ receive_tcp_data (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
"Received additional %u bytes of data from %s for TCP stream to %s:%u\n",
pkt_len,
GNUNET_i2s (&state->peer),
- inet_ntop (state->specifics.tcp_udp.ri.remote_address.af,
+ inet_ntop (state->specifics.tcp_udp.ri.remote_address.af,
&state->specifics.tcp_udp.ri.remote_address.address,
buf, sizeof (buf)),
(unsigned int) state->specifics.tcp_udp.ri.remote_address.port);
@@ -2174,7 +2174,7 @@ send_icmp_packet_via_tun (const struct SocketAddress *destination_address,
char buf[len] GNUNET_ALIGN;
struct GNUNET_MessageHeader *hdr;
struct GNUNET_TUN_Layer2PacketHeader *tun;
-
+
hdr= (struct GNUNET_MessageHeader *) buf;
hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_HELPER);
hdr->size = htons (len);
@@ -2287,7 +2287,7 @@ make_up_icmpv6_payload (struct TunnelState *state,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -2300,7 +2300,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
const struct GNUNET_EXIT_IcmpInternetMessage *msg;
uint16_t pkt_len = ntohs (message->size);
const struct in_addr *v4;
- const struct in6_addr *v6;
+ const struct in6_addr *v6;
const void *payload;
char buf[sizeof (struct GNUNET_TUN_IPv6Header) + 8] GNUNET_ALIGN;
int af;
@@ -2327,7 +2327,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
return GNUNET_SYSERR;
}
msg = (const struct GNUNET_EXIT_IcmpInternetMessage*) message;
- pkt_len -= sizeof (struct GNUNET_EXIT_IcmpInternetMessage);
+ pkt_len -= sizeof (struct GNUNET_EXIT_IcmpInternetMessage);
af = (int) ntohl (msg->af);
if ( (NULL != state->specifics.tcp_udp.heap_node) &&
@@ -2361,7 +2361,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
state->specifics.tcp_udp.ri.remote_address.proto = IPPROTO_ICMP;
setup_state_record (state);
}
- /* check that ICMP type is something we want to support
+ /* check that ICMP type is something we want to support
and possibly make up payload! */
switch (msg->icmp_header.type)
{
@@ -2383,7 +2383,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_assert (8 == sizeof (struct GNUNET_TUN_UdpHeader));
pkt_len = sizeof (struct GNUNET_TUN_IPv4Header) + 8;
- make_up_icmpv4_payload (state,
+ make_up_icmpv4_payload (state,
ipp,
udp);
payload = ipp;
@@ -2394,7 +2394,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_STATISTICS_update (stats,
gettext_noop ("# ICMPv4 packets dropped (type not allowed)"),
1, GNUNET_NO);
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
}
/* end AF_INET */
break;
@@ -2419,7 +2419,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
state->specifics.tcp_udp.ri.remote_address.proto = IPPROTO_ICMPV6;
setup_state_record (state);
}
- /* check that ICMP type is something we want to support
+ /* check that ICMP type is something we want to support
and possibly make up payload! */
switch (msg->icmp_header.type)
{
@@ -2442,7 +2442,7 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_assert (8 == sizeof (struct GNUNET_TUN_UdpHeader));
pkt_len = sizeof (struct GNUNET_TUN_IPv6Header) + 8;
- make_up_icmpv6_payload (state,
+ make_up_icmpv6_payload (state,
ipp,
udp);
payload = ipp;
@@ -2453,22 +2453,22 @@ receive_icmp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_STATISTICS_update (stats,
gettext_noop ("# ICMPv6 packets dropped (type not allowed)"),
1, GNUNET_NO);
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
}
/* end AF_INET6 */
- break;
+ break;
default:
/* bad AF */
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
-
+
{
char buf[INET6_ADDRSTRLEN];
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received ICMP data from %s for forwarding to %s\n",
GNUNET_i2s (&state->peer),
- inet_ntop (af,
+ inet_ntop (af,
&state->specifics.tcp_udp.ri.remote_address.address,
buf, sizeof (buf)));
}
@@ -2499,7 +2499,7 @@ make_up_icmp_service_payload (struct TunnelState *state,
{
struct GNUNET_TUN_IPv4Header *ipv4;
struct GNUNET_TUN_UdpHeader *udp;
-
+
ipv4 = (struct GNUNET_TUN_IPv4Header *)buf;
udp = (struct GNUNET_TUN_UdpHeader *) &ipv4[1];
make_up_icmpv4_payload (state,
@@ -2520,7 +2520,7 @@ make_up_icmp_service_payload (struct TunnelState *state,
ipv6,
udp);
GNUNET_assert (8 == sizeof (struct GNUNET_TUN_UdpHeader));
- return sizeof (struct GNUNET_TUN_IPv6Header) + 8;
+ return sizeof (struct GNUNET_TUN_IPv6Header) + 8;
}
break;
default:
@@ -2538,7 +2538,7 @@ make_up_icmp_service_payload (struct TunnelState *state,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -2590,7 +2590,7 @@ receive_icmp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel
}
icmp = msg->icmp_header;
payload = &msg[1];
- state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
+ state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
setup_state_record (state);
/* check that ICMP type is something we want to support,
@@ -2772,7 +2772,7 @@ send_udp_packet_via_tun (const struct SocketAddress *destination_address,
char buf[len] GNUNET_ALIGN;
struct GNUNET_MessageHeader *hdr;
struct GNUNET_TUN_Layer2PacketHeader *tun;
-
+
hdr= (struct GNUNET_MessageHeader *) buf;
hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_HELPER);
hdr->size = htons (len);
@@ -2798,7 +2798,7 @@ send_udp_packet_via_tun (const struct SocketAddress *destination_address,
struct GNUNET_TUN_IPv6Header * ipv6 = (struct GNUNET_TUN_IPv6Header*) &tun[1];
tun->proto = htons (ETH_P_IPV6);
- prepare_ipv6_packet (payload, payload_length,
+ prepare_ipv6_packet (payload, payload_length,
IPPROTO_UDP,
NULL,
source_address,
@@ -2826,7 +2826,7 @@ send_udp_packet_via_tun (const struct SocketAddress *destination_address,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -2865,7 +2865,7 @@ receive_udp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
return GNUNET_SYSERR;
}
msg = (const struct GNUNET_EXIT_UdpInternetMessage*) message;
- pkt_len -= sizeof (struct GNUNET_EXIT_UdpInternetMessage);
+ pkt_len -= sizeof (struct GNUNET_EXIT_UdpInternetMessage);
af = (int) ntohl (msg->af);
state->specifics.tcp_udp.ri.remote_address.af = af;
switch (af)
@@ -2911,10 +2911,10 @@ receive_udp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received data from %s for forwarding to UDP %s:%u\n",
GNUNET_i2s (&state->peer),
- inet_ntop (af,
+ inet_ntop (af,
&state->specifics.tcp_udp.ri.remote_address.address,
buf, sizeof (buf)),
- (unsigned int) ntohs (msg->destination_port));
+ (unsigned int) ntohs (msg->destination_port));
}
state->specifics.tcp_udp.ri.remote_address.proto = IPPROTO_UDP;
state->specifics.tcp_udp.ri.remote_address.port = msg->destination_port;
@@ -2937,7 +2937,7 @@ receive_udp_remote (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
* @param tunnel connection to the other end
* @param tunnel_ctx pointer to our 'struct TunnelState *'
* @param message the actual message
- *
+ *
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
@@ -2978,11 +2978,11 @@ receive_udp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
"Received data from %s for forwarding to UDP service %s on port %u\n",
GNUNET_i2s (&state->peer),
GNUNET_h2s (&msg->service_descriptor),
- (unsigned int) ntohs (msg->destination_port));
- if (NULL == (state->specifics.tcp_udp.serv = find_service (udp_services, &msg->service_descriptor,
+ (unsigned int) ntohs (msg->destination_port));
+ if (NULL == (state->specifics.tcp_udp.serv = find_service (udp_services, &msg->service_descriptor,
ntohs (msg->destination_port))))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("No service found for %s on port %d!\n"),
"UDP",
ntohs (msg->destination_port));
@@ -2991,7 +2991,7 @@ receive_udp_service (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
1, GNUNET_NO);
return GNUNET_SYSERR;
}
- state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
+ state->specifics.tcp_udp.ri.remote_address = state->specifics.tcp_udp.serv->address;
setup_state_record (state);
if (0 != ntohs (msg->source_port))
state->specifics.tcp_udp.ri.local_address.port = msg->source_port;
@@ -3057,7 +3057,7 @@ clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
{
if (tunnels[s->specifics.dns.my_id] == s)
tunnels[s->specifics.dns.my_id] = NULL;
- GNUNET_free_non_null (s->specifics.dns.reply);
+ GNUNET_free_non_null (s->specifics.dns.reply);
}
else
{
@@ -3233,10 +3233,10 @@ add_services (int proto,
}
hostport[0] = '\0';
hostport++;
-
+
int local_port = atoi (redirect);
int remote_port = atoi (hostport);
-
+
if (!((local_port > 0) && (local_port < 65536)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -3260,7 +3260,7 @@ add_services (int proto,
{
const char *ip4addr = exit_argv[5];
- serv->address.af = AF_INET;
+ serv->address.af = AF_INET;
GNUNET_assert (1 == inet_pton (AF_INET, ip4addr, &serv->address.address.ipv4));
}
else if (0 == strcmp ("localhost6", hostname))
@@ -3272,10 +3272,10 @@ add_services (int proto,
}
else
{
- struct addrinfo *res;
+ struct addrinfo *res;
int ret;
- ret = getaddrinfo (hostname, NULL, NULL, &res);
+ ret = getaddrinfo (hostname, NULL, NULL, &res);
if ( (ret != 0) || (res == NULL) )
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -3285,7 +3285,7 @@ add_services (int proto,
GNUNET_free (serv);
continue;
}
-
+
serv->address.af = res->ai_family;
switch (res->ai_family)
{
@@ -3388,7 +3388,7 @@ dht_put_cont (void *cls,
{
dht_put = NULL;
dht_task = GNUNET_SCHEDULER_add_delayed (DHT_PUT_FREQUENCY,
- &do_dht_put,
+ &do_dht_put,
NULL);
}
@@ -3408,7 +3408,7 @@ do_dht_put (void *cls,
dht_task = GNUNET_SCHEDULER_NO_TASK;
expiration = GNUNET_TIME_absolute_ntoh (dns_advertisement.expiration_time);
- if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us <
+ if (GNUNET_TIME_absolute_get_remaining (expiration).rel_value_us <
GNUNET_TIME_UNIT_HOURS.rel_value_us)
{
/* refresh advertisement */
@@ -3424,7 +3424,7 @@ do_dht_put (void *cls,
1 /* replication */,
GNUNET_DHT_RO_NONE,
GNUNET_BLOCK_TYPE_DNS,
- sizeof (struct GNUNET_DNS_Advertisement),
+ sizeof (struct GNUNET_DNS_Advertisement),
&dns_advertisement,
expiration,
GNUNET_TIME_UNIT_FOREVER_REL,
@@ -3480,9 +3480,9 @@ run (void *cls, char *const *args GNUNET_UNUSED,
cfg = cfg_;
ipv4_exit = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "EXIT_IPV4");
- ipv6_exit = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "EXIT_IPV6");
+ ipv6_exit = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "EXIT_IPV6");
ipv4_enabled = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "ENABLE_IPV4");
- ipv6_enabled = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "ENABLE_IPV6");
+ ipv6_enabled = GNUNET_CONFIGURATION_get_value_yesno (cfg, "exit", "ENABLE_IPV6");
if ( (ipv4_exit) || (ipv6_exit) )
{
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
@@ -3540,13 +3540,13 @@ run (void *cls, char *const *args GNUNET_UNUSED,
if ( (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno (cfg_, "exit", "ENABLE_DNS")) &&
( (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg, "exit",
+ GNUNET_CONFIGURATION_get_value_string (cfg, "exit",
"DNS_RESOLVER",
&dns_exit)) ||
( (1 != inet_pton (AF_INET, dns_exit, &dns_exit4)) &&
(1 != inet_pton (AF_INET6, dns_exit, &dns_exit6)) ) ) )
{
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
"dns", "DNS_RESOLVER",
_("need a valid IPv4 or IPv6 address\n"));
GNUNET_free_non_null (dns_exit);
@@ -3575,13 +3575,13 @@ run (void *cls, char *const *args GNUNET_UNUSED,
peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg);
GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key,
&dns_advertisement.peer.public_key);
- dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) -
+ dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) -
sizeof (struct GNUNET_CRYPTO_EccSignature));
dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD);
- GNUNET_CRYPTO_hash ("dns",
+ GNUNET_CRYPTO_hash ("dns",
strlen ("dns"),
&dht_put_key);
- dht_task = GNUNET_SCHEDULER_add_now (&do_dht_put,
+ dht_task = GNUNET_SCHEDULER_add_now (&do_dht_put,
NULL);
apptypes[app_idx] = GNUNET_APPLICATION_TYPE_INTERNET_RESOLVER;
app_idx++;
@@ -3617,7 +3617,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
{
exit_argv[2] = GNUNET_strdup ("-");
}
-
+
if (GNUNET_YES == ipv6_enabled)
{
@@ -3651,7 +3651,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
GNUNET_SCHEDULER_shutdown ();
return;
}
- }
+ }
else
{
/* IPv6 explicitly disabled */
@@ -3695,9 +3695,9 @@ run (void *cls, char *const *args GNUNET_UNUSED,
connections_map = GNUNET_CONTAINER_multihashmap_create (65536, GNUNET_NO);
connections_heap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
- mesh_handle
- = GNUNET_MESH_connect (cfg, NULL,
- &new_tunnel,
+ mesh_handle
+ = GNUNET_MESH_connect (cfg, NULL,
+ &new_tunnel,
&clean_tunnel, handlers,
apptypes); // FIXME use ports
if (NULL == mesh_handle)
@@ -3724,12 +3724,12 @@ run (void *cls, char *const *args GNUNET_UNUSED,
(void) GNUNET_asprintf (&prefixed_regex, "%s%s%s",
GNUNET_APPLICATION_TYPE_EXIT_REGEX_PREFIX,
"4", regex);
- regex4 = GNUNET_REGEX_announce (cfg,
+ regex4 = GNUNET_REGEX_announce (cfg,
prefixed_regex,
REGEX_REFRESH_FREQUENCY,
REGEX_MAX_PATH_LEN_IPV4);
GNUNET_free (regex);
- GNUNET_free (prefixed_regex);
+ GNUNET_free (prefixed_regex);
}
}
@@ -3744,7 +3744,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
regex = NULL;
else
regex = GNUNET_TUN_ipv6policy2regex (policy);
- GNUNET_free_non_null (policy);
+ GNUNET_free_non_null (policy);
if (NULL != regex)
{
(void) GNUNET_asprintf (&prefixed_regex, "%s%s%s",
@@ -3760,7 +3760,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
}
if ((ipv4_exit) || (ipv6_exit))
helper_handle = GNUNET_HELPER_start (GNUNET_NO,
- "gnunet-helper-exit",
+ "gnunet-helper-exit",
exit_argv,
&message_token,
NULL, NULL);
diff --git a/src/exit/gnunet-helper-exit-windows.c b/src/exit/gnunet-helper-exit-windows.c
index 461494480..bb6b6a8e4 100644
--- a/src/exit/gnunet-helper-exit-windows.c
+++ b/src/exit/gnunet-helper-exit-windows.c
@@ -19,8 +19,8 @@
*/
/**
* @file exit/gnunet-helper-exit-windows.c
- * @brief the helper for the EXIT service in win32 builds.
- * Opens a virtual network-interface, sends data received on the if to stdout,
+ * @brief the helper for the EXIT service in win32 builds.
+ * Opens a virtual network-interface, sends data received on the if to stdout,
* sends data received on stdin to the interface
* @author Christian M. Fuchs
*
@@ -68,7 +68,7 @@
#endif
/**
- * Will this binary be run in permissions testing mode?
+ * Will this binary be run in permissions testing mode?
*/
static boolean privilege_testing = FALSE;
@@ -90,7 +90,7 @@ static boolean privilege_testing = FALSE;
#define INF_FILE64 "share/gnunet/openvpn-tap32/tapw64/OemWin2k.inf"
/**
- * Hardware ID used in the inf-file.
+ * Hardware ID used in the inf-file.
* This might change over time, as openvpn advances their driver
*/
#define HARDWARE_ID "tap0901"
@@ -101,7 +101,7 @@ static boolean privilege_testing = FALSE;
#define TAP_WIN_MIN_MAJOR 9
/**
- * Minimum minor-id of the driver version we can work with.
+ * Minimum minor-id of the driver version we can work with.
* v <= 7 has buggy IPv6.
* v == 8 is broken for small IPv4 Packets
*/
@@ -109,7 +109,7 @@ static boolean privilege_testing = FALSE;
/**
* Time in seconds to wait for our virtual device to go up after telling it to do so.
- *
+ *
* openvpn doesn't specify a value, 4 seems sane for testing, even for openwrt
* (in fact, 4 was chosen by a fair dice roll...)
*/
@@ -121,7 +121,7 @@ static boolean privilege_testing = FALSE;
#define INTERFACE_REGISTRY_LOCATION "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
/**
- * Our local process' PID. Used for creating a sufficiently unique additional
+ * Our local process' PID. Used for creating a sufficiently unique additional
* hardware ID for our device.
*/
static char secondary_hwid[LINE_LEN / 2];
@@ -132,13 +132,13 @@ static char secondary_hwid[LINE_LEN / 2];
*/
static char device_visible_name[256];
-/**
+/**
* This is our own local instance of a virtual network interface
* It is (somewhat) equivalent to using tun/tap in unixoid systems
- *
+ *
* Upon initialization, we create such an device node.
* Upon termination, we remove it again.
- *
+ *
* If we crash this device might stay around.
*/
static HDEVINFO DeviceInfo = INVALID_HANDLE_VALUE;
@@ -149,7 +149,7 @@ static HDEVINFO DeviceInfo = INVALID_HANDLE_VALUE;
static SP_DEVINFO_DATA DeviceNode;
/**
- * GUID of our virtual device in the form of
+ * GUID of our virtual device in the form of
* {12345678-1234-1234-1234-123456789abc} - in hex
*/
static char device_guid[256];
@@ -161,36 +161,36 @@ static char device_guid[256];
enum IO_State
{
- /**
- * overlapped I/O is ready for work
+ /**
+ * overlapped I/O is ready for work
*/
IOSTATE_READY = 0,
- /**
- * overlapped I/O has been queued
+ /**
+ * overlapped I/O has been queued
*/
IOSTATE_QUEUED,
- /**
- * overlapped I/O has finished, but is waiting for it's write-partner
+ /**
+ * overlapped I/O has finished, but is waiting for it's write-partner
*/
- IOSTATE_WAITING,
-
- /**
+ IOSTATE_WAITING,
+
+ /**
* there is a full buffer waiting
*/
IOSTATE_RESUME,
- /**
+ /**
* Operlapped IO states for facility objects
- * overlapped I/O has failed, stop processing
+ * overlapped I/O has failed, stop processing
*/
- IOSTATE_FAILED
+ IOSTATE_FAILED
};
-/**
+/**
* A IO Object + read/writebuffer + buffer-size for windows asynchronous IO handling
*/
struct io_facility
@@ -229,7 +229,7 @@ struct io_facility
* Amount of data actually written or read by readfile/writefile.
*/
DWORD buffer_size_processed;
-
+
/**
* How much of this buffer we have written in total
*/
@@ -248,32 +248,32 @@ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
/**
* Determines if the host OS is win32 or win64
- *
- * @return true if
+ *
+ * @return true if
*/
BOOL
is_win64 ()
{
#if defined(_WIN64)
- //this is a win64 binary,
- return TRUE;
+ //this is a win64 binary,
+ return TRUE;
#elif defined(_WIN32)
//this is a 32bit binary, and we need to check if we are running in WOW64
BOOL success = FALSE;
BOOL on_wow64 = FALSE;
LPFN_ISWOW64PROCESS IsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandle ("kernel32"), "IsWow64Process");
-
+
if (NULL != IsWow64Process)
success = IsWow64Process (GetCurrentProcess (), &on_wow64);
-
+
return success && on_wow64;
#endif
}
/**
* Wrapper for executing a shellcommand in windows.
- *
+ *
* @param command - the command + parameters to execute
- * @return * exitcode of the program executed,
+ * @return * exitcode of the program executed,
* * EINVAL (cmd/file not found)
* * EPIPE (could not read STDOUT)
*/
@@ -393,7 +393,7 @@ set_address4 (const char *address, const char *mask)
strerror (errno));
return -1;
}
- // Set Device to Subnet-Mode?
+ // Set Device to Subnet-Mode?
// do we really need tun.c:2925 ?
/*
@@ -445,8 +445,8 @@ remove_address4 (const char *address)
/**
- * Setup a new virtual interface to use for tunneling.
- *
+ * Setup a new virtual interface to use for tunneling.
+ *
* @return: TRUE if setup was successful, else FALSE
*/
static BOOL
@@ -454,7 +454,7 @@ setup_interface ()
{
/*
* where to find our inf-file. (+ the "full" path, after windows found")
- *
+ *
* We do not directly input all the props here, because openvpn will update
* these details over time.
*/
@@ -465,22 +465,22 @@ setup_interface ()
GUID class_guid;
int str_length = 0;
- /**
+ /**
* Set the device's hardware ID and add it to a list.
- * This information will later on identify this device in registry.
+ * This information will later on identify this device in registry.
*/
strncpy (hwidlist, HARDWARE_ID, LINE_LEN);
/**
- * this is kind of over-complicated, but allows keeps things independent of
- * how the openvpn-hwid is actually stored.
- *
+ * this is kind of over-complicated, but allows keeps things independent of
+ * how the openvpn-hwid is actually stored.
+ *
* A HWID list is double-\0 terminated and \0 separated
*/
str_length = strlen (hwidlist) + 1;
strncpy (&hwidlist[str_length], secondary_hwid, LINE_LEN);
str_length += strlen (&hwidlist[str_length]) + 1;
-
- /**
+
+ /**
* Locate the inf-file, we need to store it somewhere where the system can
* find it. We need to pick the correct driver for win32/win64.
*/
@@ -490,7 +490,7 @@ setup_interface ()
GetFullPathNameA (INF_FILE, MAX_PATH, inf_file_path, &temp_inf_filename);
fprintf (stderr, "INFO: Located our driver's .inf file at %s\n", inf_file_path);
- /**
+ /**
* Bootstrap our device info using the drivers inf-file
*/
if ( ! SetupDiGetINFClassA (inf_file_path,
@@ -499,9 +499,9 @@ setup_interface ()
NULL))
return FALSE;
- /**
- * Collect all the other needed information...
- * let the system fill our this form
+ /**
+ * Collect all the other needed information...
+ * let the system fill our this form
*/
DeviceInfo = SetupDiCreateDeviceInfoList (&class_guid, NULL);
if (DeviceInfo == INVALID_HANDLE_VALUE)
@@ -546,9 +546,9 @@ setup_interface ()
/**
- * Remove our new virtual interface to use for tunneling.
+ * Remove our new virtual interface to use for tunneling.
* This function must be called AFTER setup_interface!
- *
+ *
* @return: TRUE if destruction was successful, else FALSE
*/
static BOOL
@@ -564,7 +564,7 @@ remove_interface ()
remove.Scope = DI_REMOVEDEVICE_GLOBAL;
remove.ClassInstallHeader.InstallFunction = DIF_REMOVE;
/*
- * 1. Prepare our existing device information set, and place the
+ * 1. Prepare our existing device information set, and place the
* uninstall related information into the structure
*/
if ( ! SetupDiSetClassInstallParamsA (DeviceInfo,
@@ -581,7 +581,7 @@ remove_interface ()
return FALSE;
SetupDiDestroyDeviceInfoList (DeviceInfo);
-
+
fprintf (stderr, "DEBUG: removed interface successfully\n");
return TRUE;
@@ -590,8 +590,8 @@ remove_interface ()
/**
* Do all the lookup necessary to retrieve the inteface's actual name
- * off the registry.
- *
+ * off the registry.
+ *
* @return: TRUE if we were able to lookup the interface's name, else FALSE
*/
static BOOL
@@ -615,7 +615,7 @@ resolve_interface_name ()
0, //must be 0
NULL)) //hMachine, we are local
return FALSE;
-
+
fprintf (stderr, "DEBUG: Resolving interface name for network device %s\n",pnp_instance_id);
/* Registry is incredibly slow, retry for up to 30 seconds to allow registry to refresh */
@@ -633,7 +633,7 @@ resolve_interface_name ()
&adapter_key_handle))
return FALSE;
- /* Of course there is a multitude of entries here, with arbitrary names,
+ /* Of course there is a multitude of entries here, with arbitrary names,
* thus we need to iterate through there.
*/
while (!retval)
@@ -658,7 +658,7 @@ resolve_interface_name ()
NULL,
NULL);
- /* this may fail due to one of two reasons:
+ /* this may fail due to one of two reasons:
* we are at the end of the list*/
if (ERROR_NO_MORE_ITEMS == status)
break;
@@ -709,8 +709,8 @@ resolve_interface_name ()
if (status != ERROR_SUCCESS || data_type != REG_SZ)
goto cleanup;
- /*
- * we have successfully found OUR instance,
+ /*
+ * we have successfully found OUR instance,
* save the device GUID before exiting
*/
@@ -732,7 +732,7 @@ cleanup:
/**
* Determines the version of the installed TAP32 driver and checks if it's sufficiently new for GNUNET
- *
+ *
* @param handle the handle to our tap device
* @return TRUE if the version is sufficient, else FALSE
*/
@@ -758,7 +758,7 @@ check_tapw32_version (HANDLE handle)
TAP_WIN_MIN_MINOR);
return FALSE;
}
-
+
return TRUE;
}
@@ -824,8 +824,8 @@ init_tun ()
/**
* Brings a TAP device up and sets it to connected state.
- *
- * @param handle the handle to our TAP device
+ *
+ * @param handle the handle to our TAP device
* @return True if the operation succeeded, else false
*/
static BOOL
@@ -851,25 +851,25 @@ tun_up (HANDLE handle)
/**
* Attempts to read off an input facility (tap or named pipe) in overlapped mode.
- *
- * 1.
+ *
+ * 1.
* If the input facility is in IOSTATE_READY, it will issue a new read operation to the
- * input handle. Then it goes into IOSTATE_QUEUED state.
+ * input handle. Then it goes into IOSTATE_QUEUED state.
* In case the read succeeded instantly the input facility enters 3.
- *
- * 2.
+ *
+ * 2.
* If the input facility is in IOSTATE_QUEUED state, it will check if the queued read has finished already.
* If it has finished, go to state 3.
* If it has failed, set IOSTATE_FAILED
- *
+ *
* 3.
* If the output facility is in state IOSTATE_READY, the read-buffer is copied to the output buffer.
* The input facility enters state IOSTATE_READY
* The output facility enters state IOSTATE_READY
* If the output facility is in state IOSTATE_QUEUED, the input facility enters IOSTATE_WAITING
- *
+ *
* IOSTATE_WAITING is reset by the output facility, once it has completed.
- *
+ *
* @param input_facility input named pipe or file to work with.
* @param output_facility output pipe or file to hand over data to.
* @return false if an event reset was impossible (OS error), else true
@@ -880,11 +880,11 @@ attempt_read_tap (struct io_facility * input_facility,
{
struct GNUNET_MessageHeader * hdr;
unsigned short size;
-
+
switch (input_facility->facility_state)
{
case IOSTATE_READY:
- {
+ {
if (! ResetEvent (input_facility->overlapped.hEvent))
{
return FALSE;
@@ -903,9 +903,9 @@ attempt_read_tap (struct io_facility * input_facility,
/* reset event manually*/
if (! SetEvent (input_facility->overlapped.hEvent))
return FALSE;
-
+
fprintf (stderr, "DEBUG: tap read succeeded immediately\n");
-
+
/* we successfully read something from the TAP and now need to
* send it our via STDOUT. Is that possible at the moment? */
if ((IOSTATE_READY == output_facility->facility_state ||
@@ -914,7 +914,7 @@ attempt_read_tap (struct io_facility * input_facility,
{ /* hand over this buffers content and apply message header for gnunet */
hdr = (struct GNUNET_MessageHeader *) output_facility->buffer;
size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader);
-
+
memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader),
input_facility->buffer,
input_facility->buffer_size);
@@ -961,7 +961,7 @@ attempt_read_tap (struct io_facility * input_facility,
return FALSE;
fprintf (stderr, "DEBUG: tap read succeeded delayed\n");
-
+
/* we successfully read something from the TAP and now need to
* send it our via STDOUT. Is that possible at the moment? */
if ((IOSTATE_READY == output_facility->facility_state ||
@@ -970,7 +970,7 @@ attempt_read_tap (struct io_facility * input_facility,
{ /* hand over this buffers content and apply message header for gnunet */
hdr = (struct GNUNET_MessageHeader *) output_facility->buffer;
size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader);
-
+
memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader),
input_facility->buffer,
input_facility->buffer_size);
@@ -1023,26 +1023,26 @@ attempt_read_tap (struct io_facility * input_facility,
/**
* Attempts to read off an input facility (tap or named pipe) in overlapped mode.
- *
- * 1.
+ *
+ * 1.
* If the input facility is in IOSTATE_READY, it will issue a new read operation to the
- * input handle. Then it goes into IOSTATE_QUEUED state.
+ * input handle. Then it goes into IOSTATE_QUEUED state.
* In case the read succeeded instantly the input facility enters 3.
- *
- * 2.
+ *
+ * 2.
* If the input facility is in IOSTATE_QUEUED state, it will check if the queued read has finished already.
* If it has finished, go to state 3.
* If it has failed, set IOSTATE_FAILED
- *
+ *
* 3.
* If the facility is finished with ready
* The read-buffer is copied to the output buffer, except for the GNUNET_MessageHeader.
* The input facility enters state IOSTATE_READY
* The output facility enters state IOSTATE_READY
* If the output facility is in state IOSTATE_QUEUED, the input facility enters IOSTATE_WAITING
- *
+ *
* IOSTATE_WAITING is reset by the output facility, once it has completed.
- *
+ *
* @param input_facility input named pipe or file to work with.
* @param output_facility output pipe or file to hand over data to.
* @return false if an event reset was impossible (OS error), else true
@@ -1052,17 +1052,17 @@ attempt_read_stdin (struct io_facility * input_facility,
struct io_facility * output_facility)
{
struct GNUNET_MessageHeader * hdr;
-
+
switch (input_facility->facility_state)
{
case IOSTATE_READY:
{
input_facility->buffer_size = 0;
-
+
partial_read_iostate_ready:
if (! ResetEvent (input_facility->overlapped.hEvent))
return FALSE;
-
+
/* Check how the task is handled */
if (ReadFile (input_facility->handle,
input_facility->buffer + input_facility->buffer_size,
@@ -1110,7 +1110,7 @@ partial_read_iostate_ready:
input_facility->facility_state = IOSTATE_WAITING;
else /* we read nothing */
input_facility->facility_state = IOSTATE_READY;
- }
+ }
else /* operation was either queued or failed*/
{
int err = GetLastError ();
@@ -1138,13 +1138,13 @@ partial_read_iostate_ready:
FALSE))
{/* successful return for a queued operation */
hdr = (struct GNUNET_MessageHeader *) input_facility->buffer;
-
+
if (! ResetEvent (input_facility->overlapped.hEvent))
return FALSE;
-
+
fprintf (stderr, "DEBUG: stdin read succeeded delayed\n");
input_facility->buffer_size += input_facility->buffer_size_processed;
-
+
if ((ntohs (hdr->type) != GNUNET_MESSAGE_TYPE_VPN_HELPER) ||
(ntohs (hdr->size) > sizeof (input_facility->buffer)))
{
@@ -1206,7 +1206,7 @@ partial_read_iostate_ready:
* Attempts to write to an output facility (tap or named pipe) in overlapped mode.
*
* TODO: high level description
- *
+ *
* @param output_facility output pipe or file to hand over data to.
* @param input_facility input named pipe or file to work with.
* @return false if an event reset was impossible (OS error), else true
@@ -1219,7 +1219,7 @@ attempt_write (struct io_facility * output_facility,
{
case IOSTATE_READY:
output_facility->buffer_size_written = 0;
-
+
continue_partial_write:
if (! ResetEvent (output_facility->overlapped.hEvent))
return FALSE;
@@ -1234,7 +1234,7 @@ continue_partial_write:
fprintf (stderr, "DEBUG: write succeeded immediately\n");
output_facility->buffer_size_written += output_facility->buffer_size_processed;
-
+
/* reset event manually*/
if (! SetEvent (output_facility->overlapped.hEvent))
return FALSE;
@@ -1242,7 +1242,7 @@ continue_partial_write:
/* partial write */
if (output_facility->buffer_size_written < output_facility->buffer_size)
goto continue_partial_write;
-
+
/* we are now waiting for our buffer to be filled*/
output_facility->facility_state = IOSTATE_WAITING;
@@ -1269,7 +1269,7 @@ continue_partial_write:
return TRUE;
case IOSTATE_QUEUED:
// there was an operation going on already, check if that has completed now.
-
+
if (GetOverlappedResult (output_facility->handle,
&output_facility->overlapped,
&output_facility->buffer_size_processed,
@@ -1277,17 +1277,17 @@ continue_partial_write:
{/* successful return for a queued operation */
if (! ResetEvent (output_facility->overlapped.hEvent))
return FALSE;
-
+
fprintf (stderr, "DEBUG: write succeeded delayed\n");
output_facility->buffer_size_written += output_facility->buffer_size_processed;
-
+
/* partial write */
if (output_facility->buffer_size_written < output_facility->buffer_size)
goto continue_partial_write;
-
+
/* we are now waiting for our buffer to be filled*/
output_facility->facility_state = IOSTATE_WAITING;
-
+
/* we successfully wrote something and now need to reset our reader */
if (IOSTATE_WAITING == input_facility->facility_state)
input_facility->facility_state = IOSTATE_RESUME;
@@ -1304,7 +1304,7 @@ continue_partial_write:
fprintf (stderr, "FATAL: Write to handle failed, exiting\n");
}
}
- default:
+ default:
return TRUE;
}
}
@@ -1312,7 +1312,7 @@ continue_partial_write:
/**
* Initialize a overlapped structure
- *
+ *
* @param elem the element to initilize
* @param initial_state the initial state for this instance
* @param signaled if the hEvent created should default to signaled or not
@@ -1358,13 +1358,13 @@ run (HANDLE tap_handle)
/* tun up: */
/* we do this HERE and not beforehand (in init_tun()), in contrast to openvpn
* to remove the need to flush the arp cache, handle DHCP and wrong IPs.
- *
+ *
* DHCP and such are all features we will never use in gnunet afaik.
* But for openvpn those are essential.
*/
if ((privilege_testing) || (! tun_up (tap_handle) ))
goto teardown_final;
-
+
/* Initialize our overlapped IO structures*/
if (! (initialize_io_facility (&tap_read, IOSTATE_READY, FALSE)
&& initialize_io_facility (&tap_write, IOSTATE_WAITING, TRUE)
@@ -1380,12 +1380,12 @@ run (HANDLE tap_handle)
/* Debug output to console STDIN/STDOUT*/
std_in.handle = parent_std_in_handle;
std_out.handle = parent_std_out_handle;
-
+
#else
fprintf (stderr, "DEBUG: reopening stdin/out for overlapped IO\n");
- /*
- * Find out the types of our handles.
- * This part is a problem, because in windows we need to handle files,
+ /*
+ * Find out the types of our handles.
+ * This part is a problem, because in windows we need to handle files,
* pipes and the console differently.
*/
if ((FILE_TYPE_PIPE != GetFileType (parent_std_in_handle)) ||
@@ -1417,9 +1417,9 @@ run (HANDLE tap_handle)
goto teardown;
}
#endif
-
+
fprintf (stderr, "DEBUG: mainloop has begun\n");
-
+
while (std_out.path_open || tap_write.path_open)
{
/* perform READ from stdin if possible */
@@ -1439,15 +1439,15 @@ run (HANDLE tap_handle)
break;
}
fprintf (stderr, "DEBUG: teardown initiated\n");
-
+
teardown:
-
+
CancelIo (tap_handle);
CancelIo (std_in.handle);
CancelIo (std_out.handle);
teardown_final:
-
+
CloseHandle (tap_handle);
}
@@ -1474,7 +1474,7 @@ main (int argc, char **argv)
BOOL have_ip4 = FALSE;
BOOL have_ip6 = FALSE;
BOOL have_nat44 = FALSE;
-
+
if ( (1 < argc) && (0 != strcmp (argv[1], "-d"))){
privilege_testing = TRUE;
fprintf (stderr,
@@ -1483,10 +1483,10 @@ main (int argc, char **argv)
argv++;
argc--;
}
-
+
if (6 != argc)
{
- fprintf (stderr,
+ fprintf (stderr,
"%s",
"FATAL: must supply 6 arguments\nUsage:\ngnunet-helper-exit [-d] <if name prefix> <uplink-interface name> <address6 or \"-\"> <netbits6> <address4 or \"-\"> <netmask4>\n");
return 1;
@@ -1495,9 +1495,9 @@ main (int argc, char **argv)
strncpy (hwid, argv[1], LINE_LEN);
hwid[LINE_LEN - 1] = '\0';
- /*
- * We use our PID for finding/resolving the control-panel name of our virtual
- * device. PIDs are (of course) unique at runtime, thus we can safely use it
+ /*
+ * We use our PID for finding/resolving the control-panel name of our virtual
+ * device. PIDs are (of course) unique at runtime, thus we can safely use it
* as additional hardware-id for our device.
*/
snprintf (secondary_hwid, LINE_LEN / 2, "%s-%d",
@@ -1558,7 +1558,7 @@ main (int argc, char **argv)
fprintf (stderr, "FATAL: Could not enable forwarding via netsh: %s\n", strerror (local_ret));
goto cleanup;
}
- /* we can keep IPv6 forwarding around, as all interfaces have
+ /* we can keep IPv6 forwarding around, as all interfaces have
* their forwarding mode reset to false at bootup. */
}
@@ -1574,11 +1574,11 @@ main (int argc, char **argv)
// setup NAPT, if possible
/* MS has REMOVED the routing/nat capabilities from Vista+, thus
* we can not setup NAT like in XP or on the server. Actually the
- * the only feasible solution seems to be to use
+ * the only feasible solution seems to be to use
* Internet Connection Sharing, which introduces a horde of problems
* such as sending out rogue-RAs on the external interface in an ipv6
* network.
- * Thus, below stuff ONLY works on
+ * Thus, below stuff ONLY works on
* WinXP SP3
* Win Server 2003 SP1+
* Win Server 2008
@@ -1637,7 +1637,7 @@ cleanup:
if (0 != local_ret)
fprintf(stderr, "WARNING: Could not remove IPv4-NAPT from internal interface, hopefully this will have no effect in future runs: %s\n", strerror(local_ret));
}
-
+
fprintf(stderr, "DEBUG: Removing IP4 address\n");
remove_address4 (address);
}
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c
index e2a0fd416..e87aac559 100644
--- a/src/exit/gnunet-helper-exit.c
+++ b/src/exit/gnunet-helper-exit.c
@@ -19,7 +19,7 @@
*/
/**
- * @file exit/gnunet-helper-exit.c
+ * @file exit/gnunet-helper-exit.c
*
* @brief the helper for exit nodes. Opens a virtual
* network-interface, sends data received on the if to stdout, sends
@@ -109,7 +109,7 @@ open_dev_null (int target_fd,
if (fd == target_fd)
return;
if (-1 == dup2 (fd, target_fd))
- {
+ {
(void) close (fd);
abort ();
}
@@ -119,13 +119,13 @@ open_dev_null (int target_fd,
/**
* Run the given command and wait for it to complete.
- *
+ *
* @param file name of the binary to run
* @param cmd command line arguments (as given to 'execv')
* @return 0 on success, 1 on any error
*/
static int
-fork_and_exec (const char *file,
+fork_and_exec (const char *file,
char *const cmd[])
{
int status;
@@ -135,8 +135,8 @@ fork_and_exec (const char *file,
pid = fork ();
if (-1 == pid)
{
- fprintf (stderr,
- "fork failed: %s\n",
+ fprintf (stderr,
+ "fork failed: %s\n",
strerror (errno));
return 1;
}
@@ -145,25 +145,25 @@ fork_and_exec (const char *file,
/* we are the child process */
/* close stdin/stdout to not cause interference
with the helper's main protocol! */
- (void) close (0);
+ (void) close (0);
open_dev_null (0, O_RDONLY);
- (void) close (1);
+ (void) close (1);
open_dev_null (1, O_WRONLY);
(void) execv (file, cmd);
/* can only get here on error */
- fprintf (stderr,
- "exec `%s' failed: %s\n",
+ fprintf (stderr,
+ "exec `%s' failed: %s\n",
file,
strerror (errno));
_exit (1);
}
/* keep running waitpid as long as the only error we get is 'EINTR' */
while ( (-1 == (ret = waitpid (pid, &status, 0))) &&
- (errno == EINTR) );
+ (errno == EINTR) );
if (-1 == ret)
{
- fprintf (stderr,
- "waitpid failed: %s\n",
+ fprintf (stderr,
+ "waitpid failed: %s\n",
strerror (errno));
return 1;
}
@@ -215,7 +215,7 @@ init_tun (char *dev)
if (-1 == ioctl (fd, TUNSETIFF, (void *) &ifr))
{
- fprintf (stderr,
+ fprintf (stderr,
"Error with ioctl on `%s': %s\n", "/dev/net/tun",
strerror (errno));
(void) close (fd);
@@ -255,7 +255,7 @@ set_address6 (const char *dev, const char *address, unsigned long prefix_len)
if (-1 == (fd = socket (PF_INET6, SOCK_DGRAM, 0)))
{
- fprintf (stderr, "Error creating socket: %s\n", strerror (errno));
+ fprintf (stderr, "Error creating socket: %s\n", strerror (errno));
exit (1);
}
@@ -669,7 +669,7 @@ main (int argc, char **argv)
sbin_iptables = "/usr/sbin/iptables";
else
{
- fprintf (stderr,
+ fprintf (stderr,
"Fatal: executable iptables not found in approved directories: %s\n",
strerror (errno));
return 1;
@@ -691,7 +691,7 @@ main (int argc, char **argv)
if (-1 == (fd_tun = init_tun (dev)))
{
- fprintf (stderr,
+ fprintf (stderr,
"Fatal: could not initialize tun-interface `%s' with IPv6 %s/%s and IPv4 %s/%s\n",
dev,
argv[3],
@@ -706,13 +706,13 @@ main (int argc, char **argv)
{
const char *address = argv[3];
long prefix_len = atol (argv[4]);
-
+
if ((prefix_len < 1) || (prefix_len > 127))
{
fprintf (stderr, "Fatal: prefix_len out of range\n");
return 1;
- }
- set_address6 (dev, address, prefix_len);
+ }
+ set_address6 (dev, address, prefix_len);
}
{
char *const sysctl_args[] =
@@ -724,7 +724,7 @@ main (int argc, char **argv)
{
fprintf (stderr,
"Failed to enable IPv6 forwarding. Will continue anyway.\n");
- }
+ }
}
}
@@ -733,7 +733,7 @@ main (int argc, char **argv)
{
const char *address = argv[5];
const char *mask = argv[6];
-
+
set_address4 (dev, address, mask);
}
{
@@ -746,7 +746,7 @@ main (int argc, char **argv)
{
fprintf (stderr,
"Failed to enable IPv4 forwarding. Will continue anyway.\n");
- }
+ }
}
if (0 != strcmp (argv[2], "-"))
{
@@ -759,10 +759,10 @@ main (int argc, char **argv)
{
fprintf (stderr,
"Failed to enable IPv4 masquerading (NAT). Will continue anyway.\n");
- }
+ }
}
}
-
+
uid_t uid = getuid ();
#ifdef HAVE_SETRESUID
if (0 != setresuid (uid, uid, uid))
diff --git a/src/experimentation/gnunet-daemon-experimentation.h b/src/experimentation/gnunet-daemon-experimentation.h
index 9886f5d5d..86e41a114 100644
--- a/src/experimentation/gnunet-daemon-experimentation.h
+++ b/src/experimentation/gnunet-daemon-experimentation.h
@@ -89,54 +89,54 @@ struct Experiment
/* Header */
/* ----------------- */
char *name;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_Absolute version;
-
+
/**
- * Description
+ * Description
*/
char *description;
-
+
/**
- * Required capabilities
+ * Required capabilities
*/
uint32_t required_capabilities;
-
+
/* Experiment timing */
/* ----------------- */
-
+
/**
- * When to start experiment
+ * When to start experiment
*/
struct GNUNET_TIME_Absolute start;
-
+
/**
- * When to end experiment
+ * When to end experiment
*/
struct GNUNET_TIME_Absolute stop;
-
+
/**
- * How often to run experiment
+ * How often to run experiment
*/
struct GNUNET_TIME_Relative frequency;
-
+
/**
- * How long to run each execution
+ * How long to run each execution
*/
struct GNUNET_TIME_Relative duration;
-
-
+
+
/* Experiment itself */
/* ----------------- */
-
+
/* TBD */
};
@@ -150,34 +150,34 @@ struct Node
* Peer id
*/
struct GNUNET_PeerIdentity id;
-
+
/**
* Task for response timeout
*/
GNUNET_SCHEDULER_TaskIdentifier timeout_task;
-
+
/**
* Core transmission handle
*/
struct GNUNET_CORE_TransmitHandle *cth;
-
+
/**
* Node capabilities
*/
uint32_t capabilities;
-
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_Absolute version;
-
+
struct NodeComCtx *e_req_head;
struct NodeComCtx *e_req_tail;
/**
* Array of issuers accepted by this neighbor.
- */
+ */
struct GNUNET_CRYPTO_EccPublicSignKey *issuer_id;
unsigned int issuer_count;
@@ -198,9 +198,9 @@ GNUNET_NETWORK_STRUCT_BEGIN
struct Experimentation_Request
{
struct GNUNET_MessageHeader msg;
-
+
uint32_t capabilities GNUNET_PACKED;
-
+
uint32_t issuer_count GNUNET_PACKED;
};
@@ -215,9 +215,9 @@ struct Experimentation_Request
struct Experimentation_Response
{
struct GNUNET_MessageHeader msg;
-
+
uint32_t capabilities GNUNET_PACKED;
-
+
uint32_t issuer_count GNUNET_PACKED;
};
@@ -233,7 +233,7 @@ struct Issuer
/**
* Hashmap containing valid experiment issuers
- * (the key is the hash of the respective public key,
+ * (the key is the hash of the respective public key,
* the values are of type `struct Issuer').
*/
struct GNUNET_CONTAINER_MultiHashMap *valid_issuers;
@@ -246,19 +246,19 @@ struct GNUNET_CONTAINER_MultiHashMap *valid_issuers;
struct GED_start_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
@@ -267,19 +267,19 @@ struct GED_start_message
struct GED_start_ack_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
struct GNUNET_CRYPTO_EccPublicSignKey issuer;
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
@@ -288,19 +288,19 @@ struct GED_start_ack_message
struct GED_stop_message
{
struct GNUNET_MessageHeader header;
-
+
/**
* String length of experiment name following the struct
*/
uint32_t len_name GNUNET_PACKED;
-
+
/**
- * Experiment issuer
+ * Experiment issuer
*/
struct GNUNET_CRYPTO_EccPublicSignKey issuer;
-
+
/**
- * Experiment version as timestamp of creation
+ * Experiment version as timestamp of creation
*/
struct GNUNET_TIME_AbsoluteNBO version_nbo;
};
@@ -396,7 +396,7 @@ GED_experiments_find (const struct GNUNET_CRYPTO_EccPublicSignKey *issuer,
const struct GNUNET_TIME_Absolute version);
-typedef void (*GNUNET_EXPERIMENTATION_experiments_get_cb) (struct Node *n,
+typedef void (*GNUNET_EXPERIMENTATION_experiments_get_cb) (struct Node *n,
struct Experiment *e);
@@ -461,7 +461,7 @@ GED_scheduler_handle_stop (struct Node *n, struct Experiment *e);
*/
void
GED_scheduler_add (struct Node *n,
- struct Experiment *e,
+ struct Experiment *e,
int outbound);
diff --git a/src/experimentation/gnunet-daemon-experimentation_experiments.c b/src/experimentation/gnunet-daemon-experimentation_experiments.c
index b4db5188b..928502cf5 100644
--- a/src/experimentation/gnunet-daemon-experimentation_experiments.c
+++ b/src/experimentation/gnunet-daemon-experimentation_experiments.c
@@ -54,14 +54,14 @@ experiment_verify (struct Issuer *i, struct Experiment *e)
{
GNUNET_assert (NULL != i);
GNUNET_assert (NULL != e);
-
+
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Verification: to be implemented\n");
return GNUNET_OK;
}
-static int
+static int
free_experiment (void *cls,
const struct GNUNET_HashCode * key,
void *value)
@@ -84,15 +84,15 @@ free_experiment (void *cls,
* @param value the issuer element to free
* @return GNUNET_OK to continue
*/
-static int
+static int
free_issuer (void *cls,
const struct GNUNET_HashCode * key,
void *value)
{
struct Issuer *i = value;
- GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (valid_issuers,
- key,
+ GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (valid_issuers,
+ key,
i));
GNUNET_free (i);
return GNUNET_OK;
@@ -149,8 +149,8 @@ GED_experiments_find (const struct GNUNET_CRYPTO_EccPublicSignKey *issuer,
const struct GNUNET_TIME_Absolute version)
{
struct GNUNET_HashCode hc;
-
- get_experiment_key (issuer,
+
+ get_experiment_key (issuer,
name,
version,
&hc);
@@ -180,7 +180,7 @@ get_it (void *cls,
if (0 == memcmp (&e->issuer,
get_ctx->issuer,
sizeof (struct GNUNET_CRYPTO_EccPublicSignKey)))
- get_ctx->get_cb (get_ctx->n, e);
+ get_ctx->get_cb (get_ctx->n, e);
return GNUNET_OK;
}
@@ -222,7 +222,7 @@ GNUNET_EXPERIMENTATION_experiments_add (struct Issuer *i,
struct Experiment *e;
struct GNUNET_HashCode hc;
- e = GNUNET_new (struct Experiment);
+ e = GNUNET_new (struct Experiment);
e->name = GNUNET_strdup (name);
e->issuer = *issuer_id;
e->version = version;
@@ -233,20 +233,20 @@ GNUNET_EXPERIMENTATION_experiments_add (struct Issuer *i,
e->frequency = frequency;
e->duration = duration;
e->stop = stop;
-
+
/* verify experiment */
if (GNUNET_SYSERR == experiment_verify (i, e))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Experiment `%s': Experiment signature is invalid\n"),
+ _("Experiment `%s': Experiment signature is invalid\n"),
name);
GNUNET_free (e);
GNUNET_free_non_null (e->name);
GNUNET_free_non_null (e->description);
return GNUNET_SYSERR;
}
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Adding experiment `%s' running from `%s' to `%s' every %llu sec. for %llu sec. \n"),
e->name,
GNUNET_STRINGS_absolute_time_to_string (start),
@@ -259,12 +259,12 @@ GNUNET_EXPERIMENTATION_experiments_add (struct Issuer *i,
&hc);
GNUNET_CONTAINER_multihashmap_put (experiments,
&hc,
- e,
+ e,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
- GNUNET_STATISTICS_set (GED_stats,
- "# experiments",
+ GNUNET_STATISTICS_set (GED_stats,
+ "# experiments",
GNUNET_CONTAINER_multihashmap_size (experiments), GNUNET_NO);
-
+
return GNUNET_OK;
}
@@ -293,9 +293,9 @@ exp_file_iterator (void *cls,
struct GNUNET_TIME_Relative frequency;
struct GNUNET_TIME_Relative duration;
struct GNUNET_HashCode phash;
-
+
/* Mandatory fields */
-
+
/* Issuer */
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (exp, name, "ISSUER", &val))
{
@@ -303,8 +303,8 @@ exp_file_iterator (void *cls,
_("Experiment `%s': Issuer missing\n"), name);
return;
}
- if (GNUNET_SYSERR ==
- GNUNET_CRYPTO_ecc_public_sign_key_from_string (val,
+ if (GNUNET_SYSERR ==
+ GNUNET_CRYPTO_ecc_public_sign_key_from_string (val,
strlen (val),
&issuer))
{
@@ -322,20 +322,20 @@ exp_file_iterator (void *cls,
return;
}
GNUNET_free (val);
-
+
/* Version */
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "VERSION", &number))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Experiment `%s': Version missing or invalid \n"), name);
return;
}
version.abs_value_us = number; // FIXME: what is this supposed to be? Version != TIME!???
-
+
/* Required capabilities */
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "CAPABILITIES", &number))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Experiment `%s': Required capabilities missing \n"), name);
return;
}
@@ -346,23 +346,23 @@ exp_file_iterator (void *cls,
return;
}
required_capabilities = number;
-
+
/* Optional fields */
-
+
/* Description */
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (exp, name, "DESCRIPTION", &description))
description = NULL;
-
+
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "START", (long long unsigned int *) &start.abs_value_us))
start = GNUNET_TIME_UNIT_ZERO_ABS;
-
+
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time (exp, name, "FREQUENCY", &frequency))
frequency = EXP_DEFAULT_EXP_FREQ;
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time (exp, name, "DURATION", &duration))
duration = EXP_DEFAULT_EXP_DUR;
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (exp, name, "STOP", (long long unsigned int *)&stop.abs_value_us))
stop = GNUNET_TIME_UNIT_FOREVER_ABS;
-
+
GNUNET_EXPERIMENTATION_experiments_add (i, name, &issuer, version,
description, required_capabilities,
start, frequency, duration, stop);
@@ -382,12 +382,12 @@ load_file (const char * file)
if (NULL == exp)
return;
-
+
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_parse (exp, file))
{
GNUNET_CONFIGURATION_destroy (exp);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to parse file `%s'\n"),
+ _("Failed to parse file `%s'\n"),
file);
return;
}
@@ -408,28 +408,28 @@ GED_experiments_start ()
char *pos;
struct GNUNET_CRYPTO_EccPublicSignKey issuer_ID;
struct GNUNET_HashCode hash;
-
+
/* Load valid issuer */
- if (GNUNET_SYSERR ==
- GNUNET_CONFIGURATION_get_value_string (GED_cfg,
- "EXPERIMENTATION",
+ if (GNUNET_SYSERR ==
+ GNUNET_CONFIGURATION_get_value_string (GED_cfg,
+ "EXPERIMENTATION",
"ISSUERS",
&issuers))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("No valid experiment issuers configured! Set value to public keys of issuers! Exiting.\n"));
GED_experiments_stop ();
return GNUNET_SYSERR;
}
-
+
valid_issuers = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
for (pos = strtok (issuers, " "); pos != NULL; pos = strtok (NULL, " "))
- {
+ {
if (GNUNET_SYSERR == GNUNET_CRYPTO_ecc_public_sign_key_from_string (pos,
strlen (pos),
&issuer_ID))
{
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
"EXPERIMENTATION",
"ISSUERS",
_("Invalid value for public key\n"));
@@ -439,33 +439,33 @@ GED_experiments_start ()
i = GNUNET_new (struct Issuer);
i->pubkey = issuer_ID;
GNUNET_CRYPTO_hash( &issuer_ID, sizeof (issuer_ID), &hash);
- GNUNET_CONTAINER_multihashmap_put (valid_issuers,
+ GNUNET_CONTAINER_multihashmap_put (valid_issuers,
&hash,
i,
- GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
}
GNUNET_free (issuers);
if (0 == GNUNET_CONTAINER_multihashmap_size (valid_issuers))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("No valid experiment issuers configured! Set value to public keys of issuers! Exiting.\n"));
GED_experiments_stop ();
return GNUNET_SYSERR;
}
GNUNET_STATISTICS_set (GED_stats,
- "# issuer",
- GNUNET_CONTAINER_multihashmap_size (valid_issuers),
+ "# issuer",
+ GNUNET_CONTAINER_multihashmap_size (valid_issuers),
GNUNET_NO);
-
+
experiments = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO);
/* Load experiments from file */
if (GNUNET_SYSERR ==
GNUNET_CONFIGURATION_get_value_string (GED_cfg,
- "EXPERIMENTATION",
+ "EXPERIMENTATION",
"EXPERIMENTS",
&file))
return GNUNET_OK;
-
+
if (GNUNET_YES != GNUNET_DISK_file_test (file))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c
index 5e29f5f73..f78569146 100644
--- a/src/experimentation/gnunet-daemon-experimentation_nodes.c
+++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c
@@ -64,10 +64,10 @@ struct NodeComCtx
{
struct NodeComCtx *prev;
struct NodeComCtx *next;
-
+
struct Node *n;
struct Experiment *e;
-
+
size_t size;
GNUNET_CONNECTION_TransmitReadyNotify notify;
void *notify_cls;
@@ -79,7 +79,7 @@ struct NodeComCtx
*
* @param m peermap to update values from
*/
-static void
+static void
update_stats (struct GNUNET_CONTAINER_MultiPeerMap *m)
{
GNUNET_assert (NULL != m);
@@ -122,14 +122,14 @@ cleanup_node (void *cls,
struct NodeComCtx *e_cur;
struct NodeComCtx *e_next;
struct GNUNET_CONTAINER_MultiPeerMap *cur = cls;
-
+
n = value;
if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task)
{
GNUNET_SCHEDULER_cancel (n->timeout_task);
n->timeout_task = GNUNET_SCHEDULER_NO_TASK;
}
-
+
if (NULL != n->cth)
{
GNUNET_CORE_notify_transmit_ready_cancel (n->cth);
@@ -154,7 +154,7 @@ cleanup_node (void *cls,
* @param id the id to check
* @return GNUNET_YES or GNUNET_NO
*/
-static int
+static int
is_me (const struct GNUNET_PeerIdentity *id)
{
if (0 == memcmp (&me, id, sizeof (me)))
@@ -187,14 +187,14 @@ transmit_read_wrapper (void *cls, size_t bufsize, void *buf)
{
struct NodeComCtx *e_ctx = cls;
struct NodeComCtx *next;
-
+
size_t res = e_ctx->notify (e_ctx->notify_cls, bufsize, buf);
e_ctx->n->cth = NULL;
-
+
GNUNET_CONTAINER_DLL_remove (e_ctx->n->e_req_head, e_ctx->n->e_req_tail, e_ctx);
next = e_ctx->n->e_req_head;
GNUNET_free (e_ctx);
-
+
if (NULL != next)
{
/* Schedule next message */
@@ -209,9 +209,9 @@ schedule_transmisson (struct NodeComCtx *e_ctx)
{
if (NULL != e_ctx->n->cth)
return;
-
+
e_ctx->n->cth = GNUNET_CORE_notify_transmit_ready (ch, GNUNET_NO, 0, FAST_TIMEOUT,
- &e_ctx->n->id, e_ctx->size,
+ &e_ctx->n->id, e_ctx->size,
transmit_read_wrapper, e_ctx);
if (NULL == e_ctx->n->cth)
{
@@ -219,7 +219,7 @@ schedule_transmisson (struct NodeComCtx *e_ctx)
_("Cannot send message to peer `%s' for experiment `%s'\n"),
GNUNET_i2s(&e_ctx->n->id), e_ctx->e->name);
GNUNET_free (e_ctx);
- }
+ }
}
@@ -233,10 +233,10 @@ static void
remove_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct Node *n = cls;
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Removing request for peer %s due to timeout\n",
- GNUNET_i2s (&n->id));
+ GNUNET_i2s (&n->id));
if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_requested, &n->id))
{
GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (nodes_requested, &n->id, n));
@@ -271,7 +271,7 @@ append_public_key (void *cls,
* @param buf the buffer to copy to
* @return bytes passed
*/
-static size_t
+static size_t
send_experimentation_request_cb (void *cls, size_t bufsize, void *buf)
{
struct Node *n = cls;
@@ -315,22 +315,22 @@ send_experimentation_request_cb (void *cls, size_t bufsize, void *buf)
*
* @param peer the peer to send to
*/
-static void
+static void
send_experimentation_request (const struct GNUNET_PeerIdentity *peer)
{
struct Node *n;
struct NodeComCtx *e_ctx;
size_t size;
size_t c_issuers;
-
- c_issuers = GNUNET_CONTAINER_multihashmap_size (valid_issuers);
+
+ c_issuers = GNUNET_CONTAINER_multihashmap_size (valid_issuers);
size = sizeof (struct Experimentation_Request) +
c_issuers * sizeof (struct GNUNET_CRYPTO_EccPublicSignKey);
n = GNUNET_new (struct Node);
n->id = *peer;
n->timeout_task = GNUNET_SCHEDULER_add_delayed (EXP_RESPONSE_TIMEOUT, &remove_request, n);
n->capabilities = NONE;
-
+
e_ctx = GNUNET_new (struct NodeComCtx);
e_ctx->n = n;
e_ctx->e = NULL;
@@ -339,10 +339,10 @@ send_experimentation_request (const struct GNUNET_PeerIdentity *peer)
e_ctx->notify_cls = n;
GNUNET_CONTAINER_DLL_insert_tail(n->e_req_head, n->e_req_tail, e_ctx);
schedule_transmisson (e_ctx);
-
- GNUNET_assert (GNUNET_OK ==
+
+ GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_put (nodes_requested,
- peer, n,
+ peer, n,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST));
update_stats (nodes_requested);
}
@@ -361,17 +361,17 @@ send_response_cb (void *cls, size_t bufsize, void *buf)
{
struct Node *n = cls;
struct Experimentation_Response msg;
- size_t c_issuers = GNUNET_CONTAINER_multihashmap_size (valid_issuers);
+ size_t c_issuers = GNUNET_CONTAINER_multihashmap_size (valid_issuers);
size_t ri_size = c_issuers * sizeof (struct GNUNET_CRYPTO_EccPublicSignKey);
size_t msg_size = sizeof (msg);
size_t total_size = msg_size + ri_size;
struct GNUNET_CRYPTO_EccPublicSignKey *issuers;
-
+
n->cth = NULL;
if (buf == NULL)
{
/* client disconnected */
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Client disconnected\n");
return 0;
}
@@ -399,7 +399,7 @@ get_experiments_cb (struct Node *n, struct Experiment *e)
static int counter = 0;
if (NULL == e)
return; /* Done */
-
+
/* Tell the scheduler to add a node with an experiment */
GED_scheduler_add (n, e, GNUNET_YES);
counter ++;
@@ -417,19 +417,19 @@ get_node (const struct GNUNET_PeerIdentity *id)
tmp = GNUNET_CONTAINER_multipeermap_get (nodes_active, id);
if (res == NULL)
res = tmp;
-
+
tmp = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, id);
if (res == NULL)
res = tmp;
else
GNUNET_break (0); /* Multiple instances */
-
+
tmp = GNUNET_CONTAINER_multipeermap_get (nodes_requested, id);
if (res == NULL)
res = tmp;
else
GNUNET_break (0); /* Multiple instances */
-
+
return res;
}
@@ -439,7 +439,7 @@ get_node (const struct GNUNET_PeerIdentity *id)
*
* @param n the node
*/
-static void
+static void
node_make_active (struct Node *n)
{
int c1;
@@ -452,7 +452,7 @@ node_make_active (struct Node *n)
GNUNET_i2s (&n->id));
/* Request experiments for this node to start them */
for (c1 = 0; c1 < n->issuer_count; c1++)
- {
+ {
GED_experiments_get (n, &n->issuer_id[c1], &get_experiments_cb);
}
}
@@ -478,20 +478,20 @@ handle_request (const struct GNUNET_PeerIdentity *peer,
uint32_t ic;
uint32_t ic_accepted;
int make_active;
-
+
if (ntohs (message->size) < sizeof (struct Experimentation_Request))
{
GNUNET_break (0);
return;
}
ic = ntohl (rm->issuer_count);
- if (ntohs (message->size) !=
+ if (ntohs (message->size) !=
sizeof (struct Experimentation_Request) + ic * sizeof (struct GNUNET_CRYPTO_EccPublicSignKey))
{
GNUNET_break (0);
return;
}
-
+
make_active = GNUNET_NO;
if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_active, peer)))
{
@@ -522,10 +522,10 @@ handle_request (const struct GNUNET_PeerIdentity *peer,
n->capabilities = NONE;
make_active = GNUNET_YES;
}
-
+
/* Update node */
n->capabilities = ntohl (rm->capabilities);
-
+
/* Filter accepted issuer */
ic_accepted = 0;
for (c1 = 0; c1 < ic; c1++)
@@ -533,7 +533,7 @@ handle_request (const struct GNUNET_PeerIdentity *peer,
if (GNUNET_YES == GED_experiments_issuer_accepted(&rmi[c1]))
ic_accepted ++;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Request from peer `%s' with %u issuers, we accepted %u issuer \n",
GNUNET_i2s (peer), ic, ic_accepted);
GNUNET_free_non_null (n->issuer_id);
@@ -548,19 +548,19 @@ handle_request (const struct GNUNET_PeerIdentity *peer,
}
}
n->issuer_count = ic_accepted;
-
+
if (GNUNET_YES == make_active)
node_make_active (n);
-
+
/* Send response */
e_ctx = GNUNET_new (struct NodeComCtx);
e_ctx->n = n;
e_ctx->e = NULL;
- e_ctx->size = sizeof (struct Experimentation_Response) +
+ e_ctx->size = sizeof (struct Experimentation_Response) +
my_issuer_count * sizeof (struct GNUNET_CRYPTO_EccPublicSignKey);
e_ctx->notify = &send_response_cb;
e_ctx->notify_cls = n;
-
+
GNUNET_CONTAINER_DLL_insert_tail(n->e_req_head, n->e_req_tail, e_ctx);
schedule_transmisson (e_ctx);
}
@@ -583,7 +583,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
int make_active;
unsigned int c1;
unsigned int c2;
-
+
if (ntohs (message->size) < sizeof (struct Experimentation_Response))
{
GNUNET_break (0);
@@ -595,7 +595,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
make_active = GNUNET_NO;
if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_active, peer)))
{
@@ -618,7 +618,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
}
else if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, peer)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %s from peer `%s'\n",
"RESPONSE", "inactive", GNUNET_i2s (peer));
GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (nodes_inactive, peer, n));
@@ -631,10 +631,10 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
"RESPONSE", "unknown", GNUNET_i2s (peer));
return;
}
-
+
/* Update */
n->capabilities = ntohl (rm->capabilities);
-
+
/* Filter accepted issuer */
ic_accepted = 0;
for (c1 = 0; c1 < ic; c1++)
@@ -657,7 +657,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
}
}
n->issuer_count = ic_accepted;
-
+
if (GNUNET_YES == make_active)
node_make_active (n);
}
@@ -669,7 +669,7 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer,
* @param peer the source
* @param message the message
*/
-static void
+static void
handle_start (const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_MessageHeader *message)
{
@@ -679,7 +679,7 @@ handle_start (const struct GNUNET_PeerIdentity *peer,
const char *name;
struct Node *n;
struct Experiment *e;
-
+
if (NULL == peer)
{
GNUNET_break (0);
@@ -690,7 +690,7 @@ handle_start (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
size = ntohs (message->size);
if (size < sizeof (struct GED_start_message))
{
@@ -704,7 +704,7 @@ handle_start (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
n = get_node (peer);
if (NULL == n)
{
@@ -716,18 +716,18 @@ handle_start (const struct GNUNET_PeerIdentity *peer,
{
GNUNET_break (0);
return;
- }
+ }
if (name_len != strlen (name) + 1)
{
GNUNET_break (0);
return;
- }
+ }
e = GED_experiments_find (&msg->issuer, name, GNUNET_TIME_absolute_ntoh(msg->version_nbo));
if (NULL == e)
{
GNUNET_break (0);
return;
- }
+ }
GED_scheduler_handle_start (n, e);
}
@@ -748,7 +748,7 @@ handle_start_ack (const struct GNUNET_PeerIdentity *peer,
const char *name;
struct Node *n;
struct Experiment *e;
-
+
if (NULL == peer)
{
GNUNET_break (0);
@@ -759,7 +759,7 @@ handle_start_ack (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
size = ntohs (message->size);
if (size < sizeof (struct GED_start_ack_message))
{
@@ -773,7 +773,7 @@ handle_start_ack (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
n = get_node (peer);
if (NULL == n)
{
@@ -791,7 +791,7 @@ handle_start_ack (const struct GNUNET_PeerIdentity *peer,
GNUNET_break (0);
return;
}
-
+
e = GED_experiments_find (&msg->issuer, name, GNUNET_TIME_absolute_ntoh(msg->version_nbo));
if (NULL == e)
{
@@ -885,19 +885,19 @@ core_connect_handler (void *cls,
{
if (GNUNET_YES == is_me(peer))
return;
-
+
GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connected to peer %s\n"),
GNUNET_i2s (peer));
-
+
if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_requested, peer))
return; /* We already sent a request */
-
+
if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_active, peer))
return; /* This peer is known as active */
-
+
if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_inactive, peer))
return; /* This peer is known as inactive */
-
+
send_experimentation_request (peer);
}
diff --git a/src/experimentation/gnunet-daemon-experimentation_scheduler.c b/src/experimentation/gnunet-daemon-experimentation_scheduler.c
index a203fe4a5..a52d60c37 100644
--- a/src/experimentation/gnunet-daemon-experimentation_scheduler.c
+++ b/src/experimentation/gnunet-daemon-experimentation_scheduler.c
@@ -232,8 +232,8 @@ GED_scheduler_handle_start (struct Node *n, struct Experiment *e)
GNUNET_break_op (0);
return;
}
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received %s message from peer %s for experiment `%s'\n",
"START", GNUNET_i2s (&n->id), e->name);
GED_scheduler_add (n, e, GNUNET_NO);
diff --git a/src/experimentation/test_experimentation_clique_connect.c b/src/experimentation/test_experimentation_clique_connect.c
index a84eabd7e..e7604b0da 100644
--- a/src/experimentation/test_experimentation_clique_connect.c
+++ b/src/experimentation/test_experimentation_clique_connect.c
@@ -354,7 +354,7 @@ stat_disconnect_adapter (void *cls, void *op_result)
* failed
*/
static void
-test_master (void *cls,
+test_master (void *cls,
struct GNUNET_TESTBED_RunHandle *h,
unsigned int num_peers,
struct GNUNET_TESTBED_Peer **peers_,
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c
index f42207046..5f9eace13 100644
--- a/src/fragmentation/defragmentation.c
+++ b/src/fragmentation/defragmentation.c
@@ -459,7 +459,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
for (mc = dc->head; NULL != mc; mc = mc->next)
if (mc->fragment_id > fid)
last++;
-
+
mc = dc->head;
while ((NULL != mc) && (fid != mc->fragment_id))
mc = mc->next;
@@ -538,13 +538,13 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
}
/* send ACK */
if (mc->frag_times_write_offset - mc->frag_times_start_offset > 1)
- {
+ {
dc->latency = estimate_latency (mc);
}
delay = GNUNET_TIME_relative_multiply (dc->latency, bc + 1);
if ( (last + fid == num_fragments) ||
- (0 == mc->bits) ||
- (GNUNET_YES == duplicate))
+ (0 == mc->bits) ||
+ (GNUNET_YES == duplicate))
{
/* message complete or duplicate or last missing fragment in
linear sequence; ACK now! */
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c
index 39a5af814..bf7491815 100644
--- a/src/fragmentation/fragmentation.c
+++ b/src/fragmentation/fragmentation.c
@@ -231,7 +231,7 @@ transmit_next (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
fc->num_rounds++;
delay = GNUNET_TIME_relative_multiply (fc->ack_delay, 2);
/* never use zero, need some time for ACK always */
- delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay);
+ delay = GNUNET_TIME_relative_max (MIN_ACK_DELAY, delay);
fc->wack = GNUNET_YES;
fc->last_round = GNUNET_TIME_absolute_get ();
GNUNET_STATISTICS_update (fc->stats, _("# fragments wrap arounds"), 1,
@@ -277,7 +277,7 @@ GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
struct GNUNET_FRAGMENT_Context *fc;
size_t size;
uint64_t bits;
-
+
GNUNET_STATISTICS_update (stats, _("# messages fragmented"), 1, GNUNET_NO);
GNUNET_assert (mtu >= 1024 + sizeof (struct FragmentHeader));
size = ntohs (msg->size);
@@ -368,7 +368,7 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
fc->wack = GNUNET_NO;
ndelay = GNUNET_TIME_absolute_get_duration (fc->last_round);
fc->ack_delay.rel_value_us =
- (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4;
+ (ndelay.rel_value_us / fc->num_transmissions + 3 * fc->ack_delay.rel_value_us) / 4;
fc->num_transmissions = 0;
/* calculate ratio msg sent vs. msg acked */
ack_cnt = 0;
@@ -385,8 +385,8 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
if (0 == ack_cnt)
{
/* complete loss */
- fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay,
- snd_cnt);
+ fc->msg_delay = GNUNET_TIME_relative_multiply (fc->msg_delay,
+ snd_cnt);
}
else if (snd_cnt > ack_cnt)
{
diff --git a/src/fragmentation/test_fragmentation.c b/src/fragmentation/test_fragmentation.c
index 2a30d7d93..c41272d42 100644
--- a/src/fragmentation/test_fragmentation.c
+++ b/src/fragmentation/test_fragmentation.c
@@ -213,8 +213,8 @@ run (void *cls, char *const *args, const char *cfgfile,
htons (sizeof (struct GNUNET_MessageHeader) + (17 * i) % (32 * 1024));
frags[i] = GNUNET_FRAGMENT_context_create (NULL /* no stats */ ,
MTU, &trackers[i],
- GNUNET_TIME_UNIT_MILLISECONDS,
- GNUNET_TIME_UNIT_SECONDS,
+ GNUNET_TIME_UNIT_MILLISECONDS,
+ GNUNET_TIME_UNIT_SECONDS,
msg,
&proc_frac, &frags[i]);
}
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index c2e2ada3e..04057bc98 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -211,8 +211,8 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
/* stop probes if possible */
num_probes_change = - num_probes_active;
num_downloads_change = h->max_parallel_requests - h->active_downloads;
- }
- else
+ }
+ else
{
/* start all downloads */
num_downloads_change = num_downloads_waiting;
@@ -220,7 +220,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
num_probes_change = GNUNET_MIN (num_probes_waiting,
h->max_parallel_requests - (h->active_downloads + num_downloads_waiting));
}
-
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Changing %d probes and %d downloads\n",
num_probes_change,
@@ -232,7 +232,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
next = qe->next;
if (GNUNET_FS_QUEUE_PRIORITY_PROBE != qe->priority)
continue;
- if (num_probes_change < 0)
+ if (num_probes_change < 0)
{
stop_job (qe);
num_probes_change++;
@@ -266,7 +266,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
( (qe->blocks + h->active_blocks <= h->max_parallel_requests) ||
( (qe->blocks > h->max_parallel_requests) &&
(0 == h->active_downloads) ) ) )
- {
+ {
start_job (qe);
num_downloads_change--;
}
@@ -284,7 +284,7 @@ process_job_queue (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"AD: %u, MP: %u; %d probes and %d downloads to start, will run again in %s\n",
h->active_downloads,
- h->max_parallel_requests,
+ h->max_parallel_requests,
num_probes_change,
num_downloads_change,
GNUNET_STRINGS_relative_time_to_string (restart_at, GNUNET_YES));
@@ -467,7 +467,7 @@ GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, size_t max, void *buf,
return 0;
}
}
- if ( (GNUNET_SYSERR ==
+ if ( (GNUNET_SYSERR ==
GNUNET_DISK_file_seek (fi->fd, offset, GNUNET_DISK_SEEK_SET)) ||
(-1 == (ret = GNUNET_DISK_file_read (fi->fd, buf, max))) )
{
@@ -1398,7 +1398,7 @@ cleanup:
* @return NULL if srch was not found in this subtree
*/
static struct GNUNET_FS_FileInformation *
-find_file_position (struct GNUNET_FS_FileInformation *pos,
+find_file_position (struct GNUNET_FS_FileInformation *pos,
const char *srch)
{
struct GNUNET_FS_FileInformation *r;
@@ -1409,7 +1409,7 @@ find_file_position (struct GNUNET_FS_FileInformation *pos,
return pos;
if ( (GNUNET_YES == pos->is_directory) &&
(NULL != (r = find_file_position (pos->data.dir.entries, srch))) )
- return r;
+ return r;
pos = pos->next;
}
return NULL;
@@ -1556,7 +1556,7 @@ deserialize_publish_file (void *cls, const char *filename)
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task);
pc->upload_task =
GNUNET_SCHEDULER_add_with_priority
- (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
+ (GNUNET_SCHEDULER_PRIORITY_BACKGROUND,
&GNUNET_FS_publish_main_, pc);
}
if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
@@ -2031,8 +2031,8 @@ cleanup:
if (NULL != wh)
(void) GNUNET_BIO_write_close (wh);
remove_sync_file_in_dir (sr->h,
- (NULL == sr->sc->psearch_result)
- ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
+ (NULL == sr->sc->psearch_result)
+ ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
: GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
sr->sc->serialization, sr->serialization);
GNUNET_free (sr->serialization);
@@ -2057,8 +2057,8 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc)
const char *category;
category =
- (NULL == sc->psearch_result)
- ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
+ (NULL == sc->psearch_result)
+ ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
: GNUNET_FS_SYNC_PATH_CHILD_SEARCH;
if (NULL == sc->serialization)
sc->serialization = make_serialization_file_name (sc->h, category);
@@ -2163,7 +2163,7 @@ deserialize_unindex_file (void *cls, const char *filename)
{
GNUNET_break (0);
goto cleanup;
- }
+ }
uc->state = (enum UnindexState) state;
switch (state)
{
@@ -2316,8 +2316,8 @@ deserialize_search_result (void *cls, const char *filename)
if (NULL != ser)
{
remove_sync_file_in_dir (sc->h,
- (NULL == sc->psearch_result)
- ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
+ (NULL == sc->psearch_result)
+ ? GNUNET_FS_SYNC_PATH_MASTER_SEARCH
: GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
sc->serialization, ser);
GNUNET_free (ser);
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index d8ea21c54..5858c916c 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -414,7 +414,7 @@ typedef void (*GNUNET_FS_QueueStop) (void *cls);
/**
* Priorities for the queue.
- */
+ */
enum GNUNET_FS_QueuePriority
{
/**
@@ -1259,7 +1259,7 @@ struct GNUNET_FS_PublishContext
* Set to GNUNET_YES if all processing has completed.
*/
int all_done;
-
+
/**
* Flag set to GNUNET_YES if the next callback from
* GNUNET_FS_file_information_inspect should be skipped because it
@@ -1284,7 +1284,7 @@ enum UnindexState
* the respective DBlocks and IBlocks.
*/
UNINDEX_STATE_DS_REMOVE = 1,
-
+
/**
* Find out which keywords apply.
*/
@@ -1300,12 +1300,12 @@ enum UnindexState
* the unindexing.
*/
UNINDEX_STATE_FS_NOTIFY = 4,
-
+
/**
* We're done.
*/
UNINDEX_STATE_COMPLETE = 5,
-
+
/**
* We've encountered a fatal error.
*/
@@ -1323,7 +1323,7 @@ struct GNUNET_FS_UnindexContext
* The content hash key of the last block we processed, will in the
* end be set to the CHK from the URI. Used to remove the KBlocks.
*/
- struct ContentHashKey chk;
+ struct ContentHashKey chk;
/**
* Global FS context.
@@ -1460,7 +1460,7 @@ struct SearchRequestEntry
/**
* Derived public key, hashes to 'uquery'.
- */
+ */
struct GNUNET_CRYPTO_EccPublicSignKey dpub;
/**
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c
index d1b6d1c39..1df07a01c 100644
--- a/src/fs/fs_dirmetascan.c
+++ b/src/fs/fs_dirmetascan.c
@@ -53,13 +53,13 @@ struct GNUNET_FS_DirScanner
* Second argument to helper process.
*/
char *ex_arg;
-
+
/**
* The function that will be called every time there's a progress
* message.
*/
GNUNET_FS_DirScannerProgressCallback progress_callback;
-
+
/**
* A closure for progress_callback.
*/
@@ -68,7 +68,7 @@ struct GNUNET_FS_DirScanner
/**
* After the scan is finished, it will contain a pointer to the
* top-level directory entry in the directory tree built by the
- * scanner.
+ * scanner.
*/
struct GNUNET_FS_ShareTreeItem *toplevel;
@@ -103,7 +103,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds)
/* terminate helper */
if (NULL != ds->helper)
GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
-
+
/* free resources */
if (NULL != ds->toplevel)
GNUNET_FS_share_tree_free (ds->toplevel);
@@ -132,7 +132,7 @@ GNUNET_FS_directory_scan_get_result (struct GNUNET_FS_DirScanner *ds)
GNUNET_assert (NULL == ds->helper);
/* preserve result */
result = ds->toplevel;
- ds->toplevel = NULL;
+ ds->toplevel = NULL;
GNUNET_FS_directory_scan_abort (ds);
return result;
}
@@ -149,7 +149,7 @@ static struct GNUNET_FS_ShareTreeItem *
advance (struct GNUNET_FS_ShareTreeItem *pos)
{
int moved;
-
+
GNUNET_assert (NULL != pos);
moved = 0; /* must not terminate, even on file, otherwise "normal" */
while ( (pos->is_directory == GNUNET_YES) ||
@@ -214,7 +214,7 @@ expand_tree (struct GNUNET_FS_ShareTreeItem *parent,
if (NULL != parent)
GNUNET_CONTAINER_DLL_insert (parent->children_head,
parent->children_tail,
- chld);
+ chld);
return chld;
}
@@ -237,9 +237,9 @@ finish_scan (void *cls,
GNUNET_HELPER_stop (ds->helper, GNUNET_NO);
ds->helper = NULL;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
- GNUNET_FS_DIRSCANNER_FINISHED);
+ GNUNET_FS_DIRSCANNER_FINISHED);
}
@@ -252,7 +252,7 @@ finish_scan (void *cls,
* @param msg message from the helper process
*/
static int
-process_helper_msgs (void *cls,
+process_helper_msgs (void *cls,
void *client,
const struct GNUNET_MessageHeader *msg)
{
@@ -275,7 +275,7 @@ process_helper_msgs (void *cls,
GNUNET_break (0);
break;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
filename, GNUNET_NO,
GNUNET_FS_DIRSCANNER_FILE_START);
if (NULL == ds->toplevel)
@@ -301,7 +301,7 @@ process_helper_msgs (void *cls,
ds->pos = ds->pos->parent;
return GNUNET_OK;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
filename, GNUNET_YES,
GNUNET_FS_DIRSCANNER_FILE_START);
ds->pos = expand_tree (ds->pos,
@@ -314,7 +314,7 @@ process_helper_msgs (void *cls,
case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_SKIP_FILE:
if ('\0' != filename[left-1])
break;
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
filename, GNUNET_SYSERR,
GNUNET_FS_DIRSCANNER_FILE_IGNORED);
return GNUNET_OK;
@@ -329,7 +329,7 @@ process_helper_msgs (void *cls,
GNUNET_break (0);
break;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
GNUNET_FS_DIRSCANNER_ALL_COUNTED);
ds->pos = ds->toplevel;
@@ -340,7 +340,7 @@ process_helper_msgs (void *cls,
{
size_t nlen;
const char *end;
-
+
if (NULL == ds->pos)
{
GNUNET_break (0);
@@ -361,7 +361,7 @@ process_helper_msgs (void *cls,
GNUNET_break (0);
break;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
filename, GNUNET_YES,
GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED);
if (0 < left)
@@ -373,18 +373,18 @@ process_helper_msgs (void *cls,
break;
}
/* having full filenames is too dangerous; always make sure we clean them up */
- GNUNET_CONTAINER_meta_data_delete (ds->pos->meta,
+ GNUNET_CONTAINER_meta_data_delete (ds->pos->meta,
EXTRACTOR_METATYPE_FILENAME,
NULL, 0);
/* instead, put in our 'safer' original filename */
GNUNET_CONTAINER_meta_data_insert (ds->pos->meta, "<libgnunetfs>",
EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME,
EXTRACTOR_METAFORMAT_UTF8, "text/plain",
- ds->pos->short_filename,
+ ds->pos->short_filename,
strlen (ds->pos->short_filename) + 1);
}
ds->pos->ksk_uri = GNUNET_FS_uri_ksk_create_from_meta_data (ds->pos->meta);
- ds->pos = advance (ds->pos);
+ ds->pos = advance (ds->pos);
return GNUNET_OK;
}
case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED:
@@ -397,7 +397,7 @@ process_helper_msgs (void *cls,
{
GNUNET_break (0);
break;
- }
+ }
if (NULL == ds->toplevel)
{
GNUNET_break (0);
@@ -410,7 +410,7 @@ process_helper_msgs (void *cls,
GNUNET_break (0);
break;
}
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
GNUNET_FS_DIRSCANNER_INTERNAL_ERROR);
return GNUNET_OK;
@@ -430,9 +430,9 @@ helper_died_cb (void *cls)
ds->helper = NULL;
if (GNUNET_SCHEDULER_NO_TASK != ds->stop_task)
return; /* normal death, was finished */
- ds->progress_callback (ds->progress_callback_cls,
+ ds->progress_callback (ds->progress_callback_cls,
NULL, GNUNET_SYSERR,
- GNUNET_FS_DIRSCANNER_INTERNAL_ERROR);
+ GNUNET_FS_DIRSCANNER_INTERNAL_ERROR);
}
@@ -449,7 +449,7 @@ helper_died_cb (void *cls)
struct GNUNET_FS_DirScanner *
GNUNET_FS_directory_scan_start (const char *filename,
int disable_extractor, const char *ex,
- GNUNET_FS_DirScannerProgressCallback cb,
+ GNUNET_FS_DirScannerProgressCallback cb,
void *cb_cls)
{
struct stat sbuf;
@@ -468,9 +468,9 @@ GNUNET_FS_directory_scan_start (const char *filename,
ds->progress_callback = cb;
ds->progress_callback_cls = cb_cls;
ds->filename_expanded = filename_expanded;
- if (disable_extractor)
+ if (disable_extractor)
ds->ex_arg = GNUNET_strdup ("-");
- else
+ else
ds->ex_arg = (NULL != ex) ? GNUNET_strdup (ex) : NULL;
ds->args[0] = "gnunet-helper-fs-publish";
ds->args[1] = ds->filename_expanded;
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 49c83bdc6..070be0106 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -690,7 +690,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
drc = dr->children[i];
GNUNET_assert (drc->offset >= dr->offset);
child_block_size = GNUNET_FS_tree_compute_tree_size (drc->depth);
- GNUNET_assert (0 == (drc->offset - dr->offset) % child_block_size);
+ GNUNET_assert (0 == (drc->offset - dr->offset) % child_block_size);
if (BRS_INIT == drc->state)
{
drc->state = BRS_CHK_SET;
@@ -1083,7 +1083,7 @@ process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
pi.value.download.specifics.progress.respect_offered = prc->respect_offered;
pi.value.download.specifics.progress.num_transmissions = prc->num_transmissions;
if (prc->last_transmission.abs_value_us != GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
- pi.value.download.specifics.progress.block_download_duration
+ pi.value.download.specifics.progress.block_download_duration
= GNUNET_TIME_absolute_get_duration (prc->last_transmission);
else
pi.value.download.specifics.progress.block_download_duration
@@ -1445,7 +1445,7 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Will try to reconnect in %s\n",
GNUNET_STRINGS_relative_time_to_string (dc->reconnect_backoff, GNUNET_YES));
dc->task =
- GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff,
+ GNUNET_SCHEDULER_add_delayed (dc->reconnect_backoff,
&do_reconnect,
dc);
}
@@ -1539,7 +1539,7 @@ deactivate_fs_download (void *cls)
* the specified depth
*/
static struct DownloadRequest *
-create_download_request (struct DownloadRequest *parent,
+create_download_request (struct DownloadRequest *parent,
unsigned int chk_idx,
unsigned int depth,
uint64_t dr_offset, uint64_t file_start_offset,
@@ -1558,7 +1558,7 @@ create_download_request (struct DownloadRequest *parent,
if (0 == depth)
return dr;
child_block_size = GNUNET_FS_tree_compute_tree_size (depth - 1);
-
+
/* calculate how many blocks at this level are not interesting
* from the start (rounded down), either because of the requested
* file offset or because this IBlock is further along */
@@ -1570,7 +1570,7 @@ create_download_request (struct DownloadRequest *parent,
{
head_skip = 0;
}
-
+
/* calculate index of last block at this level that is interesting (rounded up) */
dr->num_children = (file_start_offset + desired_length - dr_offset) / child_block_size;
if (dr->num_children * child_block_size <
@@ -1585,12 +1585,12 @@ create_download_request (struct DownloadRequest *parent,
(unsigned long long) dr_offset,
depth,
dr->num_children);
-
+
/* now we can get the total number of *interesting* children for this block */
/* why else would we have gotten here to begin with? (that'd be a bad logic error) */
GNUNET_assert (dr->num_children > 0);
-
+
dr->children =
GNUNET_malloc (dr->num_children * sizeof (struct DownloadRequest *));
for (i = 0; i < dr->num_children; i++)
@@ -1616,7 +1616,7 @@ reconstruct_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_FS_DownloadContext *dc = cls;
- /* clean up state from tree encoder */
+ /* clean up state from tree encoder */
if (dc->task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (dc->task);
@@ -1965,7 +1965,7 @@ GNUNET_FS_download_start_task_ (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Trying bottom-up reconstruction of file `%s'\n", dc->filename);
dc->te =
- GNUNET_FS_tree_encoder_create (dc->h,
+ GNUNET_FS_tree_encoder_create (dc->h,
GNUNET_FS_uri_chk_get_file_size (dc->uri),
dc, &fh_reader,
&reconstruct_cb, NULL,
@@ -2116,7 +2116,7 @@ create_download_context (struct GNUNET_FS_Handle *h,
else
dc->temp_filename = GNUNET_DISK_mktemp ("gnunet-directory-download-tmp");
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Starting download `%s' of %llu bytes with tree depth %u\n",
filename,
(unsigned long long) length,
@@ -2267,7 +2267,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc)
GNUNET_FS_queue_ (dc->h, &activate_fs_download, &deactivate_fs_download,
dc, (dc->length + DBLOCK_SIZE - 1) / DBLOCK_SIZE,
(0 == (dc->options & GNUNET_FS_DOWNLOAD_IS_PROBE))
- ? GNUNET_FS_QUEUE_PRIORITY_NORMAL
+ ? GNUNET_FS_QUEUE_PRIORITY_NORMAL
: GNUNET_FS_QUEUE_PRIORITY_PROBE);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Download %p put into queue as job %p\n",
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index 2fe1de7e2..f4cd82978 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -147,9 +147,9 @@ get_update_information_directory (struct GNUNET_FS_Handle *h,
GNUNET_CRYPTO_hash (&pub, sizeof (pub), &hc);
GNUNET_CRYPTO_hash_to_enc (&hc,
&enc);
- GNUNET_asprintf (&ret, "%s%s%s",
- dn,
- DIR_SEPARATOR_STR,
+ GNUNET_asprintf (&ret, "%s%s%s",
+ dn,
+ DIR_SEPARATOR_STR,
(const char *) enc.encoding);
GNUNET_free (dn);
return ret;
@@ -158,7 +158,7 @@ get_update_information_directory (struct GNUNET_FS_Handle *h,
/**
* Release memory occupied by UIG datastructure.
- *
+ *
* @param uig data structure to free
*/
static void
@@ -317,7 +317,7 @@ read_update_information_graph (struct GNUNET_FS_Handle *h,
END:
if (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to read `%s': %s\n"),
fn, emsg);
GNUNET_free (emsg);
}
@@ -383,7 +383,7 @@ struct GNUNET_FS_PublishSksContext
* @param msg error message (or NULL)
*/
static void
-sks_publish_cont (void *cls,
+sks_publish_cont (void *cls,
const char *msg)
{
struct GNUNET_FS_PublishSksContext *psc = cls;
@@ -405,7 +405,7 @@ sks_publish_cont (void *cls,
uig = read_update_information_graph (psc->h,
&psc->ns);
GNUNET_array_append (uig->update_nodes,
- uig->update_node_count,
+ uig->update_node_count,
psc->nsn);
psc->nsn = NULL;
write_update_information_graph (uig);
@@ -549,16 +549,16 @@ struct ProcessUpdateClosure
* GNUNET_NO if not.
*/
static int
-process_update_node (void *cls,
- const struct GNUNET_HashCode *key,
+process_update_node (void *cls,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct ProcessUpdateClosure *pc = cls;
struct NamespaceUpdateNode *nsn = value;
pc->ip (pc->ip_cls,
- nsn->id,
- nsn->uri,
+ nsn->id,
+ nsn->uri,
nsn->md,
nsn->update);
return GNUNET_YES;
@@ -619,7 +619,7 @@ struct FindTreeClosure
*/
static int
find_trees (void *cls,
- const struct GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct FindTreeClosure *fc = cls;
@@ -780,7 +780,7 @@ GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Handle *h,
fc.tree_array[fc.id] = nsn;
nsn->tree_id = fc.id;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"TREE of node `%s' is %u\n", nsn->id,
fc.id);
}
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 0d2dae283..387ede6a1 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -112,7 +112,7 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc)
* @param msg error message (or NULL)
*/
static void
-ds_put_cont (void *cls, int success,
+ds_put_cont (void *cls, int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
@@ -206,14 +206,14 @@ signal_publish_error (struct GNUNET_FS_FileInformation *p,
* @param msg error message (typically NULL, not used)
*/
static void
-finish_release_reserve (void *cls, int success,
+finish_release_reserve (void *cls, int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
pc->qre = NULL;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Releasing reserve done!\n");
signal_publish_completion (pc->fi, pc);
pc->all_done = GNUNET_YES;
@@ -268,8 +268,8 @@ publish_sblock (struct GNUNET_FS_PublishContext *pc)
{
if (NULL != pc->ns)
pc->sks_pc = GNUNET_FS_publish_sks (pc->h,
- pc->ns,
- pc->nid,
+ pc->ns,
+ pc->nid,
pc->nuid,
pc->fi->meta,
pc->fi->chk_uri,
@@ -300,7 +300,7 @@ publish_kblocks_cont (void *cls, const struct GNUNET_FS_Uri *uri,
pc->ksk_pc = NULL;
if (NULL != emsg)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Error uploading KSK blocks: %s\n",
emsg);
signal_publish_error (p, pc, emsg);
@@ -359,7 +359,7 @@ block_reader (void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
}
else
{
- if (UINT64_MAX == offset)
+ if (UINT64_MAX == offset)
{
if (&GNUNET_FS_data_reader_file_ == p->data.file.reader)
{
@@ -408,10 +408,10 @@ encode_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (NULL != emsg)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Error during tree walk: %s\n",
+ "Error during tree walk: %s\n",
emsg);
GNUNET_asprintf (&p->emsg,
- _("Publishing failed: %s"),
+ _("Publishing failed: %s"),
emsg);
GNUNET_free (emsg);
pi.status = GNUNET_FS_STATUS_PUBLISH_ERROR;
@@ -603,7 +603,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
GNUNET_FS_file_information_sync_ (p);
}
size = (GNUNET_YES == p->is_directory) ? p->data.dir.dir_size : p->data.file.file_size;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Creating tree encoder\n");
p->te =
GNUNET_FS_tree_encoder_create (pc->h, size, pc, &block_reader,
@@ -625,7 +625,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
* @param msg the response we got
*/
static void
-process_index_start_response (void *cls,
+process_index_start_response (void *cls,
const struct GNUNET_MessageHeader *msg)
{
struct GNUNET_FS_PublishContext *pc = cls;
@@ -696,7 +696,7 @@ hash_for_index_cb (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Can not index file `%s': %s. Will try to insert instead.\n"),
- p->filename,
+ p->filename,
_("failed to compute hash"));
p->data.file.do_index = GNUNET_NO;
GNUNET_FS_file_information_sync_ (p);
@@ -741,7 +741,7 @@ hash_for_index_cb (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Can not index file `%s': %s. Will try to insert instead.\n"),
- p->filename,
+ p->filename,
_("could not connect to `fs' service"));
p->data.file.do_index = GNUNET_NO;
publish_content (pc);
@@ -810,8 +810,8 @@ GNUNET_FS_publish_main_ (void *cls,
return;
}
/* find starting position */
- while ( (GNUNET_YES == p->is_directory) &&
- (NULL != p->data.dir.entries) &&
+ while ( (GNUNET_YES == p->is_directory) &&
+ (NULL != p->data.dir.entries) &&
(NULL == p->emsg) &&
(NULL == p->data.dir.entries->chk_uri) )
{
@@ -822,8 +822,8 @@ GNUNET_FS_publish_main_ (void *cls,
/* abort on error */
if (NULL != p->emsg)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Error uploading: %s\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Error uploading: %s\n",
p->emsg);
/* error with current file, abort all
* related files as well! */
@@ -928,9 +928,9 @@ fip_signal_start (void *cls,
struct GNUNET_FS_FileInformation *fi,
uint64_t length,
struct GNUNET_CONTAINER_MetaData *meta,
- struct GNUNET_FS_Uri **uri,
+ struct GNUNET_FS_Uri **uri,
struct GNUNET_FS_BlockOptions *bo,
- int *do_index,
+ int *do_index,
void **client_info)
{
struct GNUNET_FS_PublishContext *pc = cls;
@@ -1013,7 +1013,7 @@ suspend_operation (struct GNUNET_FS_FileInformation *fi,
GNUNET_FS_publish_sks_cancel (pc->sks_pc);
pc->sks_pc = NULL;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Suspending publish operation\n");
GNUNET_free_non_null (fi->serialization);
fi->serialization = NULL;
@@ -1051,10 +1051,10 @@ suspend_operation (struct GNUNET_FS_FileInformation *fi,
static int
fip_signal_suspend (void *cls,
struct GNUNET_FS_FileInformation *fi,
- uint64_t length,
+ uint64_t length,
struct GNUNET_CONTAINER_MetaData *meta,
struct GNUNET_FS_Uri **uri,
- struct GNUNET_FS_BlockOptions *bo,
+ struct GNUNET_FS_BlockOptions *bo,
int *do_index,
void **client_info)
{
@@ -1112,7 +1112,7 @@ GNUNET_FS_publish_signal_suspend_ (void *cls)
* @param msg error message on error, otherwise NULL
*/
static void
-finish_reserve (void *cls, int success,
+finish_reserve (void *cls, int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
@@ -1122,7 +1122,7 @@ finish_reserve (void *cls, int success,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Reservation complete (%d)!\n", success);
if ((msg != NULL) || (success <= 0))
{
- GNUNET_asprintf (&pc->fi->emsg,
+ GNUNET_asprintf (&pc->fi->emsg,
_("Insufficient space for publishing: %s"),
msg);
signal_publish_error (pc->fi, pc, pc->fi->emsg);
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c
index f844217e8..6aac94011 100644
--- a/src/fs/fs_publish_ksk.c
+++ b/src/fs/fs_publish_ksk.c
@@ -21,7 +21,7 @@
/**
* @file fs/fs_publish_ksk.c
* @brief publish a URI under a keyword in GNUnet
- * @see https://gnunet.org/encoding and #2564
+ * @see https://gnunet.org/encoding and #2564
* @author Krista Bennett
* @author Christian Grothoff
*/
@@ -93,7 +93,7 @@ struct GNUNET_FS_PublishKskContext
/**
* Options to use.
- */
+ */
enum GNUNET_FS_PublishOptions options;
/**
@@ -113,7 +113,7 @@ struct GNUNET_FS_PublishKskContext
* @param tc unused
*/
static void
-publish_ksk_cont (void *cls,
+publish_ksk_cont (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc);
@@ -133,7 +133,7 @@ kb_put_cont (void *cls,
pkc->uc = NULL;
if (NULL != msg)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"KBlock PUT operation failed: %s\n", msg);
pkc->cont (pkc->cont_cls, NULL, msg);
GNUNET_FS_publish_ksk_cancel (pkc);
diff --git a/src/fs/fs_publish_ublock.c b/src/fs/fs_publish_ublock.c
index c84b21ba8..18f4804d1 100644
--- a/src/fs/fs_publish_ublock.c
+++ b/src/fs/fs_publish_ublock.c
@@ -21,7 +21,7 @@
/**
* @file fs/fs_publish_ublock.c
* @brief publish a UBLOCK in GNUnet
- * @see https://gnunet.org/encoding and #2564
+ * @see https://gnunet.org/encoding and #2564
* @author Krista Bennett
* @author Christian Grothoff
*/
@@ -41,7 +41,7 @@
* @param iv where to store the IV
* @param label label to use for key derivation
* @param pub public key to use for key derivation
- */
+ */
static void
derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
struct GNUNET_CRYPTO_SymmetricInitializationVector *iv,
@@ -69,7 +69,7 @@ derive_ublock_encryption_key (struct GNUNET_CRYPTO_SymmetricSessionKey *skey,
* @param ns public key under which the UBlock was stored
* @param label label under which the UBlock was stored
* @param output where to write the result, has input_len bytes
- */
+ */
void
GNUNET_FS_ublock_decrypt_ (const void *input,
size_t input_len,
@@ -124,7 +124,7 @@ struct GNUNET_FS_PublishUblockContext
* @param msg NULL on success, otherwise an error message
*/
static void
-ublock_put_cont (void *cls,
+ublock_put_cont (void *cls,
int32_t success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
@@ -221,7 +221,7 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
}
size = sizeof (struct UBlock) + slen + mdsize + ulen;
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Publishing under identifier `%s'\n",
label);
/* get public key of the namespace */
@@ -232,11 +232,11 @@ GNUNET_FS_publish_ublock_ (struct GNUNET_FS_Handle *h,
/* encrypt ublock */
ub_enc = GNUNET_malloc (size);
- GNUNET_CRYPTO_symmetric_encrypt (&ub_plain[1],
+ GNUNET_CRYPTO_symmetric_encrypt (&ub_plain[1],
ulen + slen + mdsize,
&skey, &iv,
&ub_enc[1]);
- ub_enc->purpose.size = htonl (ulen + slen + mdsize +
+ ub_enc->purpose.size = htonl (ulen + slen + mdsize +
sizeof (struct UBlock)
- sizeof (struct GNUNET_CRYPTO_EccSignature));
ub_enc->purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK);
diff --git a/src/fs/fs_publish_ublock.h b/src/fs/fs_publish_ublock.h
index 1a7d338d2..ed8d599a8 100644
--- a/src/fs/fs_publish_ublock.h
+++ b/src/fs/fs_publish_ublock.h
@@ -21,7 +21,7 @@
/**
* @file fs/fs_publish_ublock.h
* @brief publish a UBLOCK in GNUnet
- * @see https://gnunet.org/encoding and #2564
+ * @see https://gnunet.org/encoding and #2564
* @author Krista Bennett
* @author Christian Grothoff
*/
@@ -42,7 +42,7 @@
* @param ns public key under which the UBlock was stored
* @param label label under which the UBlock was stored
* @param output where to write the result, has input_len bytes
- */
+ */
void
GNUNET_FS_ublock_decrypt_ (const void *input,
size_t input_len,
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 2e09c1e22..7a869b4c5 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -54,11 +54,11 @@ GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
pi->value.search.sc = sc;
pi->value.search.cctx = (NULL != sc) ? sc->client_info : NULL;
pi->value.search.pctx =
- ((NULL == sc) || (NULL == sc->psearch_result))
- ? NULL
+ ((NULL == sc) || (NULL == sc->psearch_result))
+ ? NULL
: sc->psearch_result->client_info;
pi->value.search.query = (NULL != sc) ? sc->uri : NULL;
- pi->value.search.duration = (NULL != sc)
+ pi->value.search.duration = (NULL != sc)
? GNUNET_TIME_absolute_get_duration (sc->start_time)
: GNUNET_TIME_UNIT_ZERO;
pi->value.search.anonymity = (NULL != sc) ? sc->anonymity : 0;
@@ -125,7 +125,7 @@ notify_client_chk_update (struct GNUNET_FS_SearchContext *sc,
struct GNUNET_FS_SearchResult *sr)
{
struct GNUNET_FS_ProgressInfo pi;
-
+
pi.status = GNUNET_FS_STATUS_SEARCH_UPDATE;
pi.value.search.specifics.update.cctx = sr->client_info;
pi.value.search.specifics.update.meta = sr->meta;
@@ -135,7 +135,7 @@ notify_client_chk_update (struct GNUNET_FS_SearchContext *sc,
pi.value.search.specifics.update.availability_certainty =
sr->availability_trials;
pi.value.search.specifics.update.applicability_rank = sr->optional_support;
- pi.value.search.specifics.update.current_probe_time
+ pi.value.search.specifics.update.current_probe_time
= GNUNET_TIME_absolute_get_duration (sr->probe_active_time);
sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc);
}
@@ -194,12 +194,12 @@ signal_probe_result (struct GNUNET_FS_SearchResult *sr)
pi.value.search.specifics.update.cctx = sr->client_info;
pi.value.search.specifics.update.meta = sr->meta;
pi.value.search.specifics.update.uri = sr->uri;
- pi.value.search.specifics.update.availability_rank
+ pi.value.search.specifics.update.availability_rank
= 2 * sr->availability_success - sr->availability_trials;
- pi.value.search.specifics.update.availability_certainty
+ pi.value.search.specifics.update.availability_certainty
= sr->availability_trials;
pi.value.search.specifics.update.applicability_rank = sr->optional_support;
- pi.value.search.specifics.update.current_probe_time
+ pi.value.search.specifics.update.current_probe_time
= GNUNET_TIME_absolute_get_duration (sr->probe_active_time);
sr->client_info = GNUNET_FS_search_make_status_ (&pi, sr->h, sr->sc);
GNUNET_FS_search_start_probe_ (sr);
@@ -380,7 +380,7 @@ probe_ping_task (void *cls,
struct GNUNET_FS_SearchResult *sr = cls;
signal_probe_result (sr);
- sr->probe_ping_task
+ sr->probe_ping_task
= GNUNET_SCHEDULER_add_delayed (GNUNET_FS_PROBE_UPDATE_FREQUENCY,
&probe_ping_task,
sr);
@@ -434,7 +434,7 @@ GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr)
len, sr->anonymity,
GNUNET_FS_DOWNLOAD_NO_TEMPORARIES |
GNUNET_FS_DOWNLOAD_IS_PROBE, sr, NULL);
- sr->probe_ping_task
+ sr->probe_ping_task
= GNUNET_SCHEDULER_add_now (&probe_ping_task,
sr);
}
@@ -465,7 +465,7 @@ GNUNET_FS_probe (struct GNUNET_FS_Handle *h,
sr->uri = GNUNET_FS_uri_dup (uri);
sr->meta = GNUNET_CONTAINER_meta_data_duplicate (meta);
sr->client_info = client_info;
- sr->anonymity = anonymity;
+ sr->anonymity = anonymity;
GNUNET_FS_search_start_probe_ (sr);
return sr;
}
@@ -473,8 +473,8 @@ GNUNET_FS_probe (struct GNUNET_FS_Handle *h,
/**
* Stop probing activity associated with a search result.
- *
- * @param sr search result
+ *
+ * @param sr search result
*/
static void
GNUNET_FS_search_stop_probe_ (struct GNUNET_FS_SearchResult *sr)
@@ -674,7 +674,7 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update,
* @param edata encrypted data
* @param edata_size number of bytes in @a edata (and @a data)
* @param data where to store the plaintext
- * @return keyword index on success, #GNUNET_SYSERR on error (no such
+ * @return keyword index on success, #GNUNET_SYSERR on error (no such
* keyword, internal error)
*/
static int
@@ -683,7 +683,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
const void *edata,
size_t edata_size,
char *data)
-{
+{
const struct GNUNET_CRYPTO_EccPrivateKey *anon;
struct GNUNET_CRYPTO_EccPublicSignKey anon_pub;
unsigned int i;
@@ -721,7 +721,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
* @param size size of nb
*/
static void
-process_kblock (struct GNUNET_FS_SearchContext *sc,
+process_kblock (struct GNUNET_FS_SearchContext *sc,
const struct UBlock *ub,
size_t size)
{
@@ -749,7 +749,7 @@ process_kblock (struct GNUNET_FS_SearchContext *sc,
if (NULL == (uri = GNUNET_FS_uri_parse (&pt[1], &emsg)))
{
GNUNET_break_op (0); /* ublock malformed */
- GNUNET_free_non_null (emsg);
+ GNUNET_free_non_null (emsg);
return;
}
j = eos - pt + 1;
@@ -781,7 +781,7 @@ process_kblock (struct GNUNET_FS_SearchContext *sc,
* @param size size of sb
*/
static void
-process_sblock (struct GNUNET_FS_SearchContext *sc,
+process_sblock (struct GNUNET_FS_SearchContext *sc,
const struct UBlock *ub,
size_t size)
{
@@ -811,8 +811,8 @@ process_sblock (struct GNUNET_FS_SearchContext *sc,
}
if (NULL == (uri = GNUNET_FS_uri_parse (uris, &emsg)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Failed to parse URI `%s': %s\n"),
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to parse URI `%s': %s\n"),
uris, emsg);
GNUNET_break_op (0); /* ublock malformed */
GNUNET_free_non_null (emsg);
@@ -837,9 +837,9 @@ process_sblock (struct GNUNET_FS_SearchContext *sc,
* @param size size of data
*/
static void
-process_result (struct GNUNET_FS_SearchContext *sc,
+process_result (struct GNUNET_FS_SearchContext *sc,
enum GNUNET_BLOCK_Type type,
- struct GNUNET_TIME_Absolute expiration,
+ struct GNUNET_TIME_Absolute expiration,
const void *data,
size_t size)
{
@@ -1108,7 +1108,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
&dpub);
GNUNET_CRYPTO_hash (&dpub,
sizeof (dpub),
- &sm->query);
+ &sm->query);
mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
sqms = GNUNET_CONTAINER_multihashmap_size (sc->master_result_map);
mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
@@ -1206,7 +1206,7 @@ try_reconnect (struct GNUNET_FS_SearchContext *sc)
}
sc->reconnect_backoff = GNUNET_TIME_STD_BACKOFF (sc->reconnect_backoff);
sc->task =
- GNUNET_SCHEDULER_add_delayed (sc->reconnect_backoff,
+ GNUNET_SCHEDULER_add_delayed (sc->reconnect_backoff,
&do_reconnect,
sc);
}
@@ -1293,8 +1293,8 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
keyword,
"fs-ublock",
&sre->dpub);
- GNUNET_CRYPTO_hash (&sre->dpub,
- sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
+ GNUNET_CRYPTO_hash (&sre->dpub,
+ sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
&sre->uquery);
sre->mandatory = (sc->uri->data.ksk.keywords[i][0] == '+');
if (sre->mandatory)
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c
index 954d450a7..c392ba1ef 100644
--- a/src/fs/fs_sharetree.c
+++ b/src/fs/fs_sharetree.c
@@ -174,7 +174,7 @@ add_to_keyword_counter (void *cls, const char *keyword, int is_mandatory)
cnt->value = (const char *) &cnt[1];
memcpy (&cnt[1], keyword, klen);
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (mcm,
+ GNUNET_CONTAINER_multihashmap_put (mcm,
&hc, cnt,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
@@ -313,7 +313,7 @@ migrate_and_drop_metadata (void *cls, const struct GNUNET_HashCode * key, void *
counter->type,
counter->format,
counter->data_mime_type, counter->data,
- counter->data_size);
+ counter->data_size);
}
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (tc->metacounter,
@@ -350,7 +350,7 @@ share_tree_trim (struct TrimContext *tc,
if (tree->is_directory == GNUNET_YES)
{
const char *user = getenv ("USER");
- if ( (user == NULL) ||
+ if ( (user == NULL) ||
(0 != strncasecmp (user, tree->short_filename, strlen(user))))
{
/* only use filename if it doesn't match $USER */
@@ -366,12 +366,12 @@ share_tree_trim (struct TrimContext *tc,
if (1 >= num_children)
return; /* nothing to trim */
-
+
/* now, count keywords and meta data in children */
for (pos = tree->children_head; NULL != pos; pos = pos->next)
{
if (NULL != pos->meta)
- GNUNET_CONTAINER_meta_data_iterate (pos->meta, &add_to_meta_counter, tc->metacounter);
+ GNUNET_CONTAINER_meta_data_iterate (pos->meta, &add_to_meta_counter, tc->metacounter);
if (NULL != pos->ksk_uri)
GNUNET_FS_uri_ksk_get_keywords (pos->ksk_uri, &add_to_keyword_counter, tc->keywordcounter);
}
@@ -393,10 +393,10 @@ share_tree_trim (struct TrimContext *tc,
/* add high-frequency meta data and keywords to parent */
tc->pos = tree;
- GNUNET_CONTAINER_multihashmap_iterate (tc->keywordcounter,
+ GNUNET_CONTAINER_multihashmap_iterate (tc->keywordcounter,
&migrate_and_drop_keywords,
tc);
- GNUNET_CONTAINER_multihashmap_iterate (tc->metacounter,
+ GNUNET_CONTAINER_multihashmap_iterate (tc->metacounter,
&migrate_and_drop_metadata,
tc);
}
@@ -414,7 +414,7 @@ GNUNET_FS_share_tree_trim (struct GNUNET_FS_ShareTreeItem *toplevel)
struct TrimContext tc;
if (toplevel == NULL)
- return;
+ return;
tc.keywordcounter = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_NO);
tc.metacounter = GNUNET_CONTAINER_multihashmap_create (1024, GNUNET_NO);
share_tree_trim (&tc, toplevel);
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c
index 0fc36e7ac..925e36a8e 100644
--- a/src/fs/fs_test_lib.c
+++ b/src/fs/fs_test_lib.c
@@ -183,16 +183,16 @@ struct TestDownloadOperation
* @param tc scheduler context (unused)
*/
static void
-report_uri (void *cls,
+report_uri (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct TestPublishOperation *po = cls;
GNUNET_FS_publish_stop (po->publish_context);
GNUNET_TESTBED_operation_done (po->fs_op);
- po->publish_cont (po->publish_cont_cls,
+ po->publish_cont (po->publish_cont_cls,
po->publish_uri,
- (GNUNET_YES == po->do_index)
+ (GNUNET_YES == po->do_index)
? po->publish_tmp_file
: NULL);
GNUNET_FS_uri_destroy (po->publish_uri);
@@ -272,15 +272,15 @@ publish_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
* @param cls pointer to uint32_t with publishing seed
* @param offset offset to generate data for
* @param max maximum number of bytes to generate
- * @param buf where to write generated data
+ * @param buf where to write generated data
* @param emsg where to store error message (unused)
* @return number of bytes written to buf
*/
static size_t
-file_generator (void *cls,
+file_generator (void *cls,
uint64_t offset,
- size_t max,
- void *buf,
+ size_t max,
+ void *buf,
char **emsg)
{
uint32_t *publish_seed = cls;
@@ -307,7 +307,7 @@ file_generator (void *cls,
/**
* Connect adapter for publishing operation.
- *
+ *
* @param cls the 'struct TestPublishOperation'
* @param cfg configuration of the peer to connect to; will be available until
* GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -319,7 +319,7 @@ publish_connect_adapter (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct TestPublishOperation *po = cls;
-
+
return GNUNET_FS_start (cfg,
"fs-test-publish",
&publish_progress_cb, po,
@@ -330,11 +330,11 @@ publish_connect_adapter (void *cls,
/**
* Adapter function called to destroy connection to file-sharing service.
- *
+ *
* @param cls the 'struct GNUNET_FS_Handle'
* @param op_result unused (different for publish/download!)
*/
-static void
+static void
fs_disconnect_adapter (void *cls,
void *op_result)
{
@@ -412,8 +412,8 @@ publish_fs_connect_complete_cb (void *cls,
else
{
fi = GNUNET_FS_file_information_create_from_reader (po->fs, po,
- po->size,
- &file_generator, &po->publish_seed,
+ po->size,
+ &file_generator, &po->publish_seed,
NULL, NULL,
po->do_index, &bo);
}
@@ -557,7 +557,7 @@ download_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
/**
* Connect adapter for download operation.
- *
+ *
* @param cls the 'struct TestDownloadOperation'
* @param cfg configuration of the peer to connect to; will be available until
* GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -569,7 +569,7 @@ download_connect_adapter (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct TestPublishOperation *po = cls;
-
+
return GNUNET_FS_start (cfg,
"fs-test-download",
&download_progress_cb, po,
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index ecf14112c..7e189d697 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -322,8 +322,8 @@ unindex_finish (struct GNUNET_FS_UnindexContext *uc)
* @param reason kind of progress we are making
*/
static void
-unindex_directory_scan_cb (void *cls,
- const char *filename,
+unindex_directory_scan_cb (void *cls,
+ const char *filename,
int is_directory,
enum GNUNET_FS_DirScannerProgressUpdateReason reason)
{
@@ -381,7 +381,7 @@ GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc)
ex = NULL;
uc->dscan = GNUNET_FS_directory_scan_start (uc->filename,
GNUNET_NO, ex,
- &unindex_directory_scan_cb,
+ &unindex_directory_scan_cb,
uc);
GNUNET_free_non_null (ex);
}
@@ -391,7 +391,7 @@ GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc)
* Continuation called to notify client about result of the remove
* operation for the UBlock.
*
- * @param cls the 'struct GNUNET_FS_UnindexContext *'
+ * @param cls the 'struct GNUNET_FS_UnindexContext *'
* @param success GNUNET_SYSERR on failure (including timeout/queue drop)
* GNUNET_NO if content was already there
* GNUNET_YES (or other positive value) on success
@@ -409,10 +409,10 @@ continue_after_remove (void *cls,
struct GNUNET_FS_UnindexContext *uc = cls;
uc->dqe = NULL;
- if (success != GNUNET_YES)
+ if (success != GNUNET_YES)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Failed to remove UBlock: %s\n"),
- msg);
+ msg);
uc->ksk_offset++;
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
}
@@ -464,14 +464,14 @@ process_kblock_for_unindex (void *cls,
if (0 == uc->first_uid)
{
/* remember UID of first result to detect cycles */
- uc->first_uid = uid;
+ uc->first_uid = uid;
}
else if (uid == uc->first_uid)
{
/* no more additional results */
uc->ksk_offset++;
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
- return;
+ return;
}
GNUNET_assert (GNUNET_BLOCK_TYPE_FS_UBLOCK == type);
if (size < sizeof (struct UBlock))
@@ -489,10 +489,10 @@ process_kblock_for_unindex (void *cls,
goto get_next;
}
{
- char pt[size - sizeof (struct UBlock)];
+ char pt[size - sizeof (struct UBlock)];
struct GNUNET_CRYPTO_EccPublicSignKey anon_pub;
const char *keyword;
-
+
GNUNET_CRYPTO_ecc_key_get_public_for_signature (GNUNET_CRYPTO_ecc_key_get_anonymous (),
&anon_pub);
keyword = &uc->ksk_uri->data.ksk.keywords[uc->ksk_offset][1];
@@ -757,7 +757,7 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls)
* @return NULL on error, otherwise handle
*/
struct GNUNET_FS_UnindexContext *
-GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
+GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h,
const char *filename,
void *cctx)
{
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 4b25e91ea..90c211415 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -98,7 +98,7 @@
* @param key where to store the unique key
*/
void
-GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
struct GNUNET_HashCode *key)
{
switch (uri->type)
@@ -368,7 +368,7 @@ uri_sks_parse (const char *s, char **emsg)
end = strchr (&s[pos], '/');
if ( (NULL == end) ||
(GNUNET_OK !=
- GNUNET_STRINGS_string_to_data (&s[pos],
+ GNUNET_STRINGS_string_to_data (&s[pos],
end - &s[pos],
&ns,
sizeof (ns))) )
@@ -526,12 +526,12 @@ struct LocUriAssembly
/**
* File being offered.
- */
+ */
struct FileIdentifier fi;
/**
* Peer offering the file.
- */
+ */
struct GNUNET_PeerIdentity peer;
};
@@ -947,7 +947,7 @@ GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
* @return an FS URI for the given namespace and identifier
*/
struct GNUNET_FS_Uri *
-GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns,
+GNUNET_FS_uri_sks_create (const struct GNUNET_CRYPTO_EccPublicSignKey *ns,
const char *id)
{
struct GNUNET_FS_Uri *ns_uri;
@@ -1424,7 +1424,7 @@ GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri)
* Add a keyword as non-mandatory (with ' '-prefix) to the
* given keyword list at offset 'index'. The array is
* guaranteed to be long enough.
- *
+ *
* @param s keyword to add
* @param array array to add the keyword to
* @param index offset where to add the keyword
@@ -1439,14 +1439,14 @@ insert_non_mandatory_keyword (const char *s, char **array, int index)
/**
- * Test if the given keyword 's' is already present in the
+ * Test if the given keyword 's' is already present in the
* given array, ignoring the '+'-mandatory prefix in the array.
*
* @param s keyword to test
* @param array keywords to test against, with ' ' or '+' prefix to ignore
* @param array_length length of the array
* @return GNUNET_YES if the keyword exists, GNUNET_NO if not
- */
+ */
static int
find_duplicate (const char *s, const char **array, int array_length)
{
@@ -1535,7 +1535,7 @@ u8_strcount (const uint8_t *s)
* to it are used to check for duplicates). ignored if array == NULL.
* @return number of tokens counted (including duplicates), or number of
* tokens extracted (excluding duplicates). 0 if there are no
- * matching parens in the string (when counting), or when all tokens
+ * matching parens in the string (when counting), or when all tokens
* were duplicates (when extracting).
*/
static int
@@ -1612,7 +1612,7 @@ get_keywords_from_parens (const char *s, char **array, int index)
else
count++;
close_paren[0] = tmp;
- }
+ }
}
GNUNET_free (ss);
return count;
@@ -1900,7 +1900,7 @@ uri_sks_to_string (const struct GNUNET_FS_Uri *uri)
GNUNET_assert (NULL != ret);
ret[0] = '\0';
GNUNET_asprintf (&ret, "%s%s%s/%s", GNUNET_FS_URI_PREFIX,
- GNUNET_FS_URI_SKS_INFIX, buf,
+ GNUNET_FS_URI_SKS_INFIX, buf,
uri->data.sks.identifier);
return ret;
}
@@ -2003,7 +2003,7 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri)
peerSig =
bin2enc (&uri->data.loc.contentSignature,
sizeof (struct GNUNET_CRYPTO_EccSignature));
- GNUNET_asprintf (&ret,
+ GNUNET_asprintf (&ret,
"%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
(const char *) &queryhash,
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c
index 86cab5593..b001cb58c 100644
--- a/src/fs/gnunet-auto-share.c
+++ b/src/fs/gnunet-auto-share.c
@@ -21,7 +21,7 @@
* @file fs/gnunet-auto-share.c
* @brief automatically publish files on GNUnet
* @author Christian Grothoff
- *
+ *
* TODO:
* - support loading meta data / keywords from resource file
* - add stability timer (a la buildbot)
@@ -204,7 +204,7 @@ load_state ()
while (n-- > 0)
{
if ( (GNUNET_OK !=
- GNUNET_BIO_read_string (rh, "filename", &fn, 1024)) ||
+ GNUNET_BIO_read_string (rh, "filename", &fn, 1024)) ||
(GNUNET_OK !=
GNUNET_BIO_read (rh, "id", &id, sizeof (struct GNUNET_HashCode))) )
goto error;
@@ -224,7 +224,7 @@ load_state ()
wi,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
}
- if (GNUNET_OK ==
+ if (GNUNET_OK ==
GNUNET_BIO_read_close (rh, &emsg))
return;
rh = NULL;
@@ -259,7 +259,7 @@ write_item (void *cls,
"Saving serialization ID of file `%s' with value `%s'\n",
wi->filename,
GNUNET_h2s (&wi->id));
- if ( (GNUNET_OK !=
+ if ( (GNUNET_OK !=
GNUNET_BIO_write_string (wh, wi->filename)) ||
(GNUNET_OK !=
GNUNET_BIO_write (wh,
@@ -381,7 +381,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_break (0);
GNUNET_OS_process_kill (publish_proc, SIGKILL);
- type = GNUNET_OS_PROCESS_SIGNALED;
+ type = GNUNET_OS_PROCESS_SIGNALED;
}
GNUNET_OS_process_destroy (publish_proc);
publish_proc = NULL;
@@ -415,7 +415,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
wi);
}
save_state ();
- schedule_next_task ();
+ schedule_next_task ();
}
@@ -452,7 +452,7 @@ work (void *cls,
static char content_prio[20];
static char repl_level[20];
struct WorkItem *wi;
- const struct GNUNET_DISK_FileHandle *pr;
+ const struct GNUNET_DISK_FileHandle *pr;
int argc;
run_task = GNUNET_SCHEDULER_NO_TASK;
@@ -553,7 +553,7 @@ determine_id (void *cls,
/* use hash here to make hierarchical structure distinct from
all files on the same level */
GNUNET_CRYPTO_hash (fx, sizeof (fx), &ft);
- /* use XOR here so that order of the files in the directory
+ /* use XOR here so that order of the files in the directory
does not matter! */
GNUNET_CRYPTO_hash_xor (&ft, id, id);
return GNUNET_OK;
@@ -613,7 +613,7 @@ add_file (void *cls,
work_tail,
wi);
if (GNUNET_YES == do_shutdown)
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
return GNUNET_OK;
}
@@ -645,7 +645,7 @@ schedule_next_task ()
struct GNUNET_TIME_Relative delay;
if (GNUNET_YES == do_shutdown)
- return;
+ return;
if (NULL == work_head)
{
/* delay by at most 4h, at least 1s, and otherwise in between depending
@@ -694,7 +694,7 @@ run (void *cls, char *const *args, const char *cfgfile,
load_state ();
run_task = GNUNET_SCHEDULER_add_with_priority (GNUNET_SCHEDULER_PRIORITY_IDLE,
&scan, NULL);
-
+
kill_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &do_stop_task,
NULL);
@@ -707,7 +707,7 @@ run (void *cls, char *const *args, const char *cfgfile,
* @param cls NULL (unused)
* @param key key of the item in the map (unused)
* @param value the 'struct WorkItem' to free
- * @return GNUNET_OK to continue to iterate
+ * @return GNUNET_OK to continue to iterate
*/
static int
free_item (void *cls,
@@ -731,7 +731,7 @@ free_item (void *cls,
*/
int
main (int argc, char *const *argv)
-{
+{
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
{'a', "anonymity", "LEVEL",
gettext_noop ("set the desired LEVEL of sender-anonymity"),
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index a19fa1ef6..d4c2b1c02 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -164,7 +164,7 @@ static struct Pattern *download_tail;
/**
- * Parse a pattern string and store the corresponding
+ * Parse a pattern string and store the corresponding
* 'struct Pattern' in the given head/tail.
*
* @param head where to store the head
@@ -243,7 +243,7 @@ make_file (uint64_t length,
return NULL;
/* initialize data with 'unique' data only depending on 'kval' and 'size',
making sure that blocks do not repeat */
- for (i=0;i<length; i+=8)
+ for (i=0;i<length; i+=8)
{
xor = length ^ kval ^ (uint64_t) (i / 32 / 1024);
memcpy (&data[i], &xor, GNUNET_MIN (length - i, sizeof (uint64_t)));
@@ -396,8 +396,8 @@ progress_cb (void *cls,
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
p = info->value.publish.cctx;
GNUNET_STATISTICS_update (stats_handle,
- "# publishing time (ms)",
- (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
+ "# publishing time (ms)",
+ (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
GNUNET_NO);
p->task = GNUNET_SCHEDULER_add_now (&publish_stop_task, p);
return p;
@@ -424,9 +424,9 @@ progress_cb (void *cls,
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
p = info->value.download.cctx;
GNUNET_STATISTICS_update (stats_handle,
- "# download time (ms)",
- (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
- GNUNET_NO);
+ "# download time (ms)",
+ (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
+ GNUNET_NO);
p->task = GNUNET_SCHEDULER_add_now (&download_stop_task, p);
return p;
case GNUNET_FS_STATUS_DOWNLOAD_STOPPED:
@@ -450,12 +450,12 @@ progress_cb (void *cls,
if (p->y != GNUNET_FS_uri_chk_get_file_size (uri))
return NULL; /* not what we want */
GNUNET_STATISTICS_update (stats_handle,
- "# search time (ms)",
- (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
+ "# search time (ms)",
+ (long long) GNUNET_TIME_absolute_get_duration (p->start_time).rel_value_us / 1000LL,
GNUNET_NO);
p->start_time = GNUNET_TIME_absolute_get ();
p->ctx = GNUNET_FS_download_start (fs_handle, uri,
- NULL, NULL, NULL,
+ NULL, NULL, NULL,
0, GNUNET_FS_uri_chk_get_file_size (uri),
anonymity_level,
GNUNET_FS_DOWNLOAD_NO_TEMPORARIES,
@@ -483,7 +483,7 @@ progress_cb (void *cls,
GNUNET_free (p);
}
return NULL;
- default:
+ default:
/* unexpected event during profiling */
GNUNET_break (0);
return NULL;
@@ -497,7 +497,7 @@ progress_cb (void *cls,
* @param cls the 'struct Pattern' specifying the operation to perform
* @param tc scheduler context
*/
-static void
+static void
start_publish (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -522,7 +522,7 @@ start_publish (void *cls,
* @param cls the 'struct Pattern' specifying the operation to perform
* @param tc scheduler context
*/
-static void
+static void
start_download (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
@@ -563,7 +563,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
NULL);
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (cfg,
+ GNUNET_CONFIGURATION_get_value_number (cfg,
"TESTBED", "PEERID",
&my_peerid))
{
@@ -574,28 +574,28 @@ run (void *cls, char *const *args GNUNET_UNUSED,
return;
}
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (cfg,
+ GNUNET_CONFIGURATION_get_value_number (cfg,
"FSPROFILER", "ANONYMITY_LEVEL",
&anonymity_level))
anonymity_level = 1;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (cfg,
+ GNUNET_CONFIGURATION_get_value_number (cfg,
"FSPROFILER", "REPLICATION_LEVEL",
- &replication_level))
+ &replication_level))
replication_level = 1;
GNUNET_snprintf (myoptname, sizeof (myoptname),
"DOWNLOAD-PATTERN-%u", my_peerid);
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
+ GNUNET_CONFIGURATION_get_value_string (cfg,
"FSPROFILER", myoptname,
- &download_pattern))
+ &download_pattern))
download_pattern = GNUNET_strdup ("");
GNUNET_snprintf (myoptname, sizeof (myoptname),
"PUBLISH-PATTERN-%u", my_peerid);
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
+ GNUNET_CONFIGURATION_get_value_string (cfg,
"FSPROFILER", myoptname,
- &publish_pattern))
+ &publish_pattern))
publish_pattern = GNUNET_strdup ("");
if ( (GNUNET_OK !=
parse_pattern (&download_head,
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c
index 5001d4c34..0938e8316 100644
--- a/src/fs/gnunet-download.c
+++ b/src/fs/gnunet-download.c
@@ -79,9 +79,9 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @param n total size of the download
* @param w desired number of steps in the progress bar
*/
-static void
-display_bar (unsigned long long x,
- unsigned long long n,
+static void
+display_bar (unsigned long long x,
+ unsigned long long n,
unsigned int w)
{
char buf[w + 20];
@@ -142,7 +142,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
{
s = GNUNET_strdup (GNUNET_STRINGS_relative_time_to_string (info->value.download.eta,
GNUNET_YES));
- if (info->value.download.specifics.progress.block_download_duration.rel_value_us
+ if (info->value.download.specifics.progress.block_download_duration.rel_value_us
== GNUNET_TIME_UNIT_FOREVER_REL.rel_value_us)
s2 = _("<unknown time>");
else
diff --git a/src/fs/gnunet-fs-profiler.c b/src/fs/gnunet-fs-profiler.c
index 33b293055..56a3084cc 100644
--- a/src/fs/gnunet-fs-profiler.c
+++ b/src/fs/gnunet-fs-profiler.c
@@ -20,7 +20,7 @@
/**
* @file fs/gnunet-fs-profiler.c
- * @brief tool to benchmark/profile file-sharing
+ * @brief tool to benchmark/profile file-sharing
* @author Christian Grothoff
*/
#include "platform.h"
@@ -137,7 +137,7 @@ terminate_task (void *cls,
* failed
*/
static void
-test_master (void *cls,
+test_master (void *cls,
struct GNUNET_TESTBED_RunHandle *h,
unsigned int num_peers,
struct GNUNET_TESTBED_Peer **peers,
@@ -152,7 +152,7 @@ test_master (void *cls,
terminate_taskid = GNUNET_SCHEDULER_add_delayed (timeout,
&terminate_task, NULL);
else
- terminate_taskid = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+ terminate_taskid = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&terminate_task,
NULL);
}
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c
index cc58f62b5..214650b0f 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -125,8 +125,8 @@ add_to_md (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
memcpy (zdata, data, data_len);
zdata[data_len] = '\0';
(void) GNUNET_CONTAINER_meta_data_insert (md, plugin_name, type, format,
- data_mime_type, zdata, data_len + 1);
- }
+ data_mime_type, zdata, data_len + 1);
+ }
else
{
(void) GNUNET_CONTAINER_meta_data_insert (md, plugin_name, type, format,
@@ -141,7 +141,7 @@ add_to_md (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
*
* @param tree tree to free
*/
-static void
+static void
free_tree (struct ScanTreeNode *tree)
{
struct ScanTreeNode *pos;
@@ -151,7 +151,7 @@ free_tree (struct ScanTreeNode *tree)
if (NULL != tree->parent)
GNUNET_CONTAINER_DLL_remove (tree->parent->children_head,
tree->parent->children_tail,
- tree);
+ tree);
GNUNET_free (tree->filename);
GNUNET_free (tree);
}
@@ -205,7 +205,7 @@ write_message (uint16_t message_type,
struct GNUNET_MessageHeader hdr;
#if 0
- fprintf (stderr,
+ fprintf (stderr,
"Helper sends %u-byte message of type %u\n",
(unsigned int) (sizeof (struct GNUNET_MessageHeader) + data_length),
(unsigned int) message_type);
@@ -295,7 +295,7 @@ scan_callback (void *cls,
*
* @param filename file or directory to scan
* @param dst where to store the resulting share tree item;
- * NULL is stored in @a dst upon recoverable errors (#GNUNET_OK is returned)
+ * NULL is stored in @a dst upon recoverable errors (#GNUNET_OK is returned)
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
static int
@@ -323,7 +323,7 @@ preprocess_file (const char *filename,
/* Report the progress */
if (GNUNET_OK !=
- write_message (S_ISDIR (sbuf.st_mode)
+ write_message (S_ISDIR (sbuf.st_mode)
? GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY
: GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_FILE,
filename, strlen (filename) + 1))
@@ -338,9 +338,9 @@ preprocess_file (const char *filename,
rc.parent = item;
rc.stop = GNUNET_NO;
- GNUNET_DISK_directory_scan (filename,
- &scan_callback,
- &rc);
+ GNUNET_DISK_directory_scan (filename,
+ &scan_callback,
+ &rc);
if ( (GNUNET_YES == rc.stop) ||
(GNUNET_OK !=
write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_PROGRESS_DIRECTORY,
@@ -363,7 +363,7 @@ preprocess_file (const char *filename,
*/
static int
extract_files (struct ScanTreeNode *item)
-{
+{
struct GNUNET_CONTAINER_MetaData *meta;
ssize_t size;
size_t slen;
@@ -380,7 +380,7 @@ extract_files (struct ScanTreeNode *item)
return GNUNET_SYSERR;
return GNUNET_OK;
}
-
+
/* this is the expensive operation, *afterwards* we'll check for aborts */
meta = GNUNET_CONTAINER_meta_data_create ();
EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta);
@@ -393,7 +393,7 @@ extract_files (struct ScanTreeNode *item)
if (GNUNET_OK !=
write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA,
item->filename, slen))
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
return GNUNET_OK;
}
else if (size > (UINT16_MAX - sizeof (struct GNUNET_MessageHeader) - slen))
@@ -404,7 +404,7 @@ extract_files (struct ScanTreeNode *item)
{
char buf[size + slen];
char *dst = &buf[slen];
-
+
memcpy (buf, item->filename, slen);
size = GNUNET_CONTAINER_meta_data_serialize (meta,
&dst, size,
@@ -417,7 +417,7 @@ extract_files (struct ScanTreeNode *item)
GNUNET_CONTAINER_meta_data_destroy (meta);
if (GNUNET_OK !=
write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA,
- buf,
+ buf,
slen + size))
return GNUNET_SYSERR;
}
@@ -456,7 +456,7 @@ ignore_sigpipe ()
* @param flags flags to use (O_RDONLY or O_WRONLY)
*/
static void
-make_dev_zero (int fd,
+make_dev_zero (int fd,
int flags)
{
int z;
@@ -483,7 +483,7 @@ make_dev_zero (int fd,
* otherwise custom plugins to load from LE
* @return 0 on success
*/
-int
+int
main (int argc,
char *const *argv)
{
@@ -502,7 +502,7 @@ main (int argc,
output_stream = 1; /* stdout */
#else
ignore_sigpipe ();
- /* move stdout to some other FD for IPC, bind
+ /* move stdout to some other FD for IPC, bind
stdout/stderr to /dev/null */
output_stream = dup (1);
make_dev_zero (1, O_WRONLY);
@@ -512,7 +512,7 @@ main (int argc,
/* parse command line */
if ( (3 != argc) && (2 != argc) )
{
- FPRINTF (stderr,
+ FPRINTF (stderr,
"%s",
"gnunet-helper-fs-publish needs exactly one or two arguments\n");
#if WINDOWS
@@ -532,7 +532,7 @@ main (int argc,
}
/* scan tree to find out how much work there is to be done */
- if (GNUNET_OK != preprocess_file (filename_expanded,
+ if (GNUNET_OK != preprocess_file (filename_expanded,
&root))
{
(void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0);
@@ -542,7 +542,7 @@ main (int argc,
#endif
return 2;
}
- /* signal that we're done counting files, so that a percentage of
+ /* signal that we're done counting files, so that a percentage of
progress can now be calculated */
if (GNUNET_OK !=
write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0))
@@ -551,7 +551,7 @@ main (int argc,
#if WINDOWS
GNUNET_free ((void*) argv);
#endif
- return 3;
+ return 3;
}
if (NULL != root)
{
@@ -572,7 +572,7 @@ main (int argc,
(void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0);
EXTRACTOR_plugin_remove_all (plugins);
#if WINDOWS
- GNUNET_free ((void*) argv);
+ GNUNET_free ((void*) argv);
#endif
return 0;
}
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index f960503c2..83dd45a28 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -169,7 +169,7 @@ do_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_CONTAINER_meta_data_destroy (meta);
meta = NULL;
- }
+ }
}
@@ -187,7 +187,7 @@ stop_scanner_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_FS_directory_scan_abort (ds);
ds = NULL;
- }
+ }
if (NULL != identity)
{
GNUNET_IDENTITY_disconnect (identity);
@@ -477,7 +477,7 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item)
if (GNUNET_YES == item->is_directory)
{
GNUNET_CONTAINER_meta_data_delete (item->meta,
- EXTRACTOR_METATYPE_MIMETYPE,
+ EXTRACTOR_METATYPE_MIMETYPE,
NULL, 0);
GNUNET_FS_meta_data_make_directory (item->meta);
if (NULL == item->ksk_uri)
@@ -488,9 +488,9 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item)
else
GNUNET_FS_uri_ksk_add_keyword (item->ksk_uri, GNUNET_FS_DIRECTORY_MIME,
GNUNET_NO);
- fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL,
+ fi = GNUNET_FS_file_information_create_empty_directory (ctx, NULL,
item->ksk_uri,
- item->meta,
+ item->meta,
&bo, item->filename);
for (child = item->children_head; child; child = child->next)
{
@@ -500,9 +500,9 @@ get_file_information (struct GNUNET_FS_ShareTreeItem *item)
}
else
{
- fi = GNUNET_FS_file_information_create_from_file (ctx, NULL,
+ fi = GNUNET_FS_file_information_create_from_file (ctx, NULL,
item->filename,
- item->ksk_uri, item->meta,
+ item->ksk_uri, item->meta,
!do_insert,
&bo);
}
@@ -542,7 +542,7 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result)
priv = NULL;
else
priv = GNUNET_IDENTITY_ego_get_private_key (namespace);
- pc = GNUNET_FS_publish_start (ctx, fi,
+ pc = GNUNET_FS_publish_start (ctx, fi,
priv, this_id, next_id,
(do_simulate) ?
GNUNET_FS_PUBLISH_OPTION_SIMULATE_ONLY :
@@ -569,8 +569,8 @@ directory_trim_complete (struct GNUNET_FS_ShareTreeItem *directory_scan_result)
* @param reason kind of progress we are making
*/
static void
-directory_scan_cb (void *cls,
- const char *filename,
+directory_scan_cb (void *cls,
+ const char *filename,
int is_directory,
enum GNUNET_FS_DirScannerProgressUpdateReason reason)
{
@@ -584,21 +584,21 @@ directory_scan_cb (void *cls,
if (is_directory == GNUNET_YES)
FPRINTF (stdout, _("Scanning directory `%s'.\n"), filename);
else
- FPRINTF (stdout, _("Scanning file `%s'.\n"), filename);
+ FPRINTF (stdout, _("Scanning file `%s'.\n"), filename);
}
break;
case GNUNET_FS_DIRSCANNER_FILE_IGNORED:
- FPRINTF (stderr,
+ FPRINTF (stderr,
_("There was trouble processing file `%s', skipping it.\n"),
filename);
break;
case GNUNET_FS_DIRSCANNER_ALL_COUNTED:
if (verbose)
- FPRINTF (stdout, "%s", _("Preprocessing complete.\n"));
+ FPRINTF (stdout, "%s", _("Preprocessing complete.\n"));
break;
case GNUNET_FS_DIRSCANNER_EXTRACT_FINISHED:
if (verbose > 2)
- FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename);
+ FPRINTF (stdout, _("Extracting meta data from file `%s' complete.\n"), filename);
break;
case GNUNET_FS_DIRSCANNER_FINISHED:
if (verbose > 1)
@@ -630,7 +630,7 @@ directory_scan_cb (void *cls,
* has been initialized.
*
* @param args0 filename to publish
- */
+ */
static void
identity_continuation (const char *args0)
{
@@ -673,8 +673,8 @@ identity_continuation (const char *args0)
return;
}
ds = GNUNET_FS_directory_scan_start (args0,
- disable_extractor,
- ex,
+ disable_extractor,
+ ex,
&directory_scan_cb, NULL);
if (NULL == ds)
{
@@ -706,7 +706,7 @@ identity_cb (void *cls,
{
const char *args0 = cls;
- if (NULL == ego)
+ if (NULL == ego)
{
identity_continuation (args0);
return;
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 8ecb6bb67..0e38d0dc9 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -248,7 +248,7 @@ update_latencies (void *cls,
int active,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
- const struct GNUNET_ATS_Information *ats,
+ const struct GNUNET_ATS_Information *ats,
uint32_t ats_count)
{
unsigned int i;
@@ -270,7 +270,7 @@ update_latencies (void *cls,
gettext_noop
("# running average P2P latency (ms)"),
GSF_avg_latency.rel_value_us / 1000LL, GNUNET_NO);
- break;
+ break;
}
}
@@ -416,7 +416,7 @@ start_p2p_processing (void *cls, struct GSF_PendingRequest *pr,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Considering mesh-based download for block\n");
GSF_mesh_lookup_ (pr);
- break;
+ break;
case GNUNET_BLOCK_TYPE_FS_UBLOCK:
/* the above block types are in the DHT */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -625,7 +625,7 @@ main_init (struct GNUNET_SERVER_Handle *server,
anon_p2p_off = (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno (GSF_cfg,
"fs",
- "DISABLE_ANON_TRANSFER"));
+ "DISABLE_ANON_TRANSFER"));
GSF_core =
GNUNET_CORE_connect (GSF_cfg, NULL, &peer_init_handler,
&peer_connect_handler, &GSF_peer_disconnect_handler_,
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index a9e950363..593250e2c 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -328,9 +328,9 @@ get_respect_filename (const struct GNUNET_PeerIdentity *id)
{
char *fn;
- GNUNET_asprintf (&fn,
- "%s%s%s",
- respectDirectory,
+ GNUNET_asprintf (&fn,
+ "%s%s%s",
+ respectDirectory,
DIR_SEPARATOR_STR,
GNUNET_i2s_full (id));
return fn;
@@ -542,7 +542,7 @@ ats_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Reserved %d bytes / need to wait %s for reservation\n",
- (int) amount,
+ (int) amount,
GNUNET_STRINGS_relative_time_to_string (res_delay, GNUNET_YES));
cp->rc = NULL;
if (0 == amount)
@@ -597,7 +597,7 @@ GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer)
GNUNET_free (fn);
cp->request_map = GNUNET_CONTAINER_multihashmap_create (128, GNUNET_NO);
GNUNET_break (GNUNET_OK ==
- GNUNET_CONTAINER_multipeermap_put (cp_map,
+ GNUNET_CONTAINER_multipeermap_put (cp_map,
GSF_connected_peer_get_identity2_ (cp),
cp,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
@@ -682,7 +682,7 @@ GSF_handle_p2p_migration_stop_ (void *cls,
bt = GNUNET_TIME_relative_ntoh (msm->duration);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Migration of content to peer `%s' blocked for %s\n"),
- GNUNET_i2s (other),
+ GNUNET_i2s (other),
GNUNET_STRINGS_relative_time_to_string (bt, GNUNET_YES));
cp->ppd.migration_blocked_until = GNUNET_TIME_relative_to_absolute (bt);
if (GNUNET_SCHEDULER_NO_TASK == cp->mig_revive_task)
@@ -1254,7 +1254,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
{
pr = peerreq->pr;
prd = GSF_pending_request_get_data_ (pr);
- if (prd->type == type)
+ if (prd->type == type)
{
if (prd->ttl.abs_value_us >= GNUNET_TIME_absolute_get ().abs_value_us + ttl * 1000LL)
{
@@ -1278,7 +1278,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
peerreq = GNUNET_new (struct PeerRequest);
peerreq->cp = cp;
- pr = GSF_pending_request_create_ (options, type, &gm->query,
+ pr = GSF_pending_request_create_ (options, type, &gm->query,
target,
(bfsize >
0) ? (const char *) &opt[bits] : NULL,
@@ -1813,8 +1813,8 @@ GSF_connected_peer_init_ ()
* @return #GNUNET_YES (we should continue to iterate)
*/
static int
-clean_peer (void *cls,
- const struct GNUNET_PeerIdentity *key,
+clean_peer (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
GSF_peer_disconnect_handler_ (NULL, key);
@@ -1846,8 +1846,8 @@ GSF_connected_peer_done_ ()
* @return #GNUNET_YES (we should continue to iterate)
*/
static int
-clean_local_client (void *cls,
- const struct GNUNET_PeerIdentity *key,
+clean_local_client (void *cls,
+ const struct GNUNET_PeerIdentity *key,
void *value)
{
const struct GSF_LocalClient *lc = cls;
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c
index c8e9d636e..4f5b547ae 100644
--- a/src/fs/gnunet-service-fs_indexing.c
+++ b/src/fs/gnunet-service-fs_indexing.c
@@ -236,7 +236,7 @@ signal_index_ok (struct IndexInfo *ii)
_
("Index request received for file `%s' is already indexed as `%s'. Permitting anyway.\n"),
ii->filename,
- ir->filename);
+ ir->filename);
GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0,
GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES);
@@ -468,7 +468,7 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
* @param msg error message
*/
static void
-remove_cont (void *cls, int success,
+remove_cont (void *cls, int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 8066b264a..6d62085e6 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -375,7 +375,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
if (0 != (SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY & ntohl (sm->options)))
options |= GSF_PRO_LOCAL_ONLY;
cr->pr = GSF_pending_request_create_ (options, type,
- &sm->query,
+ &sm->query,
(0 !=
memcmp (&sm->target, &all_zeros,
sizeof (struct GNUNET_HashCode)))
diff --git a/src/fs/gnunet-service-fs_mesh.h b/src/fs/gnunet-service-fs_mesh.h
index f136940aa..5decb242a 100644
--- a/src/fs/gnunet-service-fs_mesh.h
+++ b/src/fs/gnunet-service-fs_mesh.h
@@ -34,7 +34,7 @@ struct GSF_MeshRequest;
/**
* Function called with a reply from the mesh.
- *
+ *
* @param cls closure
* @param type type of the block, ANY on error
* @param expiration expiration time for the block
diff --git a/src/fs/gnunet-service-fs_mesh_client.c b/src/fs/gnunet-service-fs_mesh_client.c
index ffc3c6179..73ab6bb5d 100644
--- a/src/fs/gnunet-service-fs_mesh_client.c
+++ b/src/fs/gnunet-service-fs_mesh_client.c
@@ -44,7 +44,7 @@
#define CLIENT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
-/**
+/**
* Handle for a mesh to another peer.
*/
struct MeshHandle;
@@ -99,7 +99,7 @@ struct GSF_MeshRequest
};
-/**
+/**
* Handle for a mesh to another peer.
*/
struct MeshHandle
@@ -127,12 +127,12 @@ struct MeshHandle
/**
* Handle for active write operation, or NULL.
- */
+ */
struct GNUNET_MESH_TransmitHandle *wh;
/**
* Which peer does this mesh go to?
- */
+ */
struct GNUNET_PeerIdentity target;
/**
@@ -177,7 +177,7 @@ transmit_pending (struct MeshHandle *mh);
/**
- * Iterator called on each entry in a waiting map to
+ * Iterator called on each entry in a waiting map to
* move it back to the pending list.
*
* @param cls the 'struct MeshHandle'
@@ -192,7 +192,7 @@ move_to_pending (void *cls,
{
struct MeshHandle *mh = cls;
struct GSF_MeshRequest *sr = value;
-
+
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (mh->waiting_map,
key,
@@ -342,7 +342,7 @@ transmit_sqm (void *cls,
transmit_pending (mh);
return sizeof (sqm);
}
-
+
/**
* Transmit pending requests via the mesh.
@@ -371,7 +371,7 @@ struct HandleReplyClosure
/**
* Reply payload.
- */
+ */
const void *data;
/**
@@ -384,11 +384,11 @@ struct HandleReplyClosure
*/
size_t data_size;
- /**
+ /**
* Type of the block.
*/
enum GNUNET_BLOCK_Type type;
-
+
/**
* Did we have a matching query?
*/
@@ -397,7 +397,7 @@ struct HandleReplyClosure
/**
- * Iterator called on each entry in a waiting map to
+ * Iterator called on each entry in a waiting map to
* process a result.
*
* @param cls the 'struct HandleReplyClosure'
@@ -412,7 +412,7 @@ handle_reply (void *cls,
{
struct HandleReplyClosure *hrc = cls;
struct GSF_MeshRequest *sr = value;
-
+
sr->proc (sr->proc_cls,
hrc->type,
hrc->expiration,
@@ -462,7 +462,7 @@ reply_cb (void *cls,
type,
&srm[1], msize, &query))
{
- GNUNET_break_op (0);
+ GNUNET_break_op (0);
reset_mesh_async (mh);
return GNUNET_SYSERR;
}
@@ -611,7 +611,7 @@ GSF_mesh_query_cancel (struct GSF_MeshRequest *sr)
/**
- * Iterator called on each entry in a waiting map to
+ * Iterator called on each entry in a waiting map to
* call the 'proc' continuation and release associated
* resources.
*
@@ -641,7 +641,7 @@ free_waiting_entry (void *cls,
*
* @param cls NULL
* @param tunnel tunnel of the disconnecting client
- * @param tunnel_ctx our 'struct MeshClient'
+ * @param tunnel_ctx our 'struct MeshClient'
*/
static void
cleaner_cb (void *cls,
diff --git a/src/fs/gnunet-service-fs_mesh_server.c b/src/fs/gnunet-service-fs_mesh_server.c
index 206ff6e75..e732da990 100644
--- a/src/fs/gnunet-service-fs_mesh_server.c
+++ b/src/fs/gnunet-service-fs_mesh_server.c
@@ -72,22 +72,22 @@ struct MeshClient
{
/**
* DLL
- */
+ */
struct MeshClient *next;
/**
* DLL
- */
+ */
struct MeshClient *prev;
/**
* Tunnel for communication.
- */
+ */
struct GNUNET_MESH_Tunnel *tunnel;
/**
* Handle for active write operation, or NULL.
- */
+ */
struct GNUNET_MESH_TransmitHandle *wh;
/**
@@ -99,7 +99,7 @@ struct MeshClient
* Tail of write queue.
*/
struct WriteQueueItem *wqi_tail;
-
+
/**
* Current active request to the datastore, if we have one pending.
*/
@@ -117,7 +117,7 @@ struct MeshClient
/**
* Size of the last write that was initiated.
- */
+ */
size_t reply_size;
};
@@ -130,12 +130,12 @@ static struct GNUNET_MESH_Handle *listen_tunnel;
/**
* Head of DLL of mesh clients.
- */
+ */
static struct MeshClient *sc_head;
/**
* Tail of DLL of mesh clients.
- */
+ */
static struct MeshClient *sc_tail;
/**
@@ -155,7 +155,7 @@ static unsigned long long sc_count_max;
*
* @param cls the 'struct MeshClient'
* @param tc scheduler context
- */
+ */
static void
timeout_mesh_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -182,7 +182,7 @@ static void
refresh_timeout_task (struct MeshClient *sc)
{
if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task)
- GNUNET_SCHEDULER_cancel (sc->timeout_task);
+ GNUNET_SCHEDULER_cancel (sc->timeout_task);
sc->timeout_task = GNUNET_SCHEDULER_add_delayed (IDLE_TIMEOUT,
&timeout_mesh_task,
sc);
@@ -291,7 +291,7 @@ continue_writing (struct MeshClient *sc)
}
sc->wh = GNUNET_MESH_notify_transmit_ready (sc->tunnel, GNUNET_NO,
GNUNET_TIME_UNIT_FOREVER_REL,
- wqi->msize,
+ wqi->msize,
&write_continuation,
sc);
if (NULL == sc->wh)
@@ -320,7 +320,7 @@ continue_writing (struct MeshClient *sc)
* @param uid unique identifier for the datum;
* maybe 0 if no unique identifier is available
*/
-static void
+static void
handle_datastore_reply (void *cls,
const struct GNUNET_HashCode *key,
size_t size, const void *data,
@@ -416,7 +416,7 @@ request_cb (void *cls,
0,
&sqm->query,
ntohl (sqm->type),
- 0 /* priority */,
+ 0 /* priority */,
GSF_datastore_queue_size,
GNUNET_TIME_UNIT_FOREVER_REL,
&handle_datastore_reply, sc);
@@ -481,7 +481,7 @@ accept_cb (void *cls,
*
* @param cls NULL
* @param tunnel tunnel of the disconnecting client
- * @param tunnel_ctx our 'struct MeshClient'
+ * @param tunnel_ctx our 'struct MeshClient'
*/
static void
cleaner_cb (void *cls,
@@ -501,9 +501,9 @@ cleaner_cb (void *cls,
gettext_noop ("# mesh connections active"), -1,
GNUNET_NO);
if (GNUNET_SCHEDULER_NO_TASK != sc->terminate_task)
- GNUNET_SCHEDULER_cancel (sc->terminate_task);
+ GNUNET_SCHEDULER_cancel (sc->terminate_task);
if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task)
- GNUNET_SCHEDULER_cancel (sc->timeout_task);
+ GNUNET_SCHEDULER_cancel (sc->timeout_task);
if (NULL != sc->wh)
GNUNET_MESH_notify_transmit_ready_cancel (sc->wh);
if (NULL != sc->qe)
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index 9e92be2ed..607eb6122 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -57,7 +57,7 @@ struct PeerPlan;
* are stored in a 'struct GSF_RequestPlan'. (We need
* to be able to lookup all pending requests corresponding
* to a given plan entry.)
- *
+ *
* Similarly head and tail of the "PR" MDLL are stored
* with the 'struct GSF_PendingRequest'. (We need
* to be able to lookup all plan entries corresponding
@@ -360,7 +360,7 @@ get_latest (const struct GSF_RequestPlan *rp)
if (NULL == bi)
return NULL; /* should never happen */
ret = bi->pr;
- bi = bi->next_PE;
+ bi = bi->next_PE;
while (NULL != bi)
{
if (GSF_pending_request_get_data_ (bi->pr)->ttl.abs_value_us >
@@ -594,7 +594,7 @@ GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr)
pp->delay_heap =
GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
pp->cp = cp;
- GNUNET_CONTAINER_multipeermap_put (plans,
+ GNUNET_CONTAINER_multipeermap_put (plans,
id, pp,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
}
diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h
index d1362675c..22b760922 100644
--- a/src/fs/gnunet-service-fs_pe.h
+++ b/src/fs/gnunet-service-fs_pe.h
@@ -68,7 +68,7 @@ GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
* @return GNUNET_YES if 'result' was changed, GNUNET_NO otherwise.
*/
int
-GSF_request_plan_reference_get_last_transmission_ (struct GSF_PendingRequestPlanBijection *pr_head,
+GSF_request_plan_reference_get_last_transmission_ (struct GSF_PendingRequestPlanBijection *pr_head,
struct GSF_ConnectedPeer *sender,
struct GNUNET_TIME_Absolute *result);
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index b624f536c..9171bfc2a 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -367,7 +367,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
{
refresh_bloomfilter (pr);
}
- GNUNET_CONTAINER_multihashmap_put (pr_map,
+ GNUNET_CONTAINER_multihashmap_put (pr_map,
&pr->public_data.query, pr,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
if (0 == (options & GSF_PRO_REQUEST_NEVER_EXPIRES))
@@ -482,7 +482,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
}
}
}
- if (NULL != pr->gh)
+ if (NULL != pr->gh)
GNUNET_DHT_get_filter_known_results (pr->gh,
replies_seen_count,
replies_seen);
@@ -828,8 +828,8 @@ process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
GNUNET_TIME_absolute_get_duration (pr->
public_data.start_time).rel_value_us);
if (GNUNET_YES !=
- GSF_request_plan_reference_get_last_transmission_ (pr->public_data.pr_head,
- prq->sender,
+ GSF_request_plan_reference_get_last_transmission_ (pr->public_data.pr_head,
+ prq->sender,
&last_transmission))
last_transmission.abs_value_us = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
/* pass on to other peers / local clients */
@@ -890,10 +890,10 @@ process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
prq->request_found = GNUNET_YES;
/* finally, pass on to other peer / local client */
if (! GSF_request_plan_reference_get_last_transmission_ (pr->public_data.pr_head,
- prq->sender,
+ prq->sender,
&last_transmission))
last_transmission.abs_value_us = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
- pr->rh (pr->rh_cls, prq->eval, pr,
+ pr->rh (pr->rh_cls, prq->eval, pr,
prq->anonymity_level, prq->expiration,
last_transmission, prq->type, prq->data, prq->size);
return GNUNET_YES;
@@ -934,7 +934,7 @@ struct PutMigrationContext
* @param msg NULL on success, otherwise an error message
*/
static void
-put_migration_continuation (void *cls, int success,
+put_migration_continuation (void *cls, int success,
struct GNUNET_TIME_Absolute min_expiration,
const char *msg)
{
@@ -947,13 +947,13 @@ put_migration_continuation (void *cls, int success,
{
if (GNUNET_SYSERR != success)
{
- GNUNET_LOAD_update (datastore_put_load,
+ GNUNET_LOAD_update (datastore_put_load,
GNUNET_TIME_absolute_get_duration (pmc->start).rel_value_us);
}
else
{
/* on queue failure / timeout, increase the put load dramatically */
- GNUNET_LOAD_update (datastore_put_load,
+ GNUNET_LOAD_update (datastore_put_load,
GNUNET_TIME_UNIT_MINUTES.rel_value_us);
}
}
@@ -968,17 +968,17 @@ put_migration_continuation (void *cls, int success,
GNUNET_free (pmc);
return;
}
- if ( (GNUNET_NO == success) &&
- (GNUNET_NO == pmc->requested) &&
+ if ( (GNUNET_NO == success) &&
+ (GNUNET_NO == pmc->requested) &&
(NULL != cp) )
{
ppd = GSF_get_peer_performance_data_ (cp);
if (min_expiration.abs_value_us > 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking to stop migration for %s because datastore is full\n",
GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_expiration), GNUNET_YES));
- GSF_block_peer_migration_ (cp, min_expiration);
+ GSF_block_peer_migration_ (cp, min_expiration);
}
else
{
@@ -989,7 +989,7 @@ put_migration_continuation (void *cls, int success,
mig_pause.rel_value_us = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
ppd->migration_delay.rel_value_us);
ppd->migration_delay = GNUNET_TIME_relative_multiply (ppd->migration_delay, 2);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Replicated content already exists locally, asking to stop migration for %s\n",
GNUNET_STRINGS_relative_time_to_string (mig_pause, GNUNET_YES));
GSF_block_peer_migration_ (cp, GNUNET_TIME_relative_to_absolute (mig_pause));
@@ -1123,12 +1123,12 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
xquery_size += sizeof (struct GNUNET_PeerIdentity);
}
pr->gh =
- GNUNET_DHT_get_start (GSF_dht,
+ GNUNET_DHT_get_start (GSF_dht,
pr->public_data.type, &pr->public_data.query,
DHT_GET_REPLICATION,
GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
xquery, xquery_size, &handle_dht_reply, pr);
- if ( (NULL != pr->gh) &&
+ if ( (NULL != pr->gh) &&
(0 != pr->replies_seen_count) )
GNUNET_DHT_get_filter_known_results (pr->gh,
pr->replies_seen_count,
@@ -1138,7 +1138,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
/**
* Function called with a reply from the mesh.
- *
+ *
* @param cls the pending request struct
* @param type type of the block, ANY on error
* @param expiration expiration time for the block
@@ -1698,7 +1698,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
test_put_load_too_high (prq.priority));
}
putl = GNUNET_LOAD_get_load (datastore_put_load);
- if ( (NULL != cp) &&
+ if ( (NULL != cp) &&
(GNUNET_NO == prq.request_found) &&
( (GNUNET_YES != active_to_migration) ||
(putl > 2.5 * (1 + prq.priority)) ) )
@@ -1711,7 +1711,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
GNUNET_CRYPTO_random_u32
(GNUNET_CRYPTO_QUALITY_WEAK,
(unsigned int) (60000 * putl * putl)));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking to stop migration for %s because of load %f and events %d/%d\n",
GNUNET_STRINGS_relative_time_to_string (block_time,
GNUNET_YES),
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c
index ef796f559..8e9d70f72 100644
--- a/src/fs/gnunet-service-fs_put.c
+++ b/src/fs/gnunet-service-fs_put.c
@@ -178,10 +178,10 @@ delay_dht_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* maybe 0 if no unique identifier is available
*/
static void
-process_dht_put_content (void *cls,
- const struct GNUNET_HashCode * key,
+process_dht_put_content (void *cls,
+ const struct GNUNET_HashCode * key,
size_t size,
- const void *data,
+ const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
diff --git a/src/fs/perf_gnunet_service_fs_p2p.c b/src/fs/perf_gnunet_service_fs_p2p.c
index 61356a644..2462bb3f2 100644
--- a/src/fs/perf_gnunet_service_fs_p2p.c
+++ b/src/fs/perf_gnunet_service_fs_p2p.c
@@ -124,7 +124,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
* Function that gathers stats from all daemons.
*/
static void
-stat_run (void *cls,
+stat_run (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
const char *emsg);
@@ -147,7 +147,7 @@ get_done (void *cls, int success)
/**
* Adapter function called to establish a connection to
* statistics service.
- *
+ *
* @param cls closure
* @param cfg configuration of the peer to connect to; will be available until
* GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -166,11 +166,11 @@ statistics_connect_adapter (void *cls,
/**
* Adapter function called to destroy a connection to
* statistics service.
- *
+ *
* @param cls closure
* @param op_result service handle returned from the connect adapter
*/
-static void
+static void
statistics_disconnect_adapter (void *cls,
void *op_result)
{
@@ -182,7 +182,7 @@ statistics_disconnect_adapter (void *cls,
* Function that gathers stats from all daemons.
*/
static void
-stat_run (void *cls,
+stat_run (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
const char *emsg)
@@ -244,12 +244,12 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_DISK_directory_remove (fn);
GNUNET_free (fn);
}
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Timeout during download, shutting down with error\n");
ok = 1;
- GNUNET_SCHEDULER_shutdown ();
+ GNUNET_SCHEDULER_shutdown ();
return;
}
@@ -276,7 +276,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-do_download (void *cls,
+do_download (void *cls,
const struct GNUNET_FS_Uri *uri,
const char *fn)
{
@@ -298,7 +298,7 @@ do_download (void *cls,
else
anonymity = 1;
GNUNET_FS_TEST_download (daemons[0], TIMEOUT, anonymity, SEED, uri, VERBOSE,
- &do_report,
+ &do_report,
(NULL == fn) ? NULL : GNUNET_strdup (fn));
}
@@ -314,7 +314,7 @@ do_publish (void *cls,
unsigned int i;
int do_index;
int anonymity;
-
+
GNUNET_assert (NUM_DAEMONS == num_peers);
for (i=0;i<num_peers;i++)
daemons[i] = peers[i];
diff --git a/src/fs/perf_gnunet_service_fs_p2p_respect.c b/src/fs/perf_gnunet_service_fs_p2p_respect.c
index 8790dcc75..b2471a8b4 100644
--- a/src/fs/perf_gnunet_service_fs_p2p_respect.c
+++ b/src/fs/perf_gnunet_service_fs_p2p_respect.c
@@ -178,7 +178,7 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
* Function that gathers stats from all daemons.
*/
static void
-stat_run (void *cls,
+stat_run (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
const char *emsg);
@@ -202,7 +202,7 @@ get_done (void *cls, int success)
/**
* Adapter function called to establish a connection to
* statistics service.
- *
+ *
* @param cls closure
* @param cfg configuration of the peer to connect to; will be available until
* GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -221,11 +221,11 @@ statistics_connect_adapter (void *cls,
/**
* Adapter function called to destroy a connection to
* statistics service.
- *
+ *
* @param cls closure
* @param op_result service handle returned from the connect adapter
*/
-static void
+static void
statistics_disconnect_adapter (void *cls,
void *op_result)
{
@@ -237,7 +237,7 @@ statistics_disconnect_adapter (void *cls,
* Function that gathers stats from all daemons.
*/
static void
-stat_run (void *cls,
+stat_run (void *cls,
struct GNUNET_TESTBED_Operation *op,
void *ca_result,
const char *emsg)
@@ -362,7 +362,7 @@ do_downloads (void *cls, const struct GNUNET_FS_Uri *u2,
static void
-do_publish2 (void *cls,
+do_publish2 (void *cls,
const struct GNUNET_FS_Uri *u1,
const char *fn)
{
@@ -398,7 +398,7 @@ do_publish2 (void *cls,
static void
-do_publish1 (void *cls,
+do_publish1 (void *cls,
struct GNUNET_TESTBED_Operation *op,
const char *emsg)
{
@@ -433,7 +433,7 @@ do_publish1 (void *cls,
static void
-do_connect (void *cls,
+do_connect (void *cls,
struct GNUNET_TESTBED_RunHandle *h,
unsigned int num_peers,
struct GNUNET_TESTBED_Peer **peers,
@@ -443,7 +443,7 @@ do_connect (void *cls,
static unsigned int coco;
unsigned int i;
unsigned int j;
-
+
GNUNET_assert (NUM_DAEMONS == num_peers);
for (i=0;i<num_peers;i++)
daemons[i] = peers[i];
diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c
index c069875cf..52652dbd3 100644
--- a/src/fs/test_fs_download.c
+++ b/src/fs/test_fs_download.c
@@ -146,8 +146,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
(1 +
GNUNET_TIME_absolute_get_duration
(start).rel_value_us) / 1024LL));
- GAUGER ("FS",
- (GNUNET_YES == indexed)
+ GAUGER ("FS",
+ (GNUNET_YES == indexed)
? "Publishing speed (indexing)"
: "Publishing speed (insertion)",
(unsigned long long) (FILESIZE * 1000000LL /
@@ -160,7 +160,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
GNUNET_FS_download_start (fs,
event->value.publish.specifics.
completed.chk_uri, NULL, fn, NULL, 0,
- FILESIZE, anonymity_level,
+ FILESIZE, anonymity_level,
GNUNET_FS_DOWNLOAD_OPTION_NONE,
"download", NULL);
GNUNET_assert (download != NULL);
@@ -173,8 +173,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
GNUNET_TIME_absolute_get_duration
(start).rel_value_us) / 1024LL));
GAUGER ("FS",
- (GNUNET_YES == indexed)
- ? "Local download speed (indexed)"
+ (GNUNET_YES == indexed)
+ ? "Local download speed (indexed)"
: "Local download speed (inserted)",
(unsigned long long) (FILESIZE * 1000000LL /
(1 +
diff --git a/src/fs/test_fs_download_persistence.c b/src/fs/test_fs_download_persistence.c
index b380fd4af..7c9c8c227 100644
--- a/src/fs/test_fs_download_persistence.c
+++ b/src/fs/test_fs_download_persistence.c
@@ -276,7 +276,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
static void
-run (void *cls,
+run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_TESTING_Peer *peer)
{
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index 11c611e04..b0358e809 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -281,8 +281,8 @@ testNamespace ()
bo.expiration_time =
GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_MINUTES);
sks_uri = GNUNET_FS_uri_sks_create (&nsid, "root");