aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2017-07-03 10:31:57 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2017-07-03 10:31:57 +0200
commitf599b93d5b402cfa795aaf7bd7057d76c5e57d67 (patch)
tree0f953e5343e27e91e47f7ccc72756207437d023e
parentd80df28d5f4814f93b8aa536a1064c77e3d659cc (diff)
parent6cc0e50715eb97baac69c05141f3f3bb3df4ec75 (diff)
downloadgnunet-f599b93d5b402cfa795aaf7bd7057d76c5e57d67.tar.gz
gnunet-f599b93d5b402cfa795aaf7bd7057d76c5e57d67.zip
Merge remote-tracking branch 'origin/master' into credentials
-rw-r--r--src/block/block.c5
-rw-r--r--src/cadet/cadet_api.c2
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c2
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c4
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.c4
-rw-r--r--src/core/test_core_quota_peer1.conf4
-rw-r--r--src/core/test_core_quota_peer2.conf4
-rw-r--r--src/datacache/datacache.c6
-rw-r--r--src/datacache/plugin_datacache_postgres.c10
-rw-r--r--src/dht/Makefile.am4
-rw-r--r--src/dht/test_dht_tools.py.in13
-rw-r--r--src/exit/gnunet-daemon-exit.c15
-rw-r--r--src/include/gnunet_configuration_lib.h6
-rw-r--r--src/integration-tests/confs/c_bootstrap_server.conf2
-rw-r--r--src/integration-tests/confs/c_nat_client.conf2
-rw-r--r--src/integration-tests/confs/c_no_nat_client.conf2
-rw-r--r--src/integration-tests/confs/c_no_nat_client_2.conf2
-rw-r--r--src/nat-auto/gnunet-service-nat-auto.c2
-rw-r--r--src/nat-auto/nat_auto_api.c2
-rw-r--r--src/pq/pq_result_helper.c30
-rw-r--r--src/psycstore/plugin_psycstore_postgres.c29
-rw-r--r--src/set/gnunet-service-set_union.c4
-rw-r--r--src/testbed/gnunet-helper-testbed.c5
-rw-r--r--src/testbed/testbed_api.c5
-rw-r--r--src/testbed/testbed_api_hosts.c5
-rw-r--r--src/topology/gnunet-daemon-topology.c4
-rw-r--r--src/transport/plugin_transport_http_server.c33
-rw-r--r--src/transport/test_quota_compliance.c8
-rw-r--r--src/transport/transport-testing.c5
-rw-r--r--src/util/bandwidth.c23
-rw-r--r--src/util/common_logging.c37
-rw-r--r--src/util/configuration.c29
-rw-r--r--src/util/crypto_ecc_setup.c6
-rw-r--r--src/util/gnunet-service-resolver.c3
-rw-r--r--src/util/resolver_api.c2
-rw-r--r--src/util/test_common_logging_dummy.c4
36 files changed, 218 insertions, 105 deletions
diff --git a/src/block/block.c b/src/block/block.c
index 4b6f3826d..bbf45477c 100644
--- a/src/block/block.c
+++ b/src/block/block.c
@@ -151,10 +151,9 @@ GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg)
151void 151void
152GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx) 152GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx)
153{ 153{
154 unsigned int i;
155 struct Plugin *plugin; 154 struct Plugin *plugin;
156 155
157 for (i = 0; i < ctx->num_plugins; i++) 156 for (unsigned int i = 0; i < ctx->num_plugins; i++)
158 { 157 {
159 plugin = ctx->plugins[i]; 158 plugin = ctx->plugins[i];
160 GNUNET_break (NULL == 159 GNUNET_break (NULL ==
@@ -301,6 +300,8 @@ GNUNET_BLOCK_group_create (struct GNUNET_BLOCK_Context *ctx,
301 300
302 plugin = find_plugin (ctx, 301 plugin = find_plugin (ctx,
303 type); 302 type);
303 if (NULL == plugin)
304 return NULL;
304 if (NULL == plugin->create_group) 305 if (NULL == plugin->create_group)
305 return NULL; 306 return NULL;
306 va_start (ap, 307 va_start (ap,
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index 3fdeffe13..00a482452 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -326,7 +326,7 @@ destroy_channel (struct GNUNET_CADET_Channel *ch)
326 326
327 LOG (GNUNET_ERROR_TYPE_DEBUG, 327 LOG (GNUNET_ERROR_TYPE_DEBUG,
328 "Destroying channel %X of %p\n", 328 "Destroying channel %X of %p\n",
329 ch->ccn, 329 htonl (ch->ccn.channel_of_client),
330 h); 330 h);
331 GNUNET_assert (GNUNET_YES == 331 GNUNET_assert (GNUNET_YES ==
332 GNUNET_CONTAINER_multihashmap32_remove (h->channels, 332 GNUNET_CONTAINER_multihashmap32_remove (h->channels,
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 739b68228..1a2b32be0 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -2049,6 +2049,7 @@ void
2049GCCH_debug (struct CadetChannel *ch, 2049GCCH_debug (struct CadetChannel *ch,
2050 enum GNUNET_ErrorType level) 2050 enum GNUNET_ErrorType level)
2051{ 2051{
2052#if !defined(GNUNET_CULL_LOGGING)
2052 int do_log; 2053 int do_log;
2053 2054
2054 do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK), 2055 do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK),
@@ -2088,6 +2089,7 @@ GCCH_debug (struct CadetChannel *ch,
2088 ntohl (ch->mid_recv.mid), 2089 ntohl (ch->mid_recv.mid),
2089 (unsigned long long) ch->mid_futures, 2090 (unsigned long long) ch->mid_futures,
2090 ntohl (ch->mid_send.mid)); 2091 ntohl (ch->mid_send.mid));
2092#endif
2091} 2093}
2092 2094
2093 2095
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 7b66f61a2..82ab5cc2c 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1066,6 +1066,7 @@ void
1066GCC_debug (struct CadetConnection *cc, 1066GCC_debug (struct CadetConnection *cc,
1067 enum GNUNET_ErrorType level) 1067 enum GNUNET_ErrorType level)
1068{ 1068{
1069#if !defined(GNUNET_CULL_LOGGING)
1069 int do_log; 1070 int do_log;
1070 1071
1071 do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK), 1072 do_log = GNUNET_get_log_call_status (level & (~GNUNET_ERROR_TYPE_BULK),
@@ -1086,6 +1087,7 @@ GCC_debug (struct CadetConnection *cc,
1086 GCPP_2s (cc->path), 1087 GCPP_2s (cc->path),
1087 cc->state, 1088 cc->state,
1088 (GNUNET_YES == cc->mqm_ready) ? "ready" : "busy"); 1089 (GNUNET_YES == cc->mqm_ready) ? "ready" : "busy");
1090#endif
1089} 1091}
1090 1092
1091/* end of gnunet-service-cadet-new_connection.c */ 1093/* end of gnunet-service-cadet_connection.c */
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c
index 28004debc..22e19ef70 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.c
+++ b/src/cadet/gnunet-service-cadet_tunnels.c
@@ -3404,6 +3404,7 @@ void
3404GCT_debug (const struct CadetTunnel *t, 3404GCT_debug (const struct CadetTunnel *t,
3405 enum GNUNET_ErrorType level) 3405 enum GNUNET_ErrorType level)
3406{ 3406{
3407#if !defined(GNUNET_CULL_LOGGING)
3407 struct CadetTConnection *iter_c; 3408 struct CadetTConnection *iter_c;
3408 int do_log; 3409 int do_log;
3409 3410
@@ -3435,7 +3436,8 @@ GCT_debug (const struct CadetTunnel *t,
3435 3436
3436 LOG2 (level, 3437 LOG2 (level,
3437 "TTT TUNNEL END\n"); 3438 "TTT TUNNEL END\n");
3439#endif
3438} 3440}
3439 3441
3440 3442
3441/* end of gnunet-service-cadet-new_tunnels.c */ 3443/* end of gnunet-service-cadet_tunnels.c */
diff --git a/src/core/test_core_quota_peer1.conf b/src/core/test_core_quota_peer1.conf
index b96e7fefd..1807c763a 100644
--- a/src/core/test_core_quota_peer1.conf
+++ b/src/core/test_core_quota_peer1.conf
@@ -25,6 +25,10 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-peerinfo.sock
25PORT = 12475 25PORT = 12475
26UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-transport.sock 26UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-transport.sock
27 27
28[nat]
29port = 12481
30UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-nat.sock
31
28[ats] 32[ats]
29PORT = 12471 33PORT = 12471
30UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock 34UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p1-service-ats.sock
diff --git a/src/core/test_core_quota_peer2.conf b/src/core/test_core_quota_peer2.conf
index 3c3275d74..122b00eec 100644
--- a/src/core/test_core_quota_peer2.conf
+++ b/src/core/test_core_quota_peer2.conf
@@ -26,6 +26,10 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-transport.sock
26PORT = 22480 26PORT = 22480
27UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-core.sock 27UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-core.sock
28 28
29[nat]
30PORT = 22481
31UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2.service-nat.sock
32
29[ats] 33[ats]
30PORT = 22482 34PORT = 22482
31UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-ats.sock 35UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-core-sym-p2-service-ats.sock
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c
index a1869a8bd..92cc40b53 100644
--- a/src/datacache/datacache.c
+++ b/src/datacache/datacache.c
@@ -185,9 +185,9 @@ GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
185 } 185 }
186 if (NULL == ret->filter) 186 if (NULL == ret->filter)
187 { 187 {
188 ret->filter = GNUNET_CONTAINER_bloomfilter_init (NULL, 188 ret->filter = GNUNET_CONTAINER_bloomfilter_init (NULL,
189 bf_size, 189 bf_size,
190 5); /* approx. 3% false positives at max use */ 190 5); /* approx. 3% false positives at max use */
191 } 191 }
192 } 192 }
193 ret->stats = GNUNET_STATISTICS_create ("datacache", cfg); 193 ret->stats = GNUNET_STATISTICS_create ("datacache", cfg);
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 5c497cdf8..2fe6498a5 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -68,11 +68,11 @@ init_connection (struct Plugin *plugin)
68{ 68{
69 struct GNUNET_PQ_ExecuteStatement es[] = { 69 struct GNUNET_PQ_ExecuteStatement es[] = {
70 GNUNET_PQ_make_execute ("CREATE TEMPORARY TABLE IF NOT EXISTS gn090dc (" 70 GNUNET_PQ_make_execute ("CREATE TEMPORARY TABLE IF NOT EXISTS gn090dc ("
71 " type INTEGER NOT NULL DEFAULT 0," 71 " type INTEGER NOT NULL,"
72 " discard_time BIGINT NOT NULL DEFAULT 0," 72 " discard_time BIGINT NOT NULL,"
73 " key BYTEA NOT NULL DEFAULT ''," 73 " key BYTEA NOT NULL,"
74 " value BYTEA NOT NULL DEFAULT ''," 74 " value BYTEA NOT NULL,"
75 " path BYTEA DEFAULT '')" 75 " path BYTEA DEFAULT NULL)"
76 "WITH OIDS"), 76 "WITH OIDS"),
77 GNUNET_PQ_make_try_execute ("CREATE INDEX IF NOT EXISTS idx_key ON gn090dc (key)"), 77 GNUNET_PQ_make_try_execute ("CREATE INDEX IF NOT EXISTS idx_key ON gn090dc (key)"),
78 GNUNET_PQ_make_try_execute ("CREATE INDEX IF NOT EXISTS idx_dt ON gn090dc (discard_time)"), 78 GNUNET_PQ_make_try_execute ("CREATE INDEX IF NOT EXISTS idx_dt ON gn090dc (discard_time)"),
diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am
index f712890ac..00ce0e934 100644
--- a/src/dht/Makefile.am
+++ b/src/dht/Makefile.am
@@ -50,13 +50,13 @@ libgnunet_plugin_block_dht_la_LDFLAGS = \
50libexec_PROGRAMS = \ 50libexec_PROGRAMS = \
51 gnunet-service-dht 51 gnunet-service-dht
52 52
53noinst_PROGRAMS = \ 53bin_PROGRAMS = \
54 gnunet-dht-monitor \ 54 gnunet-dht-monitor \
55 gnunet-dht-get \ 55 gnunet-dht-get \
56 gnunet-dht-put 56 gnunet-dht-put
57 57
58if HAVE_TESTING 58if HAVE_TESTING
59noinst_PROGRAMS += \ 59noinst_PROGRAMS = \
60 gnunet-dht-profiler 60 gnunet-dht-profiler
61endif 61endif
62 62
diff --git a/src/dht/test_dht_tools.py.in b/src/dht/test_dht_tools.py.in
index 5ceabbfad..f5dd14f67 100644
--- a/src/dht/test_dht_tools.py.in
+++ b/src/dht/test_dht_tools.py.in
@@ -36,18 +36,16 @@ else:
36 put = './gnunet-dht-put' 36 put = './gnunet-dht-put'
37 arm = 'gnunet-arm' 37 arm = 'gnunet-arm'
38 38
39tf, tempcfg = tempfile.mkstemp (prefix='test_dht_api_peer1.') 39cfgfile = 'test_dht_api_peer1.conf'
40os.close (tf) 40
41 41run_get = [get, '-c', cfgfile]
42run_get = [get, '-c', tempcfg] 42run_put = [put, '-c', cfgfile]
43run_put = [put, '-c', tempcfg] 43run_arm = [arm, '-c', cfgfile]
44run_arm = [arm, '-c', tempcfg]
45debug = os.getenv ('DEBUG') 44debug = os.getenv ('DEBUG')
46if debug: 45if debug:
47 run_arm += [debug.split (' ')] 46 run_arm += [debug.split (' ')]
48 47
49def cleanup (exitcode): 48def cleanup (exitcode):
50 os.remove (tempcfg)
51 sys.exit (exitcode) 49 sys.exit (exitcode)
52 50
53def sub_run (args, want_stdo = True, want_stde = False, nofail = False): 51def sub_run (args, want_stdo = True, want_stde = False, nofail = False):
@@ -104,7 +102,6 @@ def print_only_failer (command, rc, stdo, stde, normal):
104 print ("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format (command, stdo, stde)) 102 print ("FAIL: expected error while running {}\nCommand output was:\n{}\n{}".format (command, stdo, stde))
105 cleanup (1) 103 cleanup (1)
106 104
107shutil.copyfile ('test_dht_api_peer1.conf', tempcfg)
108 105
109print ("TEST: Starting ARM...", end='') 106print ("TEST: Starting ARM...", end='')
110r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False) 107r_arm (['-s'], failer = end_arm_failer, want_stdo = False, want_stde = False)
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 87b30c04a..d9a5dd684 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -3852,7 +3852,8 @@ run (void *cls,
3852 3852
3853 /* Cadet handle acquired, now open ports and announce regular 3853 /* Cadet handle acquired, now open ports and announce regular
3854 expressions matching our exit */ 3854 expressions matching our exit */
3855 if ( (GNUNET_YES == ipv4_enabled) && (GNUNET_YES == ipv4_exit) ) 3855 if ( (GNUNET_YES == ipv4_enabled) &&
3856 (GNUNET_YES == ipv4_exit) )
3856 { 3857 {
3857 GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_IPV4_GATEWAY, 3858 GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_IPV4_GATEWAY,
3858 strlen (GNUNET_APPLICATION_PORT_IPV4_GATEWAY), 3859 strlen (GNUNET_APPLICATION_PORT_IPV4_GATEWAY),
@@ -3931,12 +3932,12 @@ run (void *cls,
3931 GNUNET_free (prefixed_regex); 3932 GNUNET_free (prefixed_regex);
3932 } 3933 }
3933 } 3934 }
3934 if ((ipv4_exit) || (ipv6_exit)) 3935 helper_handle = GNUNET_HELPER_start (GNUNET_NO,
3935 helper_handle = GNUNET_HELPER_start (GNUNET_NO, 3936 "gnunet-helper-exit",
3936 "gnunet-helper-exit", 3937 exit_argv,
3937 exit_argv, 3938 &message_token,
3938 &message_token, 3939 NULL,
3939 NULL, NULL); 3940 NULL);
3940} 3941}
3941 3942
3942 3943
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index c1537e4f8..8a874da13 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -132,8 +132,8 @@ GNUNET_CONFIGURATION_serialize (const struct GNUNET_CONFIGURATION_Handle *cfg,
132 * @param cfg configuration to update 132 * @param cfg configuration to update
133 * @param mem the memory block of serialized configuration 133 * @param mem the memory block of serialized configuration
134 * @param size the size of the memory block 134 * @param size the size of the memory block
135 * @param allow_inline set to #GNUNET_YES if we recursively load configuration 135 * @param allow_inline set to the base directory if we recursively load configuration
136 * from inlined configurations; #GNUNET_NO if not and raise warnings 136 * from inlined configurations; NULL if not and raise warnings
137 * when we come across them 137 * when we come across them
138 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 138 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
139 */ 139 */
@@ -141,7 +141,7 @@ int
141GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, 141GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
142 const char *mem, 142 const char *mem,
143 size_t size, 143 size_t size,
144 int allow_inline); 144 const char *basedir);
145 145
146 146
147/** 147/**
diff --git a/src/integration-tests/confs/c_bootstrap_server.conf b/src/integration-tests/confs/c_bootstrap_server.conf
index acd29493b..4311e36f6 100644
--- a/src/integration-tests/confs/c_bootstrap_server.conf
+++ b/src/integration-tests/confs/c_bootstrap_server.conf
@@ -1,4 +1,4 @@
1@INLINE@ confs/test_defaults.conf 1@INLINE@ test_defaults.conf
2 2
3[PATHS] 3[PATHS]
4GNUNET_TEST_HOME = /tmp/c_bootstrap_server/ 4GNUNET_TEST_HOME = /tmp/c_bootstrap_server/
diff --git a/src/integration-tests/confs/c_nat_client.conf b/src/integration-tests/confs/c_nat_client.conf
index e8cdf6fa8..12d542851 100644
--- a/src/integration-tests/confs/c_nat_client.conf
+++ b/src/integration-tests/confs/c_nat_client.conf
@@ -1,4 +1,4 @@
1@INLINE@ confs/test_defaults.conf 1@INLINE@ test_defaults.conf
2 2
3[PATHS] 3[PATHS]
4GNUNET_TEST_HOME = /tmp/c_nat_client/ 4GNUNET_TEST_HOME = /tmp/c_nat_client/
diff --git a/src/integration-tests/confs/c_no_nat_client.conf b/src/integration-tests/confs/c_no_nat_client.conf
index 5b4d08d7f..40bb37df8 100644
--- a/src/integration-tests/confs/c_no_nat_client.conf
+++ b/src/integration-tests/confs/c_no_nat_client.conf
@@ -1,4 +1,4 @@
1@INLINE@ confs/test_defaults.conf 1@INLINE@ test_defaults.conf
2 2
3[PATHS] 3[PATHS]
4GNUNET_TEST_HOME = /tmp/c_no_nat_client/ 4GNUNET_TEST_HOME = /tmp/c_no_nat_client/
diff --git a/src/integration-tests/confs/c_no_nat_client_2.conf b/src/integration-tests/confs/c_no_nat_client_2.conf
index 928d6e101..805389a15 100644
--- a/src/integration-tests/confs/c_no_nat_client_2.conf
+++ b/src/integration-tests/confs/c_no_nat_client_2.conf
@@ -1,4 +1,4 @@
1@INLINE@ confs/test_defaults.conf 1@INLINE@ test_defaults.conf
2 2
3[PATHS] 3[PATHS]
4GNUNET_TEST_HOME = /tmp/c_no_nat_client_2/ 4GNUNET_TEST_HOME = /tmp/c_no_nat_client_2/
diff --git a/src/nat-auto/gnunet-service-nat-auto.c b/src/nat-auto/gnunet-service-nat-auto.c
index ae570c351..5f10dad94 100644
--- a/src/nat-auto/gnunet-service-nat-auto.c
+++ b/src/nat-auto/gnunet-service-nat-auto.c
@@ -310,7 +310,7 @@ handle_autoconfig_request (void *cls,
310 GNUNET_CONFIGURATION_deserialize (ac->c, 310 GNUNET_CONFIGURATION_deserialize (ac->c,
311 (const char *) &message[1], 311 (const char *) &message[1],
312 left, 312 left,
313 GNUNET_NO)) 313 NULL))
314 { 314 {
315 GNUNET_break (0); 315 GNUNET_break (0);
316 GNUNET_SERVICE_client_drop (ch->client); 316 GNUNET_SERVICE_client_drop (ch->client);
diff --git a/src/nat-auto/nat_auto_api.c b/src/nat-auto/nat_auto_api.c
index 8a7eaf264..43a5212c8 100644
--- a/src/nat-auto/nat_auto_api.c
+++ b/src/nat-auto/nat_auto_api.c
@@ -155,7 +155,7 @@ handle_auto_result (void *cls,
155 GNUNET_CONFIGURATION_deserialize (cfg, 155 GNUNET_CONFIGURATION_deserialize (cfg,
156 (const char *) &res[1], 156 (const char *) &res[1],
157 left, 157 left,
158 GNUNET_NO)) 158 NULL))
159 { 159 {
160 GNUNET_break (0); 160 GNUNET_break (0);
161 ah->arc (ah->arc_cls, 161 ah->arc (ah->arc_cls,
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index c5c8e56b9..045fe74b1 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -83,8 +83,10 @@ extract_varsize_blob (void *cls,
83 if (PQgetisnull (result, 83 if (PQgetisnull (result,
84 row, 84 row,
85 fnum)) 85 fnum))
86 return GNUNET_SYSERR; 86 {
87 87 /* Let's allow this for varsize */
88 return GNUNET_OK;
89 }
88 /* if a field is null, continue but 90 /* if a field is null, continue but
89 * remember that we now return a different result */ 91 * remember that we now return a different result */
90 len = PQgetlength (result, 92 len = PQgetlength (result,
@@ -160,7 +162,10 @@ extract_fixed_blob (void *cls,
160 if (PQgetisnull (result, 162 if (PQgetisnull (result,
161 row, 163 row,
162 fnum)) 164 fnum))
165 {
166 GNUNET_break (0);
163 return GNUNET_SYSERR; 167 return GNUNET_SYSERR;
168 }
164 169
165 /* if a field is null, continue but 170 /* if a field is null, continue but
166 * remember that we now return a different result */ 171 * remember that we now return a different result */
@@ -241,8 +246,10 @@ extract_rsa_public_key (void *cls,
241 if (PQgetisnull (result, 246 if (PQgetisnull (result,
242 row, 247 row,
243 fnum)) 248 fnum))
249 {
250 GNUNET_break (0);
244 return GNUNET_SYSERR; 251 return GNUNET_SYSERR;
245 252 }
246 /* if a field is null, continue but 253 /* if a field is null, continue but
247 * remember that we now return a different result */ 254 * remember that we now return a different result */
248 len = PQgetlength (result, 255 len = PQgetlength (result,
@@ -340,8 +347,10 @@ extract_rsa_signature (void *cls,
340 if (PQgetisnull (result, 347 if (PQgetisnull (result,
341 row, 348 row,
342 fnum)) 349 fnum))
350 {
351 GNUNET_break (0);
343 return GNUNET_SYSERR; 352 return GNUNET_SYSERR;
344 353 }
345 /* if a field is null, continue but 354 /* if a field is null, continue but
346 * remember that we now return a different result */ 355 * remember that we now return a different result */
347 len = PQgetlength (result, 356 len = PQgetlength (result,
@@ -439,8 +448,10 @@ extract_string (void *cls,
439 if (PQgetisnull (result, 448 if (PQgetisnull (result,
440 row, 449 row,
441 fnum)) 450 fnum))
451 {
452 GNUNET_break (0);
442 return GNUNET_SYSERR; 453 return GNUNET_SYSERR;
443 454 }
444 /* if a field is null, continue but 455 /* if a field is null, continue but
445 * remember that we now return a different result */ 456 * remember that we now return a different result */
446 len = PQgetlength (result, 457 len = PQgetlength (result,
@@ -569,7 +580,10 @@ extract_uint16 (void *cls,
569 if (PQgetisnull (result, 580 if (PQgetisnull (result,
570 row, 581 row,
571 fnum)) 582 fnum))
583 {
584 GNUNET_break (0);
572 return GNUNET_SYSERR; 585 return GNUNET_SYSERR;
586 }
573 GNUNET_assert (NULL != dst); 587 GNUNET_assert (NULL != dst);
574 if (sizeof (uint16_t) != *dst_size) 588 if (sizeof (uint16_t) != *dst_size)
575 { 589 {
@@ -639,7 +653,10 @@ extract_uint32 (void *cls,
639 if (PQgetisnull (result, 653 if (PQgetisnull (result,
640 row, 654 row,
641 fnum)) 655 fnum))
656 {
657 GNUNET_break (0);
642 return GNUNET_SYSERR; 658 return GNUNET_SYSERR;
659 }
643 GNUNET_assert (NULL != dst); 660 GNUNET_assert (NULL != dst);
644 if (sizeof (uint32_t) != *dst_size) 661 if (sizeof (uint32_t) != *dst_size)
645 { 662 {
@@ -709,7 +726,10 @@ extract_uint64 (void *cls,
709 if (PQgetisnull (result, 726 if (PQgetisnull (result,
710 row, 727 row,
711 fnum)) 728 fnum))
729 {
730 GNUNET_break (0);
712 return GNUNET_SYSERR; 731 return GNUNET_SYSERR;
732 }
713 GNUNET_assert (NULL != dst); 733 GNUNET_assert (NULL != dst);
714 if (sizeof (uint64_t) != *dst_size) 734 if (sizeof (uint64_t) != *dst_size)
715 { 735 {
diff --git a/src/psycstore/plugin_psycstore_postgres.c b/src/psycstore/plugin_psycstore_postgres.c
index b8010af0a..046daf6ea 100644
--- a/src/psycstore/plugin_psycstore_postgres.c
+++ b/src/psycstore/plugin_psycstore_postgres.c
@@ -465,8 +465,10 @@ channel_key_store (struct Plugin *plugin,
465 GNUNET_PQ_query_param_end 465 GNUNET_PQ_query_param_end
466 }; 466 };
467 467
468 if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != 468 if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
469 GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_channel_key", params)) 469 GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
470 "insert_channel_key",
471 params))
470 return GNUNET_SYSERR; 472 return GNUNET_SYSERR;
471 473
472 return GNUNET_OK; 474 return GNUNET_OK;
@@ -482,7 +484,7 @@ slave_key_store (struct Plugin *plugin,
482 GNUNET_PQ_query_param_end 484 GNUNET_PQ_query_param_end
483 }; 485 };
484 486
485 if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != 487 if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
486 GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_slave_key", params)) 488 GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_slave_key", params))
487 return GNUNET_SYSERR; 489 return GNUNET_SYSERR;
488 490
@@ -508,21 +510,22 @@ postgres_membership_store (void *cls,
508 uint64_t group_generation) 510 uint64_t group_generation)
509{ 511{
510 struct Plugin *plugin = cls; 512 struct Plugin *plugin = cls;
511 513 uint32_t idid_join = (uint32_t) did_join;
512 uint32_t idid_join = (uint32_t)did_join;
513 514
514 GNUNET_assert (TRANSACTION_NONE == plugin->transaction); 515 GNUNET_assert (TRANSACTION_NONE == plugin->transaction);
515 516
516 if (announced_at > INT64_MAX || 517 if ( (announced_at > INT64_MAX) ||
517 effective_since > INT64_MAX || 518 (effective_since > INT64_MAX) ||
518 group_generation > INT64_MAX) 519 (group_generation > INT64_MAX) )
519 { 520 {
520 GNUNET_break (0); 521 GNUNET_break (0);
521 return GNUNET_SYSERR; 522 return GNUNET_SYSERR;
522 } 523 }
523 524
524 if (GNUNET_OK != channel_key_store (plugin, channel_key) 525 if ( (GNUNET_OK !=
525 || GNUNET_OK != slave_key_store (plugin, slave_key)) 526 channel_key_store (plugin, channel_key)) ||
527 (GNUNET_OK !=
528 slave_key_store (plugin, slave_key)) )
526 return GNUNET_SYSERR; 529 return GNUNET_SYSERR;
527 530
528 struct GNUNET_PQ_QueryParam params[] = { 531 struct GNUNET_PQ_QueryParam params[] = {
@@ -535,8 +538,10 @@ postgres_membership_store (void *cls,
535 GNUNET_PQ_query_param_end 538 GNUNET_PQ_query_param_end
536 }; 539 };
537 540
538 if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != 541 if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT !=
539 GNUNET_PQ_eval_prepared_non_select (plugin->dbh, "insert_membership", params)) 542 GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
543 "insert_membership",
544 params))
540 return GNUNET_SYSERR; 545 return GNUNET_SYSERR;
541 546
542 return GNUNET_OK; 547 return GNUNET_OK;
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index 4ca10f0b4..b2983545f 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -1467,8 +1467,6 @@ maybe_finish (struct Operation *op)
1467 num_demanded); 1467 num_demanded);
1468 if (0 == num_demanded) 1468 if (0 == num_demanded)
1469 { 1469 {
1470 struct GNUNET_MQ_Envelope *ev;
1471
1472 op->state->phase = PHASE_DONE; 1470 op->state->phase = PHASE_DONE;
1473 send_client_done (op); 1471 send_client_done (op);
1474 destroy_channel (op); 1472 destroy_channel (op);
@@ -1894,8 +1892,6 @@ handle_union_p2p_full_done (void *cls,
1894 break; 1892 break;
1895 case PHASE_FULL_SENDING: 1893 case PHASE_FULL_SENDING:
1896 { 1894 {
1897 struct GNUNET_MQ_Envelope *ev;
1898
1899 LOG (GNUNET_ERROR_TYPE_DEBUG, 1895 LOG (GNUNET_ERROR_TYPE_DEBUG,
1900 "got FULL DONE, finishing\n"); 1896 "got FULL DONE, finishing\n");
1901 /* We sent the full set, and got the response for that. We're done. */ 1897 /* We sent the full set, and got the response for that. We're done. */
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c
index d2a3a98b7..392f257dd 100644
--- a/src/testbed/gnunet-helper-testbed.c
+++ b/src/testbed/gnunet-helper-testbed.c
@@ -358,7 +358,10 @@ tokenizer_cb (void *cls,
358 } 358 }
359 cfg = GNUNET_CONFIGURATION_create (); 359 cfg = GNUNET_CONFIGURATION_create ();
360 if (GNUNET_OK != 360 if (GNUNET_OK !=
361 GNUNET_CONFIGURATION_deserialize (cfg, config, ul_config_size, GNUNET_NO)) 361 GNUNET_CONFIGURATION_deserialize (cfg,
362 config,
363 ul_config_size,
364 NULL))
362 { 365 {
363 LOG (GNUNET_ERROR_TYPE_WARNING, 366 LOG (GNUNET_ERROR_TYPE_WARNING,
364 "Unable to deserialize config -- exiting\n"); 367 "Unable to deserialize config -- exiting\n");
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index 0e0a5da9c..1acd0e47c 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -2158,9 +2158,10 @@ GNUNET_TESTBED_extract_config_ (const struct GNUNET_MessageHeader *msg)
2158 } 2158 }
2159 cfg = GNUNET_CONFIGURATION_create (); 2159 cfg = GNUNET_CONFIGURATION_create ();
2160 if (GNUNET_OK != 2160 if (GNUNET_OK !=
2161 GNUNET_CONFIGURATION_deserialize (cfg, (const char *) data, 2161 GNUNET_CONFIGURATION_deserialize (cfg,
2162 (const char *) data,
2162 (size_t) data_len, 2163 (size_t) data_len,
2163 GNUNET_NO)) 2164 NULL))
2164 { 2165 {
2165 GNUNET_free (data); 2166 GNUNET_free (data);
2166 GNUNET_break_op (0); /* De-serialization failure */ 2167 GNUNET_break_op (0); /* De-serialization failure */
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 5d2c1cc37..8efcab649 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -983,7 +983,10 @@ helper_mst (void *cls,
983 GNUNET_CONFIGURATION_destroy (cp->host->cfg); 983 GNUNET_CONFIGURATION_destroy (cp->host->cfg);
984 cp->host->cfg = GNUNET_CONFIGURATION_create (); 984 cp->host->cfg = GNUNET_CONFIGURATION_create ();
985 GNUNET_assert (GNUNET_CONFIGURATION_deserialize 985 GNUNET_assert (GNUNET_CONFIGURATION_deserialize
986 (cp->host->cfg, config, config_size, GNUNET_NO)); 986 (cp->host->cfg,
987 config,
988 config_size,
989 NULL));
987 GNUNET_free (config); 990 GNUNET_free (config);
988 if (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host))) 991 if (NULL == (hostname = GNUNET_TESTBED_host_get_hostname (cp->host)))
989 hostname = "localhost"; 992 hostname = "localhost";
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 537ffe059..4415d0a24 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -1183,8 +1183,8 @@ run (void *cls,
1183 "Topology would like %u connections with at least %u friends\n", 1183 "Topology would like %u connections with at least %u friends\n",
1184 target_connection_count, 1184 target_connection_count,
1185 minimum_friend_count); 1185 minimum_friend_count);
1186 if ( (friend_count < minimum_friend_count) && 1186 if ( (GNUNET_YES == friends_only) ||
1187 (NULL == blacklist)) 1187 (minimum_friend_count > 0))
1188 blacklist = GNUNET_TRANSPORT_blacklist (cfg, 1188 blacklist = GNUNET_TRANSPORT_blacklist (cfg,
1189 &blacklist_check, 1189 &blacklist_check,
1190 NULL); 1190 NULL);
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 892d97050..d9fade44f 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1977,6 +1977,37 @@ server_disconnect_cb (void *cls,
1977 1977
1978 1978
1979/** 1979/**
1980 * Callback from MHD when a connection starts/stops
1981 *
1982 * @param cls closure with the `struct HTTP_Server_Plugin *`
1983 * @param connection connection handle
1984 * @param socket_context socket-specific pointer
1985 * @param toe reason for connection notification
1986 * @see #MHD_OPTION_NOTIFY_CONNECTION
1987 */
1988static void
1989server_connection_cb (void *cls,
1990 struct MHD_Connection *connection,
1991 void **socket_context,
1992 enum MHD_ConnectionNotificationCode toe)
1993{
1994 struct HTTP_Server_Plugin *plugin = cls;
1995 const union MHD_ConnectionInfo *info;
1996
1997 if (MHD_CONNECTION_NOTIFY_STARTED == toe)
1998 return;
1999
2000 /* Reschedule to remove closed socket from our select set */
2001 info = MHD_get_connection_info (connection,
2002 MHD_CONNECTION_INFO_DAEMON);
2003 GNUNET_assert (NULL != info);
2004 server_reschedule (plugin,
2005 info->daemon,
2006 GNUNET_YES);
2007}
2008
2009
2010/**
1980 * Check if incoming connection is accepted. 2011 * Check if incoming connection is accepted.
1981 * 2012 *
1982 * @param cls plugin as closure 2013 * @param cls plugin as closure
@@ -2257,6 +2288,8 @@ run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin,
2257 GNUNET_MAX_MESSAGE_SIZE), 2288 GNUNET_MAX_MESSAGE_SIZE),
2258 MHD_OPTION_NOTIFY_COMPLETED, 2289 MHD_OPTION_NOTIFY_COMPLETED,
2259 &server_disconnect_cb, plugin, 2290 &server_disconnect_cb, plugin,
2291 MHD_OPTION_NOTIFY_CONNECTION,
2292 &server_connection_cb, plugin,
2260 MHD_OPTION_EXTERNAL_LOGGER, 2293 MHD_OPTION_EXTERNAL_LOGGER,
2261 &server_log, NULL, 2294 &server_log, NULL,
2262 MHD_OPTION_END); 2295 MHD_OPTION_END);
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 73b773b88..211e64e32 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -305,11 +305,11 @@ main (int argc,
305 } 305 }
306 for (unsigned int i=0;i<2;i++) 306 for (unsigned int i=0;i<2;i++)
307 { 307 {
308 if ( (NULL != gen_cfgs[0]) && 308 if ( (NULL != gen_cfgs[i]) &&
309 (GNUNET_YES == GNUNET_DISK_file_test (gen_cfgs[0])) ) 309 (GNUNET_YES == GNUNET_DISK_file_test (gen_cfgs[i])) )
310 { 310 {
311 GNUNET_DISK_directory_remove (gen_cfgs[0]); 311 GNUNET_DISK_directory_remove (gen_cfgs[i]);
312 GNUNET_free (gen_cfgs[0]); 312 GNUNET_free (gen_cfgs[i]);
313 } 313 }
314 } 314 }
315 return 0; 315 return 0;
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 53a44f338..2aa6cdbb0 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -413,7 +413,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_Handle *tth
413 else 413 else
414 p->cb_cls = p; 414 p->cb_cls = p;
415 p->start_cb = start_cb; 415 p->start_cb = start_cb;
416 p->start_cb_cls = start_cb_cls; 416 if (NULL != start_cb_cls)
417 p->start_cb_cls = start_cb_cls;
418 else
419 p->start_cb_cls = p;
417 GNUNET_CONTAINER_DLL_insert (tth->p_head, 420 GNUNET_CONTAINER_DLL_insert (tth->p_head,
418 tth->p_tail, 421 tth->p_tail,
419 p); 422 p);
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c
index bc0c3b9b4..f551bbb82 100644
--- a/src/util/bandwidth.c
+++ b/src/util/bandwidth.c
@@ -327,7 +327,6 @@ static void
327update_tracker (struct GNUNET_BANDWIDTH_Tracker *av) 327update_tracker (struct GNUNET_BANDWIDTH_Tracker *av)
328{ 328{
329 struct GNUNET_TIME_Absolute now; 329 struct GNUNET_TIME_Absolute now;
330 struct GNUNET_TIME_Relative delta;
331 uint64_t delta_time; 330 uint64_t delta_time;
332 uint64_t delta_avail; 331 uint64_t delta_avail;
333 uint64_t left_bytes; 332 uint64_t left_bytes;
@@ -354,14 +353,20 @@ update_tracker (struct GNUNET_BANDWIDTH_Tracker *av)
354 else 353 else
355 av->consumption_since_last_update__ = - max_carry; 354 av->consumption_since_last_update__ = - max_carry;
356 } 355 }
357 delta.rel_value_us = delta_time; 356#if !defined(GNUNET_CULL_LOGGING)
358 LOG (GNUNET_ERROR_TYPE_DEBUG, 357 {
359 "Tracker %p updated, consumption at %lld at %u Bps, last update was %s ago\n", 358 struct GNUNET_TIME_Relative delta;
360 av, 359
361 (long long) av->consumption_since_last_update__, 360 delta.rel_value_us = delta_time;
362 (unsigned int) av->available_bytes_per_s__, 361 LOG (GNUNET_ERROR_TYPE_DEBUG,
363 GNUNET_STRINGS_relative_time_to_string (delta, 362 "Tracker %p updated, consumption at %lld at %u Bps, last update was %s ago\n",
364 GNUNET_YES)); 363 av,
364 (long long) av->consumption_since_last_update__,
365 (unsigned int) av->available_bytes_per_s__,
366 GNUNET_STRINGS_relative_time_to_string (delta,
367 GNUNET_YES));
368 }
369#endif
365} 370}
366 371
367 372
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 7d5b50b8b..34481fe13 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -203,6 +203,8 @@ struct LogDef
203 int force; 203 int force;
204}; 204};
205 205
206
207#if !defined(GNUNET_CULL_LOGGING)
206/** 208/**
207 * Dynamic array of logging definitions 209 * Dynamic array of logging definitions
208 */ 210 */
@@ -219,19 +221,20 @@ static int logdefs_size;
219static int logdefs_len; 221static int logdefs_len;
220 222
221/** 223/**
222 * GNUNET_YES if GNUNET_LOG environment variable is already parsed. 224 * #GNUNET_YES if GNUNET_LOG environment variable is already parsed.
223 */ 225 */
224static int gnunet_log_parsed; 226static int gnunet_log_parsed;
225 227
226/** 228/**
227 * GNUNET_YES if GNUNET_FORCE_LOG environment variable is already parsed. 229 * #GNUNET_YES if GNUNET_FORCE_LOG environment variable is already parsed.
228 */ 230 */
229static int gnunet_force_log_parsed; 231static int gnunet_force_log_parsed;
230 232
231/** 233/**
232 * GNUNET_YES if at least one definition with forced == 1 is available. 234 * #GNUNET_YES if at least one definition with forced == 1 is available.
233 */ 235 */
234static int gnunet_force_log_present; 236static int gnunet_force_log_present;
237#endif
235 238
236#ifdef WINDOWS 239#ifdef WINDOWS
237/** 240/**
@@ -269,18 +272,6 @@ get_type (const char *log)
269} 272}
270 273
271 274
272#if !defined(GNUNET_CULL_LOGGING)
273/**
274 * Utility function - reallocates logdefs array to be twice as large.
275 */
276static void
277resize_logdefs ()
278{
279 logdefs_size = (logdefs_size + 1) * 2;
280 logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
281}
282
283
284/** 275/**
285 * Abort the process, generate a core dump if possible. 276 * Abort the process, generate a core dump if possible.
286 */ 277 */
@@ -294,6 +285,18 @@ GNUNET_abort_ ()
294} 285}
295 286
296 287
288#if !defined(GNUNET_CULL_LOGGING)
289/**
290 * Utility function - reallocates logdefs array to be twice as large.
291 */
292static void
293resize_logdefs ()
294{
295 logdefs_size = (logdefs_size + 1) * 2;
296 logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof (struct LogDef));
297}
298
299
297#if ! TALER_WALLET_ONLY 300#if ! TALER_WALLET_ONLY
298/** 301/**
299 * Rotate logs, deleting the oldest log. 302 * Rotate logs, deleting the oldest log.
@@ -715,7 +718,7 @@ GNUNET_log_setup (const char *comp,
715 log_file_name = GNUNET_STRINGS_filename_expand (logfile); 718 log_file_name = GNUNET_STRINGS_filename_expand (logfile);
716 if (NULL == log_file_name) 719 if (NULL == log_file_name)
717 return GNUNET_SYSERR; 720 return GNUNET_SYSERR;
718#if TALER_WALLET_ONLY 721#if TALER_WALLET_ONLY || defined(GNUNET_CULL_LOGGING)
719 /* log file option not allowed for wallet logic */ 722 /* log file option not allowed for wallet logic */
720 GNUNET_assert (NULL == logfile); 723 GNUNET_assert (NULL == logfile);
721 return GNUNET_OK; 724 return GNUNET_OK;
@@ -1030,7 +1033,7 @@ mylog (enum GNUNET_ErrorType kind,
1030 } 1033 }
1031#endif 1034#endif
1032 VSNPRINTF (buf, size, message, va); 1035 VSNPRINTF (buf, size, message, va);
1033#if ! TALER_WALLET_ONLY 1036#if ! (defined(GNUNET_CULL_LOGGING) || TALER_WALLET_ONLY)
1034 if (NULL != tmptr) 1037 if (NULL != tmptr)
1035 (void) setup_log_file (tmptr); 1038 (void) setup_log_file (tmptr);
1036#endif 1039#endif
diff --git a/src/util/configuration.c b/src/util/configuration.c
index 639bd55a2..f63903b4e 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -145,8 +145,8 @@ GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg)
145 * @param cfg configuration to update 145 * @param cfg configuration to update
146 * @param mem the memory block of serialized configuration 146 * @param mem the memory block of serialized configuration
147 * @param size the size of the memory block 147 * @param size the size of the memory block
148 * @param allow_inline set to #GNUNET_YES if we recursively load configuration 148 * @param basedir set to path from which we recursively load configuration
149 * from inlined configurations; #GNUNET_NO if not and raise warnings 149 * from inlined configurations; NULL if not and raise warnings
150 * when we come across them 150 * when we come across them
151 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 151 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
152 */ 152 */
@@ -154,7 +154,7 @@ int
154GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg, 154GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
155 const char *mem, 155 const char *mem,
156 size_t size, 156 size_t size,
157 int allow_inline) 157 const char *basedir)
158{ 158{
159 char *line; 159 char *line;
160 char *line_orig; 160 char *line_orig;
@@ -228,13 +228,23 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
228 { 228 {
229 /* @INLINE@ value */ 229 /* @INLINE@ value */
230 value = &line[strlen ("@INLINE@ ")]; 230 value = &line[strlen ("@INLINE@ ")];
231 if (GNUNET_YES == allow_inline) 231 if (NULL != basedir)
232 { 232 {
233 if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, value)) 233 char *fn;
234
235 GNUNET_asprintf (&fn,
236 "%s/%s",
237 basedir,
238 value);
239 if (GNUNET_OK !=
240 GNUNET_CONFIGURATION_parse (cfg,
241 fn))
234 { 242 {
243 GNUNET_free (fn);
235 ret = GNUNET_SYSERR; /* failed to parse included config */ 244 ret = GNUNET_SYSERR; /* failed to parse included config */
236 break; 245 break;
237 } 246 }
247 GNUNET_free (fn);
238 } 248 }
239 else 249 else
240 { 250 {
@@ -311,6 +321,7 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
311 size_t fs; 321 size_t fs;
312 char *fn; 322 char *fn;
313 char *mem; 323 char *mem;
324 char *endsep;
314 int dirty; 325 int dirty;
315 int ret; 326 int ret;
316 327
@@ -350,8 +361,14 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
350 LOG (GNUNET_ERROR_TYPE_DEBUG, 361 LOG (GNUNET_ERROR_TYPE_DEBUG,
351 "Deserializing contents of file `%s'\n", 362 "Deserializing contents of file `%s'\n",
352 fn); 363 fn);
364 endsep = strrchr (fn, (int) '/');
365 if (NULL != endsep)
366 *endsep = '\0';
367 ret = GNUNET_CONFIGURATION_deserialize (cfg,
368 mem,
369 fs,
370 fn);
353 GNUNET_free (fn); 371 GNUNET_free (fn);
354 ret = GNUNET_CONFIGURATION_deserialize (cfg, mem, fs, GNUNET_YES);
355 GNUNET_free (mem); 372 GNUNET_free (mem);
356 /* restore dirty flag - anything we set in the meantime 373 /* restore dirty flag - anything we set in the meantime
357 * came from disk */ 374 * came from disk */
diff --git a/src/util/crypto_ecc_setup.c b/src/util/crypto_ecc_setup.c
index 2f2e2f122..64610ddd3 100644
--- a/src/util/crypto_ecc_setup.c
+++ b/src/util/crypto_ecc_setup.c
@@ -119,7 +119,8 @@ GNUNET_CRYPTO_eddsa_key_create_from_file (const char *filename)
119 { 119 {
120 ec = errno; 120 ec = errno;
121 LOG (GNUNET_ERROR_TYPE_ERROR, 121 LOG (GNUNET_ERROR_TYPE_ERROR,
122 _("Could not acquire lock on file `%s': %s...\n"), filename, 122 _("Could not acquire lock on file `%s': %s...\n"),
123 filename,
123 STRERROR (ec)); 124 STRERROR (ec));
124 } 125 }
125 } 126 }
@@ -313,7 +314,8 @@ GNUNET_CRYPTO_ecdsa_key_create_from_file (const char *filename)
313 { 314 {
314 ec = errno; 315 ec = errno;
315 LOG (GNUNET_ERROR_TYPE_ERROR, 316 LOG (GNUNET_ERROR_TYPE_ERROR,
316 _("Could not acquire lock on file `%s': %s...\n"), filename, 317 _("Could not acquire lock on file `%s': %s...\n"),
318 filename,
317 STRERROR (ec)); 319 STRERROR (ec));
318 LOG (GNUNET_ERROR_TYPE_ERROR, 320 LOG (GNUNET_ERROR_TYPE_ERROR,
319 _ 321 _
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c
index 12e484845..d26bdd212 100644
--- a/src/util/gnunet-service-resolver.c
+++ b/src/util/gnunet-service-resolver.c
@@ -666,6 +666,8 @@ handle_get (void *cls,
666 return; 666 return;
667 } 667 }
668 ip = &msg[1]; 668 ip = &msg[1];
669
670#if !defined(GNUNET_CULL_LOGGING)
669 { 671 {
670 char buf[INET6_ADDRSTRLEN]; 672 char buf[INET6_ADDRSTRLEN];
671 673
@@ -676,6 +678,7 @@ handle_get (void *cls,
676 buf, 678 buf,
677 sizeof (buf))); 679 sizeof (buf)));
678 } 680 }
681#endif
679 get_ip_as_string (client, 682 get_ip_as_string (client,
680 af, 683 af,
681 ip); 684 ip);
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c
index 0c915932c..e7bba3000 100644
--- a/src/util/resolver_api.c
+++ b/src/util/resolver_api.c
@@ -821,6 +821,7 @@ handle_lookup_timeout (void *cls)
821 } 821 }
822 else 822 else
823 { 823 {
824#if !defined(GNUNET_CULL_LOGGING)
824 char buf[INET6_ADDRSTRLEN]; 825 char buf[INET6_ADDRSTRLEN];
825 826
826 LOG (GNUNET_ERROR_TYPE_INFO, 827 LOG (GNUNET_ERROR_TYPE_INFO,
@@ -829,6 +830,7 @@ handle_lookup_timeout (void *cls)
829 (const void *) &rh[1], 830 (const void *) &rh[1],
830 buf, 831 buf,
831 sizeof(buf))); 832 sizeof(buf)));
833#endif
832 if (GNUNET_NO == rh->received_response) 834 if (GNUNET_NO == rh->received_response)
833 { 835 {
834 char *nret; 836 char *nret;
diff --git a/src/util/test_common_logging_dummy.c b/src/util/test_common_logging_dummy.c
index 0d971eac5..cb191ddab 100644
--- a/src/util/test_common_logging_dummy.c
+++ b/src/util/test_common_logging_dummy.c
@@ -47,11 +47,15 @@ my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component,
47 fflush (stdout); 47 fflush (stdout);
48} 48}
49 49
50
51#if !defined(GNUNET_CULL_LOGGING)
50static int 52static int
51expensive_func () 53expensive_func ()
52{ 54{
53 return GNUNET_NETWORK_socket_select (NULL, NULL, NULL, OUTPUT_DELAY); 55 return GNUNET_NETWORK_socket_select (NULL, NULL, NULL, OUTPUT_DELAY);
54} 56}
57#endif
58
55 59
56#define pr(kind,lvl) {\ 60#define pr(kind,lvl) {\
57 struct GNUNET_TIME_Absolute t1, t2;\ 61 struct GNUNET_TIME_Absolute t1, t2;\