diff options
Diffstat (limited to 'src')
35 files changed, 284 insertions, 353 deletions
diff --git a/src/contrib/Makefile.am b/src/contrib/Makefile.am index 516fb872c..abaefb409 100644 --- a/src/contrib/Makefile.am +++ b/src/contrib/Makefile.am | |||
@@ -1,4 +1,3 @@ | |||
1 | SUBDIRS = \ | 1 | SUBDIRS = \ |
2 | #lib \ | 2 | service \ |
3 | #plugin \ | 3 | cli |
4 | service | ||
diff --git a/src/contrib/cli/Makefile.am b/src/contrib/cli/Makefile.am new file mode 100644 index 000000000..3315e4bbb --- /dev/null +++ b/src/contrib/cli/Makefile.am | |||
@@ -0,0 +1,2 @@ | |||
1 | SUBDIRS = \ | ||
2 | template | ||
diff --git a/src/contrib/cli/template/.gitignore b/src/contrib/cli/template/.gitignore new file mode 100644 index 000000000..6ace894c0 --- /dev/null +++ b/src/contrib/cli/template/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnunet-template | |||
diff --git a/src/contrib/cli/template/Makefile.am b/src/contrib/cli/template/Makefile.am index 9f94d0837..b60095d80 100644 --- a/src/contrib/cli/template/Makefile.am +++ b/src/contrib/cli/template/Makefile.am | |||
@@ -13,8 +13,9 @@ noinst_PROGRAMS = \ | |||
13 | gnunet-template | 13 | gnunet-template |
14 | 14 | ||
15 | 15 | ||
16 | gnunet_service_template_SOURCES = \ | 16 | gnunet_template_SOURCES = \ |
17 | gnunet-service-template.c | 17 | gnunet-template.c |
18 | gnunet_service_template_LDADD = \ | 18 | gnunet_template_LDADD = \ |
19 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | 19 | $(top_builddir)/src/lib/util/libgnunetutil.la |
20 | gnunet_template_LDFLAGS = \ | ||
20 | $(GN_LIBINTL) | 21 | $(GN_LIBINTL) |
diff --git a/src/lib/util/.gitignore b/src/lib/util/.gitignore index bfb947ae6..c6306639c 100644 --- a/src/lib/util/.gitignore +++ b/src/lib/util/.gitignore | |||
@@ -75,3 +75,6 @@ perf_mq | |||
75 | perf_scheduler | 75 | perf_scheduler |
76 | test_crypto_cs | 76 | test_crypto_cs |
77 | test_crypto_ecc | 77 | test_crypto_ecc |
78 | test_child_management | ||
79 | test_scheduler_hogging_cancel | ||
80 | test_scheduler_hogging_priority | ||
diff --git a/src/lib/util/meson.build b/src/lib/util/meson.build index 70ff201bc..98d9e981c 100644 --- a/src/lib/util/meson.build +++ b/src/lib/util/meson.build | |||
@@ -89,11 +89,29 @@ libgnunetutil_dep = declare_dependency(link_with : libgnunetutil) | |||
89 | pkg.generate(libgnunetutil, url: 'https://www.gnunet.org', | 89 | pkg.generate(libgnunetutil, url: 'https://www.gnunet.org', |
90 | description : 'Provides miscellaneous utility functions and API for GNUnet') | 90 | description : 'Provides miscellaneous utility functions and API for GNUnet') |
91 | 91 | ||
92 | executable ('test_common_logging_dummy', | 92 | logging_dummy = executable ('test_common_logging_dummy', |
93 | ['test_common_logging_dummy.c'], | 93 | ['test_common_logging_dummy.c'], |
94 | dependencies: [libgnunetutil_dep], | 94 | dependencies: [libgnunetutil_dep], |
95 | include_directories: [incdir, configuration_inc], | 95 | include_directories: [incdir, configuration_inc], |
96 | install: false) | 96 | install: false) |
97 | configure_file(input : 'test_client_data.conf', | ||
98 | output : 'test_client_data.conf', | ||
99 | copy: true) | ||
100 | configure_file(input : 'test_speedup_data.conf', | ||
101 | output : 'test_speedup_data.conf', | ||
102 | copy: true) | ||
103 | configure_file(input : 'test_program_data.conf', | ||
104 | output : 'test_program_data.conf', | ||
105 | copy: true) | ||
106 | configure_file(input : 'test_service_data.conf', | ||
107 | output : 'test_service_data.conf', | ||
108 | copy: true) | ||
109 | configure_file(input : 'test_configuration_data.conf', | ||
110 | output : 'test_configuration_data.conf', | ||
111 | copy: true) | ||
112 | configure_file(input : 'child_management_test.sh', | ||
113 | output : 'child_management_test.sh', | ||
114 | copy: true) | ||
97 | 115 | ||
98 | test_bio = executable ('test_bio', | 116 | test_bio = executable ('test_bio', |
99 | ['test_bio.c'], | 117 | ['test_bio.c'], |
@@ -101,7 +119,7 @@ test_bio = executable ('test_bio', | |||
101 | include_directories: [incdir, configuration_inc], | 119 | include_directories: [incdir, configuration_inc], |
102 | install: false) | 120 | install: false) |
103 | test('test_bio', test_bio, | 121 | test('test_bio', test_bio, |
104 | workdir: meson.current_source_dir(), | 122 | workdir: meson.current_build_dir(), |
105 | suite: ['util', 'util-bio']) | 123 | suite: ['util', 'util-bio']) |
106 | test_child_management = executable ('test_child_management', | 124 | test_child_management = executable ('test_child_management', |
107 | ['test_child_management.c'], | 125 | ['test_child_management.c'], |
@@ -109,7 +127,7 @@ test_child_management = executable ('test_child_management', | |||
109 | include_directories: [incdir, configuration_inc], | 127 | include_directories: [incdir, configuration_inc], |
110 | install: false) | 128 | install: false) |
111 | test('test_child_management', test_child_management, | 129 | test('test_child_management', test_child_management, |
112 | workdir: meson.current_source_dir(), | 130 | workdir: meson.current_build_dir(), |
113 | suite: ['util', 'util-child']) | 131 | suite: ['util', 'util-child']) |
114 | 132 | ||
115 | # test_client.nc | 133 | # test_client.nc |
@@ -121,7 +139,7 @@ testcommonalloc = executable ('test_common_allocation', | |||
121 | include_directories: [incdir, configuration_inc], | 139 | include_directories: [incdir, configuration_inc], |
122 | install: false) | 140 | install: false) |
123 | test('test_common_allocation', testcommonalloc, | 141 | test('test_common_allocation', testcommonalloc, |
124 | workdir: meson.current_source_dir(), | 142 | workdir: meson.current_build_dir(), |
125 | suite: ['util', 'util-common']) | 143 | suite: ['util', 'util-common']) |
126 | 144 | ||
127 | testcommonlog = executable ('test_common_logging', | 145 | testcommonlog = executable ('test_common_logging', |
@@ -131,7 +149,7 @@ testcommonlog = executable ('test_common_logging', | |||
131 | include_directories: [incdir, configuration_inc], | 149 | include_directories: [incdir, configuration_inc], |
132 | install: false) | 150 | install: false) |
133 | test('test_common_logging', testcommonlog, | 151 | test('test_common_logging', testcommonlog, |
134 | workdir: meson.current_source_dir(), | 152 | workdir: meson.current_build_dir(), |
135 | suite: ['util', 'util-common']) | 153 | suite: ['util', 'util-common']) |
136 | testcommonendian = executable ('test_common_endian', | 154 | testcommonendian = executable ('test_common_endian', |
137 | ['test_common_endian.c'], | 155 | ['test_common_endian.c'], |
@@ -140,7 +158,7 @@ testcommonendian = executable ('test_common_endian', | |||
140 | include_directories: [incdir, configuration_inc], | 158 | include_directories: [incdir, configuration_inc], |
141 | install: false) | 159 | install: false) |
142 | test('test_common_endian', testcommonendian, | 160 | test('test_common_endian', testcommonendian, |
143 | workdir: meson.current_source_dir(), | 161 | workdir: meson.current_build_dir(), |
144 | suite: ['util', 'util-common']) | 162 | suite: ['util', 'util-common']) |
145 | testconf = executable ('test_configuration', | 163 | testconf = executable ('test_configuration', |
146 | ['test_configuration.c'], | 164 | ['test_configuration.c'], |
@@ -149,7 +167,7 @@ testconf = executable ('test_configuration', | |||
149 | include_directories: [incdir, configuration_inc], | 167 | include_directories: [incdir, configuration_inc], |
150 | install: false) | 168 | install: false) |
151 | test('test_configuration', testconf, | 169 | test('test_configuration', testconf, |
152 | workdir: meson.current_source_dir(), | 170 | workdir: meson.current_build_dir(), |
153 | suite: ['util', 'util-configuration']) | 171 | suite: ['util', 'util-configuration']) |
154 | testcontainerbloom = executable ('test_container_bloomfilter', | 172 | testcontainerbloom = executable ('test_container_bloomfilter', |
155 | ['test_container_bloomfilter.c'], | 173 | ['test_container_bloomfilter.c'], |
@@ -158,7 +176,7 @@ testcontainerbloom = executable ('test_container_bloomfilter', | |||
158 | build_by_default: false, | 176 | build_by_default: false, |
159 | install: false) | 177 | install: false) |
160 | test('test_container_bloomfilter', testcontainerbloom, | 178 | test('test_container_bloomfilter', testcontainerbloom, |
161 | workdir: meson.current_source_dir(), | 179 | workdir: meson.current_build_dir(), |
162 | suite: ['util', 'util-container']) | 180 | suite: ['util', 'util-container']) |
163 | 181 | ||
164 | testcontainerdll = executable ('test_container_dll', | 182 | testcontainerdll = executable ('test_container_dll', |
@@ -168,7 +186,7 @@ testcontainerdll = executable ('test_container_dll', | |||
168 | build_by_default: false, | 186 | build_by_default: false, |
169 | install: false) | 187 | install: false) |
170 | test('test_container_dll', testcontainerdll, | 188 | test('test_container_dll', testcontainerdll, |
171 | workdir: meson.current_source_dir(), | 189 | workdir: meson.current_build_dir(), |
172 | suite: ['util', 'util-container']) | 190 | suite: ['util', 'util-container']) |
173 | 191 | ||
174 | testcontainermhm = executable ('test_container_multihashmap', | 192 | testcontainermhm = executable ('test_container_multihashmap', |
@@ -178,7 +196,7 @@ testcontainermhm = executable ('test_container_multihashmap', | |||
178 | build_by_default: false, | 196 | build_by_default: false, |
179 | install: false) | 197 | install: false) |
180 | test('test_container_multihashmap', testcontainermhm, | 198 | test('test_container_multihashmap', testcontainermhm, |
181 | workdir: meson.current_source_dir(), | 199 | workdir: meson.current_build_dir(), |
182 | suite: ['util', 'util-container']) | 200 | suite: ['util', 'util-container']) |
183 | 201 | ||
184 | testcontainermhm32 = executable ('test_container_multihashmap32', | 202 | testcontainermhm32 = executable ('test_container_multihashmap32', |
@@ -188,7 +206,7 @@ testcontainermhm32 = executable ('test_container_multihashmap32', | |||
188 | build_by_default: false, | 206 | build_by_default: false, |
189 | install: false) | 207 | install: false) |
190 | test('test_container_multihashmap32', testcontainermhm32, | 208 | test('test_container_multihashmap32', testcontainermhm32, |
191 | workdir: meson.current_source_dir(), | 209 | workdir: meson.current_build_dir(), |
192 | suite: ['util', 'util-container']) | 210 | suite: ['util', 'util-container']) |
193 | 211 | ||
194 | testcontainermpm = executable ('test_container_multipeermap', | 212 | testcontainermpm = executable ('test_container_multipeermap', |
@@ -198,7 +216,7 @@ testcontainermpm = executable ('test_container_multipeermap', | |||
198 | build_by_default: false, | 216 | build_by_default: false, |
199 | install: false) | 217 | install: false) |
200 | test('test_container_multipeermap', testcontainermpm, | 218 | test('test_container_multipeermap', testcontainermpm, |
201 | workdir: meson.current_source_dir(), | 219 | workdir: meson.current_build_dir(), |
202 | suite: ['util', 'util-container']) | 220 | suite: ['util', 'util-container']) |
203 | 221 | ||
204 | testcontainerheap = executable ('test_container_heap', | 222 | testcontainerheap = executable ('test_container_heap', |
@@ -208,7 +226,7 @@ testcontainerheap = executable ('test_container_heap', | |||
208 | build_by_default: false, | 226 | build_by_default: false, |
209 | install: false) | 227 | install: false) |
210 | test('test_container_heap', testcontainerheap, | 228 | test('test_container_heap', testcontainerheap, |
211 | workdir: meson.current_source_dir(), | 229 | workdir: meson.current_build_dir(), |
212 | suite: ['util', 'util-container']) | 230 | suite: ['util', 'util-container']) |
213 | 231 | ||
214 | testcrypto_symmetric = executable ('test_crypto_symmetric', | 232 | testcrypto_symmetric = executable ('test_crypto_symmetric', |
@@ -218,7 +236,7 @@ testcrypto_symmetric = executable ('test_crypto_symmetric', | |||
218 | build_by_default: false, | 236 | build_by_default: false, |
219 | install: false) | 237 | install: false) |
220 | test('test_crypto_symmetric', testcrypto_symmetric, | 238 | test('test_crypto_symmetric', testcrypto_symmetric, |
221 | workdir: meson.current_source_dir(), | 239 | workdir: meson.current_build_dir(), |
222 | suite: ['util', 'util-crypto']) | 240 | suite: ['util', 'util-crypto']) |
223 | 241 | ||
224 | testcrypto_crc = executable ('test_crypto_crc', | 242 | testcrypto_crc = executable ('test_crypto_crc', |
@@ -228,7 +246,7 @@ testcrypto_crc = executable ('test_crypto_crc', | |||
228 | build_by_default: false, | 246 | build_by_default: false, |
229 | install: false) | 247 | install: false) |
230 | test('test_crypto_crc', testcrypto_crc, | 248 | test('test_crypto_crc', testcrypto_crc, |
231 | workdir: meson.current_source_dir(), | 249 | workdir: meson.current_build_dir(), |
232 | suite: ['util', 'util-crypto']) | 250 | suite: ['util', 'util-crypto']) |
233 | 251 | ||
234 | testcrypto_cs = executable ('test_crypto_cs', | 252 | testcrypto_cs = executable ('test_crypto_cs', |
@@ -238,7 +256,7 @@ testcrypto_cs = executable ('test_crypto_cs', | |||
238 | build_by_default: false, | 256 | build_by_default: false, |
239 | install: false) | 257 | install: false) |
240 | test('test_crypto_cs', testcrypto_cs, | 258 | test('test_crypto_cs', testcrypto_cs, |
241 | workdir: meson.current_source_dir(), | 259 | workdir: meson.current_build_dir(), |
242 | suite: ['util', 'util-crypto']) | 260 | suite: ['util', 'util-crypto']) |
243 | 261 | ||
244 | testcrypto_ecdsa = executable ('test_crypto_ecdsa', | 262 | testcrypto_ecdsa = executable ('test_crypto_ecdsa', |
@@ -248,7 +266,7 @@ testcrypto_ecdsa = executable ('test_crypto_ecdsa', | |||
248 | build_by_default: false, | 266 | build_by_default: false, |
249 | install: false) | 267 | install: false) |
250 | test('test_crypto_ecdsa', testcrypto_ecdsa, | 268 | test('test_crypto_ecdsa', testcrypto_ecdsa, |
251 | workdir: meson.current_source_dir(), | 269 | workdir: meson.current_build_dir(), |
252 | suite: ['util', 'util-crypto']) | 270 | suite: ['util', 'util-crypto']) |
253 | 271 | ||
254 | testcrypto_eddsa = executable ('test_crypto_eddsa', | 272 | testcrypto_eddsa = executable ('test_crypto_eddsa', |
@@ -258,7 +276,7 @@ testcrypto_eddsa = executable ('test_crypto_eddsa', | |||
258 | build_by_default: false, | 276 | build_by_default: false, |
259 | install: false) | 277 | install: false) |
260 | test('test_crypto_eddsa', testcrypto_eddsa, | 278 | test('test_crypto_eddsa', testcrypto_eddsa, |
261 | workdir: meson.current_source_dir(), | 279 | workdir: meson.current_build_dir(), |
262 | suite: ['util', 'util-crypto']) | 280 | suite: ['util', 'util-crypto']) |
263 | 281 | ||
264 | testcrypto_ecdh_eddsa = executable ('test_crypto_ecdh_eddsa', | 282 | testcrypto_ecdh_eddsa = executable ('test_crypto_ecdh_eddsa', |
@@ -268,7 +286,7 @@ testcrypto_ecdh_eddsa = executable ('test_crypto_ecdh_eddsa', | |||
268 | build_by_default: false, | 286 | build_by_default: false, |
269 | install: false) | 287 | install: false) |
270 | test('test_crypto_ecdh_eddsa', testcrypto_ecdh_eddsa, | 288 | test('test_crypto_ecdh_eddsa', testcrypto_ecdh_eddsa, |
271 | workdir: meson.current_source_dir(), | 289 | workdir: meson.current_build_dir(), |
272 | suite: ['util', 'util-crypto']) | 290 | suite: ['util', 'util-crypto']) |
273 | 291 | ||
274 | testcrypto_ecdh_ecdsa = executable ('test_crypto_ecdh_ecdsa', | 292 | testcrypto_ecdh_ecdsa = executable ('test_crypto_ecdh_ecdsa', |
@@ -278,7 +296,7 @@ testcrypto_ecdh_ecdsa = executable ('test_crypto_ecdh_ecdsa', | |||
278 | build_by_default: false, | 296 | build_by_default: false, |
279 | install: false) | 297 | install: false) |
280 | test('test_crypto_ecdh_ecdsa', testcrypto_ecdh_ecdsa, | 298 | test('test_crypto_ecdh_ecdsa', testcrypto_ecdh_ecdsa, |
281 | workdir: meson.current_source_dir(), | 299 | workdir: meson.current_build_dir(), |
282 | suite: ['util', 'util-crypto']) | 300 | suite: ['util', 'util-crypto']) |
283 | 301 | ||
284 | testcrypto_edx25519 = executable ('test_crypto_edx25519', | 302 | testcrypto_edx25519 = executable ('test_crypto_edx25519', |
@@ -288,7 +306,7 @@ testcrypto_edx25519 = executable ('test_crypto_edx25519', | |||
288 | build_by_default: false, | 306 | build_by_default: false, |
289 | install: false) | 307 | install: false) |
290 | test('test_crypto_edx25519', testcrypto_edx25519, | 308 | test('test_crypto_edx25519', testcrypto_edx25519, |
291 | workdir: meson.current_source_dir(), | 309 | workdir: meson.current_build_dir(), |
292 | suite: ['util', 'util-crypto']) | 310 | suite: ['util', 'util-crypto']) |
293 | 311 | ||
294 | testcrypto_ecc_dlog = executable ('test_crypto_ecc_dlog', | 312 | testcrypto_ecc_dlog = executable ('test_crypto_ecc_dlog', |
@@ -298,7 +316,7 @@ testcrypto_ecc_dlog = executable ('test_crypto_ecc_dlog', | |||
298 | build_by_default: false, | 316 | build_by_default: false, |
299 | install: false) | 317 | install: false) |
300 | test('test_crypto_ecc_dlog', testcrypto_ecc_dlog, | 318 | test('test_crypto_ecc_dlog', testcrypto_ecc_dlog, |
301 | workdir: meson.current_source_dir(), | 319 | workdir: meson.current_build_dir(), |
302 | suite: ['util', 'util-crypto']) | 320 | suite: ['util', 'util-crypto']) |
303 | 321 | ||
304 | testcrypto_hash = executable ('test_crypto_hash', | 322 | testcrypto_hash = executable ('test_crypto_hash', |
@@ -308,7 +326,7 @@ testcrypto_hash = executable ('test_crypto_hash', | |||
308 | build_by_default: false, | 326 | build_by_default: false, |
309 | install: false) | 327 | install: false) |
310 | test('test_crypto_hash', testcrypto_hash, | 328 | test('test_crypto_hash', testcrypto_hash, |
311 | workdir: meson.current_source_dir(), | 329 | workdir: meson.current_build_dir(), |
312 | suite: ['util', 'util-crypto']) | 330 | suite: ['util', 'util-crypto']) |
313 | 331 | ||
314 | testcrypto_hash_context = executable ('test_crypto_hash_context', | 332 | testcrypto_hash_context = executable ('test_crypto_hash_context', |
@@ -318,7 +336,7 @@ testcrypto_hash_context = executable ('test_crypto_hash_context', | |||
318 | build_by_default: false, | 336 | build_by_default: false, |
319 | install: false) | 337 | install: false) |
320 | test('test_crypto_hash_context', testcrypto_hash_context, | 338 | test('test_crypto_hash_context', testcrypto_hash_context, |
321 | workdir: meson.current_source_dir(), | 339 | workdir: meson.current_build_dir(), |
322 | suite: ['util', 'util-crypto']) | 340 | suite: ['util', 'util-crypto']) |
323 | 341 | ||
324 | testcrypto_hkdf = executable ('test_crypto_hkdf', | 342 | testcrypto_hkdf = executable ('test_crypto_hkdf', |
@@ -328,7 +346,7 @@ testcrypto_hkdf = executable ('test_crypto_hkdf', | |||
328 | build_by_default: false, | 346 | build_by_default: false, |
329 | install: false) | 347 | install: false) |
330 | test('test_crypto_hkdf', testcrypto_hkdf, | 348 | test('test_crypto_hkdf', testcrypto_hkdf, |
331 | workdir: meson.current_source_dir(), | 349 | workdir: meson.current_build_dir(), |
332 | suite: ['util', 'util-crypto']) | 350 | suite: ['util', 'util-crypto']) |
333 | 351 | ||
334 | testcrypto_kdf = executable ('test_crypto_kdf', | 352 | testcrypto_kdf = executable ('test_crypto_kdf', |
@@ -338,7 +356,7 @@ testcrypto_kdf = executable ('test_crypto_kdf', | |||
338 | build_by_default: false, | 356 | build_by_default: false, |
339 | install: false) | 357 | install: false) |
340 | test('test_crypto_kdf', testcrypto_kdf, | 358 | test('test_crypto_kdf', testcrypto_kdf, |
341 | workdir: meson.current_source_dir(), | 359 | workdir: meson.current_build_dir(), |
342 | suite: ['util', 'util-crypto']) | 360 | suite: ['util', 'util-crypto']) |
343 | 361 | ||
344 | testcrypto_paillier = executable ('test_crypto_paillier', | 362 | testcrypto_paillier = executable ('test_crypto_paillier', |
@@ -348,7 +366,7 @@ testcrypto_paillier = executable ('test_crypto_paillier', | |||
348 | build_by_default: false, | 366 | build_by_default: false, |
349 | install: false) | 367 | install: false) |
350 | test('test_crypto_paillier', testcrypto_paillier, | 368 | test('test_crypto_paillier', testcrypto_paillier, |
351 | workdir: meson.current_source_dir(), | 369 | workdir: meson.current_build_dir(), |
352 | suite: ['util', 'util-crypto']) | 370 | suite: ['util', 'util-crypto']) |
353 | 371 | ||
354 | testcrypto_random = executable ('test_crypto_random', | 372 | testcrypto_random = executable ('test_crypto_random', |
@@ -358,7 +376,7 @@ testcrypto_random = executable ('test_crypto_random', | |||
358 | build_by_default: false, | 376 | build_by_default: false, |
359 | install: false) | 377 | install: false) |
360 | test('test_crypto_random', testcrypto_random, | 378 | test('test_crypto_random', testcrypto_random, |
361 | workdir: meson.current_source_dir(), | 379 | workdir: meson.current_build_dir(), |
362 | suite: ['util', 'util-crypto']) | 380 | suite: ['util', 'util-crypto']) |
363 | 381 | ||
364 | testcrypto_rsa = executable ('test_crypto_rsa', | 382 | testcrypto_rsa = executable ('test_crypto_rsa', |
@@ -368,7 +386,7 @@ testcrypto_rsa = executable ('test_crypto_rsa', | |||
368 | build_by_default: false, | 386 | build_by_default: false, |
369 | install: false) | 387 | install: false) |
370 | test('test_crypto_rsa', testcrypto_rsa, | 388 | test('test_crypto_rsa', testcrypto_rsa, |
371 | workdir: meson.current_source_dir(), | 389 | workdir: meson.current_build_dir(), |
372 | suite: ['util', 'util-crypto']) | 390 | suite: ['util', 'util-crypto']) |
373 | 391 | ||
374 | testdisk = executable ('test_disk', | 392 | testdisk = executable ('test_disk', |
@@ -378,7 +396,7 @@ testdisk = executable ('test_disk', | |||
378 | build_by_default: false, | 396 | build_by_default: false, |
379 | install: false) | 397 | install: false) |
380 | test('test_disk', testdisk, | 398 | test('test_disk', testdisk, |
381 | workdir: meson.current_source_dir(), | 399 | workdir: meson.current_build_dir(), |
382 | suite: ['util', 'util-misc']) | 400 | suite: ['util', 'util-misc']) |
383 | 401 | ||
384 | testgetopt = executable ('test_getopt', | 402 | testgetopt = executable ('test_getopt', |
@@ -388,7 +406,7 @@ testgetopt = executable ('test_getopt', | |||
388 | build_by_default: false, | 406 | build_by_default: false, |
389 | install: false) | 407 | install: false) |
390 | test('test_getopt', testgetopt, | 408 | test('test_getopt', testgetopt, |
391 | workdir: meson.current_source_dir(), | 409 | workdir: meson.current_build_dir(), |
392 | suite: ['util', 'util-misc']) | 410 | suite: ['util', 'util-misc']) |
393 | 411 | ||
394 | testhexcoder = executable ('test_hexcoder', | 412 | testhexcoder = executable ('test_hexcoder', |
@@ -398,7 +416,7 @@ testhexcoder = executable ('test_hexcoder', | |||
398 | build_by_default: false, | 416 | build_by_default: false, |
399 | install: false) | 417 | install: false) |
400 | test('test_hexcoder', testhexcoder, | 418 | test('test_hexcoder', testhexcoder, |
401 | workdir: meson.current_source_dir(), | 419 | workdir: meson.current_build_dir(), |
402 | suite: ['util', 'util-misc']) | 420 | suite: ['util', 'util-misc']) |
403 | 421 | ||
404 | testmq = executable ('test_mq', | 422 | testmq = executable ('test_mq', |
@@ -408,7 +426,7 @@ testmq = executable ('test_mq', | |||
408 | build_by_default: false, | 426 | build_by_default: false, |
409 | install: false) | 427 | install: false) |
410 | test('test_mq', testmq, | 428 | test('test_mq', testmq, |
411 | workdir: meson.current_source_dir(), | 429 | workdir: meson.current_build_dir(), |
412 | suite: ['util', 'util-misc']) | 430 | suite: ['util', 'util-misc']) |
413 | 431 | ||
414 | testos_network = executable ('test_os_network', | 432 | testos_network = executable ('test_os_network', |
@@ -418,7 +436,7 @@ testos_network = executable ('test_os_network', | |||
418 | build_by_default: false, | 436 | build_by_default: false, |
419 | install: false) | 437 | install: false) |
420 | test('test_os_network', testos_network, | 438 | test('test_os_network', testos_network, |
421 | workdir: meson.current_source_dir(), | 439 | workdir: meson.current_build_dir(), |
422 | suite: ['util', 'util-os']) | 440 | suite: ['util', 'util-os']) |
423 | 441 | ||
424 | testpeer = executable ('test_peer', | 442 | testpeer = executable ('test_peer', |
@@ -428,9 +446,15 @@ testpeer = executable ('test_peer', | |||
428 | build_by_default: false, | 446 | build_by_default: false, |
429 | install: false) | 447 | install: false) |
430 | test('test_peer', testpeer, | 448 | test('test_peer', testpeer, |
431 | workdir: meson.current_source_dir(), | 449 | workdir: meson.current_build_dir(), |
432 | suite: ['util', 'util-misc']) | 450 | suite: ['util', 'util-misc']) |
433 | 451 | ||
452 | testplugin_plug = shared_module ('gnunet_plugin_utiltest', | ||
453 | ['test_plugin_plug.c'], | ||
454 | dependencies: [libgnunetutil_dep], | ||
455 | include_directories: [incdir, configuration_inc], | ||
456 | build_by_default: false, | ||
457 | install: false) | ||
434 | testplugin = executable ('test_plugin', | 458 | testplugin = executable ('test_plugin', |
435 | ['test_plugin.c'], | 459 | ['test_plugin.c'], |
436 | dependencies: [libgnunetutil_dep], | 460 | dependencies: [libgnunetutil_dep], |
@@ -438,7 +462,8 @@ testplugin = executable ('test_plugin', | |||
438 | build_by_default: false, | 462 | build_by_default: false, |
439 | install: false) | 463 | install: false) |
440 | test('test_plugin', testplugin, | 464 | test('test_plugin', testplugin, |
441 | workdir: meson.current_source_dir(), | 465 | depends: [testplugin_plug], |
466 | workdir: meson.current_build_dir(), | ||
442 | suite: ['util', 'util-misc']) | 467 | suite: ['util', 'util-misc']) |
443 | 468 | ||
444 | testprogram = executable ('test_program', | 469 | testprogram = executable ('test_program', |
@@ -448,7 +473,7 @@ testprogram = executable ('test_program', | |||
448 | build_by_default: false, | 473 | build_by_default: false, |
449 | install: false) | 474 | install: false) |
450 | test('test_program', testprogram, | 475 | test('test_program', testprogram, |
451 | workdir: meson.current_source_dir(), | 476 | workdir: meson.current_build_dir(), |
452 | suite: ['util', 'util-misc']) | 477 | suite: ['util', 'util-misc']) |
453 | 478 | ||
454 | testregex = executable ('test_regex', | 479 | testregex = executable ('test_regex', |
@@ -458,7 +483,7 @@ testregex = executable ('test_regex', | |||
458 | build_by_default: false, | 483 | build_by_default: false, |
459 | install: false) | 484 | install: false) |
460 | test('test_regex', testregex, | 485 | test('test_regex', testregex, |
461 | workdir: meson.current_source_dir(), | 486 | workdir: meson.current_build_dir(), |
462 | suite: ['util', 'util-misc']) | 487 | suite: ['util', 'util-misc']) |
463 | 488 | ||
464 | # test_resolver_api.nc | 489 | # test_resolver_api.nc |
@@ -470,7 +495,7 @@ testscheduler = executable ('test_scheduler', | |||
470 | build_by_default: false, | 495 | build_by_default: false, |
471 | install: false) | 496 | install: false) |
472 | test('test_scheduler', testscheduler, | 497 | test('test_scheduler', testscheduler, |
473 | workdir: meson.current_source_dir(), | 498 | workdir: meson.current_build_dir(), |
474 | suite: ['util', 'util-scheduler']) | 499 | suite: ['util', 'util-scheduler']) |
475 | 500 | ||
476 | testscheduler_delay = executable ('test_scheduler_delay', | 501 | testscheduler_delay = executable ('test_scheduler_delay', |
@@ -480,7 +505,7 @@ testscheduler_delay = executable ('test_scheduler_delay', | |||
480 | build_by_default: false, | 505 | build_by_default: false, |
481 | install: false) | 506 | install: false) |
482 | test('test_scheduler_delay', testscheduler_delay, | 507 | test('test_scheduler_delay', testscheduler_delay, |
483 | workdir: meson.current_source_dir(), | 508 | workdir: meson.current_build_dir(), |
484 | suite: ['util', 'util-scheduler']) | 509 | suite: ['util', 'util-scheduler']) |
485 | 510 | ||
486 | testscheduler_hogging_cancel = executable ('test_scheduler_hogging_cancel', | 511 | testscheduler_hogging_cancel = executable ('test_scheduler_hogging_cancel', |
@@ -490,7 +515,7 @@ testscheduler_hogging_cancel = executable ('test_scheduler_hogging_cancel', | |||
490 | build_by_default: false, | 515 | build_by_default: false, |
491 | install: false) | 516 | install: false) |
492 | test('test_scheduler_hogging_cancel', testscheduler_hogging_cancel, | 517 | test('test_scheduler_hogging_cancel', testscheduler_hogging_cancel, |
493 | workdir: meson.current_source_dir(), | 518 | workdir: meson.current_build_dir(), |
494 | suite: ['util', 'util-scheduler']) | 519 | suite: ['util', 'util-scheduler']) |
495 | 520 | ||
496 | testscheduler_hogging_prio = executable ('test_scheduler_hogging_priority', | 521 | testscheduler_hogging_prio = executable ('test_scheduler_hogging_priority', |
@@ -500,7 +525,7 @@ testscheduler_hogging_prio = executable ('test_scheduler_hogging_priority', | |||
500 | build_by_default: false, | 525 | build_by_default: false, |
501 | install: false) | 526 | install: false) |
502 | test('test_scheduler_hogging_priority', testscheduler_hogging_prio, | 527 | test('test_scheduler_hogging_priority', testscheduler_hogging_prio, |
503 | workdir: meson.current_source_dir(), | 528 | workdir: meson.current_build_dir(), |
504 | suite: ['util', 'util-scheduler']) | 529 | suite: ['util', 'util-scheduler']) |
505 | 530 | ||
506 | testservice = executable ('test_service', | 531 | testservice = executable ('test_service', |
@@ -510,7 +535,7 @@ testservice = executable ('test_service', | |||
510 | build_by_default: false, | 535 | build_by_default: false, |
511 | install: false) | 536 | install: false) |
512 | test('test_service', testservice, | 537 | test('test_service', testservice, |
513 | workdir: meson.current_source_dir(), | 538 | workdir: meson.current_build_dir(), |
514 | suite: ['util', 'util-misc']) | 539 | suite: ['util', 'util-misc']) |
515 | 540 | ||
516 | teststrings = executable ('test_strings', | 541 | teststrings = executable ('test_strings', |
@@ -520,7 +545,7 @@ teststrings = executable ('test_strings', | |||
520 | build_by_default: false, | 545 | build_by_default: false, |
521 | install: false) | 546 | install: false) |
522 | test('test_strings', teststrings, | 547 | test('test_strings', teststrings, |
523 | workdir: meson.current_source_dir(), | 548 | workdir: meson.current_build_dir(), |
524 | suite: ['util', 'util-strings']) | 549 | suite: ['util', 'util-strings']) |
525 | 550 | ||
526 | teststrings_todata = executable ('test_strings_to_data', | 551 | teststrings_todata = executable ('test_strings_to_data', |
@@ -530,7 +555,7 @@ teststrings_todata = executable ('test_strings_to_data', | |||
530 | build_by_default: false, | 555 | build_by_default: false, |
531 | install: false) | 556 | install: false) |
532 | test('test_strings_to_data', teststrings_todata, | 557 | test('test_strings_to_data', teststrings_todata, |
533 | workdir: meson.current_source_dir(), | 558 | workdir: meson.current_build_dir(), |
534 | suite: ['util', 'util-strings']) | 559 | suite: ['util', 'util-strings']) |
535 | 560 | ||
536 | testspeedup = executable ('test_speedup', | 561 | testspeedup = executable ('test_speedup', |
@@ -540,7 +565,7 @@ testspeedup = executable ('test_speedup', | |||
540 | build_by_default: false, | 565 | build_by_default: false, |
541 | install: false) | 566 | install: false) |
542 | test('test_speedup', testspeedup, | 567 | test('test_speedup', testspeedup, |
543 | workdir: meson.current_source_dir(), | 568 | workdir: meson.current_build_dir(), |
544 | suite: ['util', 'util-misc']) | 569 | suite: ['util', 'util-misc']) |
545 | 570 | ||
546 | testtime = executable ('test_time', | 571 | testtime = executable ('test_time', |
@@ -550,7 +575,7 @@ testtime = executable ('test_time', | |||
550 | build_by_default: false, | 575 | build_by_default: false, |
551 | install: false) | 576 | install: false) |
552 | test('test_time', testtime, | 577 | test('test_time', testtime, |
553 | workdir: meson.current_source_dir(), | 578 | workdir: meson.current_build_dir(), |
554 | suite: ['util', 'util-misc']) | 579 | suite: ['util', 'util-misc']) |
555 | 580 | ||
556 | testtun = executable ('test_tun', | 581 | testtun = executable ('test_tun', |
@@ -560,7 +585,7 @@ testtun = executable ('test_tun', | |||
560 | build_by_default: false, | 585 | build_by_default: false, |
561 | install: false) | 586 | install: false) |
562 | test('test_tun', testtun, | 587 | test('test_tun', testtun, |
563 | workdir: meson.current_source_dir(), | 588 | workdir: meson.current_build_dir(), |
564 | suite: ['util', 'util-misc']) | 589 | suite: ['util', 'util-misc']) |
565 | 590 | ||
566 | testuri = executable ('test_uri', | 591 | testuri = executable ('test_uri', |
@@ -570,7 +595,7 @@ testuri = executable ('test_uri', | |||
570 | build_by_default: false, | 595 | build_by_default: false, |
571 | install: false) | 596 | install: false) |
572 | test('test_uri', testuri, | 597 | test('test_uri', testuri, |
573 | workdir: meson.current_source_dir(), | 598 | workdir: meson.current_build_dir(), |
574 | suite: ['util', 'util-misc']) | 599 | suite: ['util', 'util-misc']) |
575 | 600 | ||
576 | # FIXME Benchmarks | 601 | # FIXME Benchmarks |
@@ -582,7 +607,7 @@ testos_start_process = executable ('test_os_start_process', | |||
582 | build_by_default: false, | 607 | build_by_default: false, |
583 | install: false) | 608 | install: false) |
584 | test('test_os_start_process', testos_start_process, | 609 | test('test_os_start_process', testos_start_process, |
585 | workdir: meson.current_source_dir(), | 610 | workdir: meson.current_build_dir(), |
586 | suite: ['util', 'util-os']) | 611 | suite: ['util', 'util-os']) |
587 | 612 | ||
588 | testcommon_logging_runtime = executable ('test_common_logging_runtime_loglevels', | 613 | testcommon_logging_runtime = executable ('test_common_logging_runtime_loglevels', |
@@ -592,7 +617,8 @@ testcommon_logging_runtime = executable ('test_common_logging_runtime_loglevels' | |||
592 | build_by_default: false, | 617 | build_by_default: false, |
593 | install: false) | 618 | install: false) |
594 | test('test_common_logging_runtime_loglevels', testcommon_logging_runtime, | 619 | test('test_common_logging_runtime_loglevels', testcommon_logging_runtime, |
595 | workdir: meson.current_source_dir(), | 620 | depends: [logging_dummy], |
621 | workdir: meson.current_build_dir(), | ||
596 | suite: ['util', 'util-common']) | 622 | suite: ['util', 'util-common']) |
597 | 623 | ||
598 | 624 | ||
diff --git a/src/lib/util/test_os_network.c b/src/lib/util/test_os_network.c index 74e98663b..3bf4e1ba0 100644 --- a/src/lib/util/test_os_network.c +++ b/src/lib/util/test_os_network.c | |||
@@ -44,22 +44,23 @@ proc (void *cls, | |||
44 | char buf[INET6_ADDRSTRLEN]; | 44 | char buf[INET6_ADDRSTRLEN]; |
45 | const char *protocol; | 45 | const char *protocol; |
46 | 46 | ||
47 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, "hiho\n"); | ||
47 | if (NULL == addr) | 48 | if (NULL == addr) |
48 | return GNUNET_OK; | 49 | return GNUNET_OK; |
49 | if (addrlen == sizeof(struct sockaddr_in)) | 50 | if (addrlen == sizeof(struct sockaddr_in)) |
50 | protocol = "IPv4"; | 51 | protocol = "IPv4"; |
51 | else | 52 | else |
52 | protocol = "IPv6"; | 53 | protocol = "IPv6"; |
53 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 54 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
54 | "%s Address `%s'\n", | 55 | "%s Address `%s'\n", |
55 | protocol, | 56 | protocol, |
56 | GNUNET_a2s ((const struct sockaddr *) addr, | 57 | GNUNET_a2s ((const struct sockaddr *) addr, |
57 | addrlen)); | 58 | addrlen)); |
58 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 59 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
59 | "Netmask `%s'\n", | 60 | "Netmask `%s'\n", |
60 | GNUNET_a2s ((const struct sockaddr *) netmask, | 61 | GNUNET_a2s ((const struct sockaddr *) netmask, |
61 | addrlen)); | 62 | addrlen)); |
62 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 63 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
63 | "`%s'\n", | 64 | "`%s'\n", |
64 | GNUNET_a2s ((const struct sockaddr *) broadcast_addr, | 65 | GNUNET_a2s ((const struct sockaddr *) broadcast_addr, |
65 | addrlen)); | 66 | addrlen)); |
diff --git a/src/meson.build b/src/meson.build index 8f8342a4d..03b5fd3eb 100644 --- a/src/meson.build +++ b/src/meson.build | |||
@@ -1,7 +1,3 @@ | |||
1 | if get_option('monolith') == true | ||
2 | gnunet_src = [] | ||
3 | endif | ||
4 | |||
5 | subdir('include') | 1 | subdir('include') |
6 | subdir('lib') | 2 | subdir('lib') |
7 | subdir('plugin') | 3 | subdir('plugin') |
diff --git a/src/plugin/Makefile.am b/src/plugin/Makefile.am index 78e06fd63..f74726ea2 100644 --- a/src/plugin/Makefile.am +++ b/src/plugin/Makefile.am | |||
@@ -8,6 +8,8 @@ SUBDIRS = \ | |||
8 | namecache \ | 8 | namecache \ |
9 | namestore \ | 9 | namestore \ |
10 | dht \ | 10 | dht \ |
11 | setu \ | ||
12 | seti \ | ||
11 | revocation \ | 13 | revocation \ |
12 | regex \ | 14 | regex \ |
13 | gns \ | 15 | gns \ |
diff --git a/src/plugin/datastore/test_defaults.conf b/src/plugin/datastore/test_defaults.conf new file mode 100644 index 000000000..1f971de8f --- /dev/null +++ b/src/plugin/datastore/test_defaults.conf | |||
@@ -0,0 +1,10 @@ | |||
1 | @inline@ ../../contrib/conf/gnunet/no_autostart_above_core.conf | ||
2 | @inline@ ../../contrib/conf/gnunet/no_forcestart.conf | ||
3 | |||
4 | [datastore] | ||
5 | PORT = 22654 | ||
6 | QUOTA = 1 MB | ||
7 | START_ON_DEMAND = YES | ||
8 | |||
9 | [nse] | ||
10 | WORKBITS = 1 | ||
diff --git a/src/plugin/reclaim/meson.build b/src/plugin/reclaim/meson.build index df0289ca2..cde9fc726 100644 --- a/src/plugin/reclaim/meson.build +++ b/src/plugin/reclaim/meson.build | |||
@@ -15,7 +15,9 @@ shared_module('gnunet_plugin_reclaim_attribute_basic', | |||
15 | install: true, | 15 | install: true, |
16 | install_dir: get_option('libdir') / 'gnunet') | 16 | install_dir: get_option('libdir') / 'gnunet') |
17 | shared_module('gnunet_plugin_reclaim_credential_jwt', | 17 | shared_module('gnunet_plugin_reclaim_credential_jwt', |
18 | ['plugin_reclaim_credential_jwt.c'], | 18 | ['plugin_reclaim_credential_jwt.c', |
19 | '../../service/reclaim/reclaim_attribute.c', | ||
20 | '../../service/reclaim/reclaim_credential.c'], | ||
19 | dependencies: [ | 21 | dependencies: [ |
20 | libgnunetjson_dep, | 22 | libgnunetjson_dep, |
21 | libgnunetutil_dep, | 23 | libgnunetutil_dep, |
diff --git a/src/plugin/revocation/meson.build b/src/plugin/revocation/meson.build index c4405e9b8..0ac8df28d 100644 --- a/src/plugin/revocation/meson.build +++ b/src/plugin/revocation/meson.build | |||
@@ -1,6 +1,7 @@ | |||
1 | shared_module('gnunet_plugin_block_revocation', | 1 | shared_module('gnunet_plugin_block_revocation', |
2 | ['plugin_block_revocation.c'], | 2 | ['plugin_block_revocation.c'], |
3 | dependencies: [libgnunetutil_dep, | 3 | dependencies: [libgnunetutil_dep, |
4 | libgnunetgnsrecord_dep, | ||
4 | libgnunetblock_dep], | 5 | libgnunetblock_dep], |
5 | include_directories: [incdir, configuration_inc], | 6 | include_directories: [incdir, configuration_inc], |
6 | install: true, | 7 | install: true, |
diff --git a/src/service/cadet/gnunet-service-cadet_dht.c b/src/service/cadet/gnunet-service-cadet_dht.c index 215f6e184..ef5669344 100644 --- a/src/service/cadet/gnunet-service-cadet_dht.c +++ b/src/service/cadet/gnunet-service-cadet_dht.c | |||
@@ -120,7 +120,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
120 | const void *data) | 120 | const void *data) |
121 | { | 121 | { |
122 | const struct GNUNET_MessageHeader *hello = data; | 122 | const struct GNUNET_MessageHeader *hello = data; |
123 | const struct GNUNET_HELLO_Builder *builder = GNUNET_HELLO_builder_from_msg (hello); | 123 | struct GNUNET_HELLO_Builder *builder = GNUNET_HELLO_builder_from_msg (hello); |
124 | 124 | ||
125 | GNUNET_assert (NULL != builder); | 125 | GNUNET_assert (NULL != builder); |
126 | (void) trunc_peer; | 126 | (void) trunc_peer; |
diff --git a/src/service/core/core_api_cmd_connecting_peers.c b/src/service/core/core_api_cmd_connecting_peers.c index 0dde3d61b..5a80ee415 100644 --- a/src/service/core/core_api_cmd_connecting_peers.c +++ b/src/service/core/core_api_cmd_connecting_peers.c | |||
@@ -134,12 +134,11 @@ connect_peers_run (void *cls, | |||
134 | { | 134 | { |
135 | char *prefix; | 135 | char *prefix; |
136 | char *rest; | 136 | char *rest; |
137 | char *rest2; | ||
138 | char *address; | 137 | char *address; |
139 | 138 | ||
140 | prefix = strtok (addr, "_"); | 139 | prefix = strtok (addr, "_"); |
141 | rest = strtok (NULL, "_"); | 140 | rest = strtok (NULL, "_"); |
142 | rest2 = strtok (rest, "-"); | 141 | strtok (rest, "-"); |
143 | address = strtok (NULL, "-"); | 142 | address = strtok (NULL, "-"); |
144 | 143 | ||
145 | GNUNET_asprintf (&addr_and_port, | 144 | GNUNET_asprintf (&addr_and_port, |
diff --git a/src/service/core/meson.build b/src/service/core/meson.build index 6de15cd6d..483aa0a11 100644 --- a/src/service/core/meson.build +++ b/src/service/core/meson.build | |||
@@ -50,6 +50,7 @@ libgnunetcoretesting_dep = declare_dependency(link_with : libgnunetcoretesting) | |||
50 | shared_module('gnunet_test_core_plugin_cmd_just_run', | 50 | shared_module('gnunet_test_core_plugin_cmd_just_run', |
51 | ['test_core_plugin_cmd_just_run.c'], | 51 | ['test_core_plugin_cmd_just_run.c'], |
52 | dependencies: [libgnunetutil_dep, | 52 | dependencies: [libgnunetutil_dep, |
53 | libgnunettesting_dep, | ||
53 | libgnunetcoretesting_dep, | 54 | libgnunetcoretesting_dep, |
54 | libgnunettransportcore_dep, | 55 | libgnunettransportcore_dep, |
55 | libgnunettransportapplication_dep, | 56 | libgnunettransportapplication_dep, |
diff --git a/src/service/core/test_core_plugin_cmd_just_run.c b/src/service/core/test_core_plugin_cmd_just_run.c index 04b65607d..edb458577 100644 --- a/src/service/core/test_core_plugin_cmd_just_run.c +++ b/src/service/core/test_core_plugin_cmd_just_run.c | |||
@@ -56,8 +56,6 @@ static struct GNUNET_TESTING_Command start_peer; | |||
56 | 56 | ||
57 | static struct GNUNET_TESTING_Interpreter *is; | 57 | static struct GNUNET_TESTING_Interpreter *is; |
58 | 58 | ||
59 | static struct GNUNET_CONTAINER_MultiPeerMap *senders; | ||
60 | |||
61 | struct TestState | 59 | struct TestState |
62 | { | 60 | { |
63 | /** | 61 | /** |
@@ -133,16 +131,6 @@ get_waiting_for_barriers () | |||
133 | 131 | ||
134 | 132 | ||
135 | /** | 133 | /** |
136 | * Callback to set the flag indicating all peers started. Will be called via the plugin api. | ||
137 | * | ||
138 | */ | ||
139 | static void | ||
140 | all_peers_started () | ||
141 | { | ||
142 | } | ||
143 | |||
144 | |||
145 | /** | ||
146 | * Function called with the final result of the test. | 134 | * Function called with the final result of the test. |
147 | * | 135 | * |
148 | * @param cls the `struct MainParams` | 136 | * @param cls the `struct MainParams` |
@@ -166,48 +154,6 @@ handle_result (void *cls, | |||
166 | } | 154 | } |
167 | 155 | ||
168 | 156 | ||
169 | /** | ||
170 | * Callback from start peer cmd for signaling a peer got connected. | ||
171 | * | ||
172 | * | ||
173 | static void * | ||
174 | notify_connect (struct GNUNET_TESTING_Interpreter *is, | ||
175 | const struct GNUNET_PeerIdentity *peer) | ||
176 | { | ||
177 | const struct ConnectPeersState *cps; | ||
178 | const struct GNUNET_TESTING_Command *cmd; | ||
179 | |||
180 | cmd = GNUNET_TESTING_interpreter_lookup_command (is, | ||
181 | "connect-peers"); | ||
182 | GNUNET_TRANSPORT_get_trait_connect_peer_state (cmd, | ||
183 | &cps); | ||
184 | void *ret = NULL; | ||
185 | |||
186 | cps->notify_connect (is, | ||
187 | peer); | ||
188 | return ret; | ||
189 | }*/ | ||
190 | |||
191 | |||
192 | /** | ||
193 | * Callback to set the flag indicating all peers are prepared to finish. Will be called via the plugin api. | ||
194 | */ | ||
195 | static void | ||
196 | all_local_tests_prepared () | ||
197 | { | ||
198 | const struct GNUNET_TESTING_LocalPreparedState *lfs; | ||
199 | |||
200 | GNUNET_TESTING_get_trait_local_prepared_state (&local_prepared, | ||
201 | &lfs); | ||
202 | GNUNET_assert (NULL != &lfs->ac); | ||
203 | if (NULL == lfs->ac.cont) | ||
204 | GNUNET_TESTING_async_fail ((struct GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
205 | else | ||
206 | GNUNET_TESTING_async_finish ((struct | ||
207 | GNUNET_TESTING_AsyncContext *) &lfs->ac); | ||
208 | } | ||
209 | |||
210 | |||
211 | static void | 157 | static void |
212 | child_completed_callback (void *cls, | 158 | child_completed_callback (void *cls, |
213 | enum GNUNET_OS_ProcessStatusType type, | 159 | enum GNUNET_OS_ProcessStatusType type, |
@@ -218,82 +164,6 @@ child_completed_callback (void *cls, | |||
218 | 164 | ||
219 | 165 | ||
220 | /** | 166 | /** |
221 | * Function called to check a message being | ||
222 | * received. | ||
223 | * | ||
224 | */ | ||
225 | static int | ||
226 | check_encrypted (void *cls, struct GNUNET_MessageHeader *header) | ||
227 | { | ||
228 | return GNUNET_OK; | ||
229 | } | ||
230 | |||
231 | |||
232 | static void | ||
233 | core_receive_continue (struct GNUNET_PeerIdentity *peer) | ||
234 | { | ||
235 | const struct GNUNET_TESTING_StartPeerState *sps; | ||
236 | |||
237 | GNUNET_TESTING_get_trait_state (&start_peer, | ||
238 | &sps); | ||
239 | |||
240 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
241 | "Executing core receive continue\n"); | ||
242 | |||
243 | GNUNET_TRANSPORT_core_receive_continue (sps->th, peer); | ||
244 | } | ||
245 | |||
246 | |||
247 | /*static void | ||
248 | handle_core (void *cls, struct GNUNET_MessageHeader *header) | ||
249 | { | ||
250 | struct GNUNET_PeerIdentity *peer = cls; | ||
251 | |||
252 | core_receive_continue (peer); | ||
253 | }*/ | ||
254 | |||
255 | |||
256 | /** | ||
257 | * Function called to handle a message being received. | ||
258 | * | ||
259 | */ | ||
260 | static void | ||
261 | handle_encrypted (void *cls, struct GNUNET_MessageHeader *header) | ||
262 | { | ||
263 | struct GNUNET_PeerIdentity *peer = cls; | ||
264 | |||
265 | core_receive_continue (peer); | ||
266 | } | ||
267 | |||
268 | |||
269 | static void | ||
270 | handle_ephemeral_key (void *cls, struct GNUNET_MessageHeader *header) | ||
271 | { | ||
272 | struct GNUNET_PeerIdentity *peer = cls; | ||
273 | |||
274 | core_receive_continue (peer); | ||
275 | } | ||
276 | |||
277 | |||
278 | static void | ||
279 | handle_ping (void *cls, struct GNUNET_MessageHeader *header) | ||
280 | { | ||
281 | struct GNUNET_PeerIdentity *peer = cls; | ||
282 | |||
283 | core_receive_continue (peer); | ||
284 | } | ||
285 | |||
286 | |||
287 | static void | ||
288 | handle_pong (void *cls, struct GNUNET_MessageHeader *header) | ||
289 | { | ||
290 | struct GNUNET_PeerIdentity *peer = cls; | ||
291 | |||
292 | core_receive_continue (peer); | ||
293 | } | ||
294 | |||
295 | |||
296 | /** | ||
297 | * Function to start a local test case. | 167 | * Function to start a local test case. |
298 | * | 168 | * |
299 | * @param write_message Callback to send a message to the master loop. | 169 | * @param write_message Callback to send a message to the master loop. |
@@ -393,15 +263,11 @@ start_testcase (GNUNET_TESTING_cmd_helper_write_cb write_message, | |||
393 | 263 | ||
394 | if (1 == m_int) | 264 | if (1 == m_int) |
395 | { | 265 | { |
396 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
397 | "m_int %u should be 1\n"); | ||
398 | GNUNET_asprintf (&ts->cfgname, | 266 | GNUNET_asprintf (&ts->cfgname, |
399 | "test_core_just_run_host.conf"); | 267 | "test_core_just_run_host.conf"); |
400 | } | 268 | } |
401 | else | 269 | else |
402 | { | 270 | { |
403 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
404 | "m_int %u should not be 1\n"); | ||
405 | GNUNET_asprintf (&ts->cfgname, | 271 | GNUNET_asprintf (&ts->cfgname, |
406 | "test_core_just_run.conf"); | 272 | "test_core_just_run.conf"); |
407 | } | 273 | } |
diff --git a/src/service/datacache/test_datacache.c b/src/service/datacache/test_datacache.c index 7b7270609..f06d4ceab 100644 --- a/src/service/datacache/test_datacache.c +++ b/src/service/datacache/test_datacache.c | |||
@@ -36,7 +36,7 @@ static int ok; | |||
36 | /** | 36 | /** |
37 | * Name of plugin under test. | 37 | * Name of plugin under test. |
38 | */ | 38 | */ |
39 | static const char *plugin_name; | 39 | static char *plugin_name; |
40 | 40 | ||
41 | 41 | ||
42 | static enum GNUNET_GenericReturnValue | 42 | static enum GNUNET_GenericReturnValue |
diff --git a/src/service/datacache/test_datacache_quota.c b/src/service/datacache/test_datacache_quota.c index e2fc6ae61..6067b79fa 100644 --- a/src/service/datacache/test_datacache_quota.c +++ b/src/service/datacache/test_datacache_quota.c | |||
@@ -36,7 +36,7 @@ static int ok; | |||
36 | /** | 36 | /** |
37 | * Name of plugin under test. | 37 | * Name of plugin under test. |
38 | */ | 38 | */ |
39 | static const char *plugin_name; | 39 | static char *plugin_name; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Quota is 1 MB. Each iteration of the test puts in about 1 MB of | 42 | * Quota is 1 MB. Each iteration of the test puts in about 1 MB of |
diff --git a/src/service/meson.build b/src/service/meson.build index b089c9794..ad2dad394 100644 --- a/src/service/meson.build +++ b/src/service/meson.build | |||
@@ -1,3 +1,9 @@ | |||
1 | # We collect all sources for the 'big' libgnunet when traversing | ||
2 | # the subdirectories. | ||
3 | if get_option('monolith') | ||
4 | gnunet_src = [] | ||
5 | endif | ||
6 | |||
1 | subdir('util') | 7 | subdir('util') |
2 | subdir('arm') | 8 | subdir('arm') |
3 | subdir('statistics') | 9 | subdir('statistics') |
@@ -35,6 +41,11 @@ subdir('rest') | |||
35 | if not get_option('monolith') | 41 | if not get_option('monolith') |
36 | subdir_done() | 42 | subdir_done() |
37 | endif | 43 | endif |
44 | |||
45 | # Compile the 'big' libgnunet shared library. | ||
46 | # It must be compiled with HAVE_GNUNET_MONOLITH to enable | ||
47 | # the correct service macros that do not inject main() functions | ||
48 | # to services. | ||
38 | libgnunet = library('gnunet', | 49 | libgnunet = library('gnunet', |
39 | gnunet_src, | 50 | gnunet_src, |
40 | dependencies: [gnunetdeps, | 51 | dependencies: [gnunetdeps, |
@@ -47,6 +58,7 @@ libgnunet = library('gnunet', | |||
47 | libgnunetgnsrecord_dep, | 58 | libgnunetgnsrecord_dep, |
48 | libgnunetgnsrecordjson_dep, | 59 | libgnunetgnsrecordjson_dep, |
49 | jose_dep, | 60 | jose_dep, |
61 | m_dep, | ||
50 | libgnunetcurl_dep], | 62 | libgnunetcurl_dep], |
51 | c_args: ['-DHAVE_GNUNET_MONOLITH=1'], | 63 | c_args: ['-DHAVE_GNUNET_MONOLITH=1'], |
52 | include_directories: [incdir, configuration_inc, exitdir]) | 64 | include_directories: [incdir, configuration_inc, exitdir]) |
diff --git a/src/service/messenger/gnunet-service-messenger_message_recv.c b/src/service/messenger/gnunet-service-messenger_message_recv.c index ea309f893..d660d0115 100644 --- a/src/service/messenger/gnunet-service-messenger_message_recv.c +++ b/src/service/messenger/gnunet-service-messenger_message_recv.c | |||
@@ -139,7 +139,7 @@ callback_found_message (void *cls, | |||
139 | const struct GNUNET_MESSENGER_Message *message, | 139 | const struct GNUNET_MESSENGER_Message *message, |
140 | const struct GNUNET_HashCode *hash) | 140 | const struct GNUNET_HashCode *hash) |
141 | { | 141 | { |
142 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = tunnel; | 142 | struct GNUNET_MESSENGER_SrvTunnel *tunnel = cls; |
143 | 143 | ||
144 | if (!message) | 144 | if (!message) |
145 | { | 145 | { |
diff --git a/src/service/nat-auto/Makefile.am b/src/service/nat-auto/Makefile.am index a82afbea2..d34a16761 100644 --- a/src/service/nat-auto/Makefile.am +++ b/src/service/nat-auto/Makefile.am | |||
@@ -30,7 +30,7 @@ libgnunetnatauto_la_LDFLAGS = \ | |||
30 | -version-info 0:0:0 | 30 | -version-info 0:0:0 |
31 | 31 | ||
32 | gnunet_service_nat_auto_SOURCES = \ | 32 | gnunet_service_nat_auto_SOURCES = \ |
33 | gnunet-service-nat-auto.c | 33 | gnunet-service-nat-auto.c nat-auto.h |
34 | gnunet_service_nat_auto_LDADD = \ | 34 | gnunet_service_nat_auto_LDADD = \ |
35 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | 35 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
36 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ | 36 | $(top_builddir)/src/service/statistics/libgnunetstatistics.la \ |
diff --git a/src/service/nat/gnunet-service-nat.c b/src/service/nat/gnunet-service-nat.c index dde269819..08c87d0be 100644 --- a/src/service/nat/gnunet-service-nat.c +++ b/src/service/nat/gnunet-service-nat.c | |||
@@ -2070,7 +2070,7 @@ GNUNET_SERVICE_MAIN | |||
2070 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 2070 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
2071 | */ | 2071 | */ |
2072 | void __attribute__ ((constructor)) | 2072 | void __attribute__ ((constructor)) |
2073 | GNUNET_ARM_memory_init () | 2073 | GNUNET_NATM_memory_init () |
2074 | { | 2074 | { |
2075 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 2075 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
2076 | mallopt (M_TOP_PAD, 1 * 1024); | 2076 | mallopt (M_TOP_PAD, 1 * 1024); |
diff --git a/src/service/nse/gnunet-service-nse.c b/src/service/nse/gnunet-service-nse.c index ee1cb025f..ddb720d26 100644 --- a/src/service/nse/gnunet-service-nse.c +++ b/src/service/nse/gnunet-service-nse.c | |||
@@ -1573,7 +1573,7 @@ GNUNET_SERVICE_MAIN ("nse", | |||
1573 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 1573 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
1574 | */ | 1574 | */ |
1575 | void __attribute__ ((constructor)) | 1575 | void __attribute__ ((constructor)) |
1576 | GNUNET_ARM_memory_init () | 1576 | GNUNET_NSE_memory_init () |
1577 | { | 1577 | { |
1578 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 1578 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
1579 | mallopt (M_TOP_PAD, 1 * 1024); | 1579 | mallopt (M_TOP_PAD, 1 * 1024); |
diff --git a/src/service/peerstore/peerstore_api.c b/src/service/peerstore/peerstore_api.c index a774d3baa..d5cb091f9 100644 --- a/src/service/peerstore/peerstore_api.c +++ b/src/service/peerstore/peerstore_api.c | |||
@@ -1040,19 +1040,17 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, | |||
1040 | GNUNET_PEERSTORE_Processor callback, | 1040 | GNUNET_PEERSTORE_Processor callback, |
1041 | void *callback_cls) | 1041 | void *callback_cls) |
1042 | { | 1042 | { |
1043 | struct GNUNET_PEERSTORE_IterateContext *ic; | ||
1044 | struct GNUNET_PEERSTORE_WatchContext *wc; | 1043 | struct GNUNET_PEERSTORE_WatchContext *wc; |
1045 | 1044 | ||
1046 | wc = GNUNET_new (struct GNUNET_PEERSTORE_WatchContext); | 1045 | wc = GNUNET_new (struct GNUNET_PEERSTORE_WatchContext); |
1047 | wc->callback = callback; | 1046 | wc->callback = callback; |
1048 | wc->callback_cls = callback_cls; | 1047 | wc->callback_cls = callback_cls; |
1049 | wc->h = h; | 1048 | wc->h = h; |
1050 | wc->ic = ic; | ||
1051 | wc->key = key; | 1049 | wc->key = key; |
1052 | wc->peer = peer; | 1050 | wc->peer = peer; |
1053 | wc->sub_system = sub_system; | 1051 | wc->sub_system = sub_system; |
1054 | 1052 | ||
1055 | ic = GNUNET_PEERSTORE_iterate (h, | 1053 | wc->ic = GNUNET_PEERSTORE_iterate (h, |
1056 | sub_system, | 1054 | sub_system, |
1057 | peer, | 1055 | peer, |
1058 | key, | 1056 | key, |
@@ -1075,7 +1073,6 @@ hello_updated (void *cls, | |||
1075 | { | 1073 | { |
1076 | struct GNUNET_PEERSTORE_NotifyContext *nc = cls; | 1074 | struct GNUNET_PEERSTORE_NotifyContext *nc = cls; |
1077 | const struct GNUNET_MessageHeader *hello; | 1075 | const struct GNUNET_MessageHeader *hello; |
1078 | struct GNUNET_HELLO_Builder *builder; | ||
1079 | 1076 | ||
1080 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1077 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1081 | "hello_updated\n"); | 1078 | "hello_updated\n"); |
@@ -1090,7 +1087,6 @@ hello_updated (void *cls, | |||
1090 | if (NULL == record) | 1087 | if (NULL == record) |
1091 | return; | 1088 | return; |
1092 | hello = record->value; | 1089 | hello = record->value; |
1093 | builder = GNUNET_HELLO_builder_from_msg (hello); | ||
1094 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1090 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1095 | "hello_updated with expired %s and size %u for peer %s\n", | 1091 | "hello_updated with expired %s and size %u for peer %s\n", |
1096 | GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)), | 1092 | GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)), |
diff --git a/src/service/regex/gnunet-daemon-regexprofiler.c b/src/service/regex/gnunet-daemon-regexprofiler.c index 70301338f..8aa2a2a30 100644 --- a/src/service/regex/gnunet-daemon-regexprofiler.c +++ b/src/service/regex/gnunet-daemon-regexprofiler.c | |||
@@ -393,7 +393,7 @@ main (int argc, char *const *argv) | |||
393 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 393 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
394 | */ | 394 | */ |
395 | void __attribute__ ((constructor)) | 395 | void __attribute__ ((constructor)) |
396 | GNUNET_ARM_memory_init () | 396 | GNUNET_REGEX_memory_init () |
397 | { | 397 | { |
398 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 398 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
399 | mallopt (M_TOP_PAD, 1 * 1024); | 399 | mallopt (M_TOP_PAD, 1 * 1024); |
diff --git a/src/service/rest/Makefile.am b/src/service/rest/Makefile.am index 60769e366..69c0235cc 100644 --- a/src/service/rest/Makefile.am +++ b/src/service/rest/Makefile.am | |||
@@ -27,19 +27,27 @@ EXTRA_DIST = \ | |||
27 | if HAVE_JOSE | 27 | if HAVE_JOSE |
28 | OPENID_PLUGIN = \ | 28 | OPENID_PLUGIN = \ |
29 | openid_plugin.c \ | 29 | openid_plugin.c \ |
30 | oidc_helper.c | 30 | openid_plugin.h \ |
31 | oidc_helper.c \ | ||
32 | oidc_helper.h | ||
31 | OPENID_JOSE_LIBS = -ljose | 33 | OPENID_JOSE_LIBS = -ljose |
32 | endif | 34 | endif |
33 | 35 | ||
34 | gnunet_rest_server_SOURCES = \ | 36 | gnunet_rest_server_SOURCES = \ |
35 | gnunet-rest-server.c \ | 37 | gnunet-rest-server.c \ |
36 | config_plugin.c \ | 38 | config_plugin.c \ |
39 | config_plugin.h \ | ||
37 | copying_plugin.c \ | 40 | copying_plugin.c \ |
41 | copying_plugin.h \ | ||
38 | identity_plugin.c \ | 42 | identity_plugin.c \ |
43 | identity_plugin.h \ | ||
39 | namestore_plugin.c \ | 44 | namestore_plugin.c \ |
45 | namestore_plugin.h \ | ||
40 | gns_plugin.c \ | 46 | gns_plugin.c \ |
47 | gns_plugin.h \ | ||
41 | $(OPENID_PLUGIN) \ | 48 | $(OPENID_PLUGIN) \ |
42 | reclaim_plugin.c json_reclaim.c | 49 | reclaim_plugin.c json_reclaim.c \ |
50 | reclaim_plugin.h json_reclaim.h | ||
43 | gnunet_rest_server_LDADD = \ | 51 | gnunet_rest_server_LDADD = \ |
44 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | 52 | $(top_builddir)/src/lib/util/libgnunetutil.la \ |
45 | $(top_builddir)/src/lib/json/libgnunetjson.la \ | 53 | $(top_builddir)/src/lib/json/libgnunetjson.la \ |
diff --git a/src/service/testing/meson.build b/src/service/testing/meson.build index 7e2069fb0..5605a2afb 100644 --- a/src/service/testing/meson.build +++ b/src/service/testing/meson.build | |||
@@ -1,4 +1,7 @@ | |||
1 | libgnunettesting_src = [ | 1 | libgnunettesting_src = [ |
2 | 'testing_api_cmd_stop_peer.c', | ||
3 | 'testing_api_cmd_start_peer.c', | ||
4 | 'testing_api_cmd_exec_bash_script.c', | ||
2 | 'testing_api_cmd_barrier.c', | 5 | 'testing_api_cmd_barrier.c', |
3 | 'testing_api_cmd_barrier_reached.c', | 6 | 'testing_api_cmd_barrier_reached.c', |
4 | 'testing_api_cmd_finish.c', | 7 | 'testing_api_cmd_finish.c', |
diff --git a/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c b/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c index 51a20dd9b..df6a81cb4 100644 --- a/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c +++ b/src/service/testing/testing_api_cmd_netjail_start_cmds_helper.c | |||
@@ -679,6 +679,7 @@ start_helper (struct NetJailState *ns, | |||
679 | plugin_name = topology->plugin; | 679 | plugin_name = topology->plugin; |
680 | 680 | ||
681 | hkey = GNUNET_new (struct GNUNET_ShortHashCode); | 681 | hkey = GNUNET_new (struct GNUNET_ShortHashCode); |
682 | node = NULL; | ||
682 | if (0 == n) | 683 | if (0 == n) |
683 | { | 684 | { |
684 | GNUNET_CRYPTO_hash (&m, sizeof(m), &hc); | 685 | GNUNET_CRYPTO_hash (&m, sizeof(m), &hc); |
diff --git a/src/service/testing/testing_api_cmd_start_peer.c b/src/service/testing/testing_api_cmd_start_peer.c index e2a2c0fbf..cd4536131 100644 --- a/src/service/testing/testing_api_cmd_start_peer.c +++ b/src/service/testing/testing_api_cmd_start_peer.c | |||
@@ -279,7 +279,6 @@ GNUNET_TESTING_cmd_start_peer (const char *label, | |||
279 | struct GNUNET_TESTING_StartPeerState *sps; | 279 | struct GNUNET_TESTING_StartPeerState *sps; |
280 | struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map = | 280 | struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map = |
281 | GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO); | 281 | GNUNET_CONTAINER_multishortmap_create (1,GNUNET_NO); |
282 | unsigned int i; | ||
283 | 282 | ||
284 | sps = GNUNET_new (struct GNUNET_TESTING_StartPeerState); | 283 | sps = GNUNET_new (struct GNUNET_TESTING_StartPeerState); |
285 | sps->no = no; | 284 | sps->no = no; |
diff --git a/src/service/testing/testing_api_loop.c b/src/service/testing/testing_api_loop.c index db0a00c22..11cd02ec0 100644 --- a/src/service/testing/testing_api_loop.c +++ b/src/service/testing/testing_api_loop.c | |||
@@ -738,7 +738,7 @@ GNUNET_TESTING_add_netjail_helper (struct GNUNET_TESTING_Interpreter *is, | |||
738 | * @param global_node_number The netjail node to inform. | 738 | * @param global_node_number The netjail node to inform. |
739 | * @param header The message to send. | 739 | * @param header The message to send. |
740 | */ | 740 | */ |
741 | void | 741 | static void |
742 | send_message_to_netjail (struct GNUNET_TESTING_Interpreter *is, | 742 | send_message_to_netjail (struct GNUNET_TESTING_Interpreter *is, |
743 | unsigned int global_node_number, | 743 | unsigned int global_node_number, |
744 | struct GNUNET_MessageHeader *header) | 744 | struct GNUNET_MessageHeader *header) |
@@ -749,6 +749,10 @@ send_message_to_netjail (struct GNUNET_TESTING_Interpreter *is, | |||
749 | "send message of type %u to locals\n", | 749 | "send message of type %u to locals\n", |
750 | ntohs (header->type)); | 750 | ntohs (header->type)); |
751 | helper = is->helper[global_node_number - 1]; | 751 | helper = is->helper[global_node_number - 1]; |
752 | /** | ||
753 | FIXME: This should probably be put into a linked list | ||
754 | inside is and cleaned up at some point. | ||
755 | */ | ||
752 | struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send ( | 756 | struct GNUNET_HELPER_SendHandle *sh = GNUNET_HELPER_send ( |
753 | (struct GNUNET_HELPER_Handle *) helper, | 757 | (struct GNUNET_HELPER_Handle *) helper, |
754 | header, | 758 | header, |
diff --git a/src/service/topology/gnunet-daemon-topology.c b/src/service/topology/gnunet-daemon-topology.c index ca5435657..0f4b046f8 100644 --- a/src/service/topology/gnunet-daemon-topology.c +++ b/src/service/topology/gnunet-daemon-topology.c | |||
@@ -1035,7 +1035,7 @@ main (int argc, char *const *argv) | |||
1035 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 1035 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
1036 | */ | 1036 | */ |
1037 | void __attribute__ ((constructor)) | 1037 | void __attribute__ ((constructor)) |
1038 | GNUNET_ARM_memory_init () | 1038 | GNUNET_TOPOLOGY_memory_init () |
1039 | { | 1039 | { |
1040 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 1040 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
1041 | mallopt (M_TOP_PAD, 1 * 1024); | 1041 | mallopt (M_TOP_PAD, 1 * 1024); |
diff --git a/src/service/transport/gnunet-communicator-unix.c b/src/service/transport/gnunet-communicator-unix.c index 0ff16ab08..1cdc85b8a 100644 --- a/src/service/transport/gnunet-communicator-unix.c +++ b/src/service/transport/gnunet-communicator-unix.c | |||
@@ -1153,7 +1153,7 @@ main (int argc, char *const *argv) | |||
1153 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | 1153 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. |
1154 | */ | 1154 | */ |
1155 | void __attribute__ ((constructor)) | 1155 | void __attribute__ ((constructor)) |
1156 | GNUNET_ARM_memory_init () | 1156 | GNUNET_TRANSPORT_communicator_unix_memory_init () |
1157 | { | 1157 | { |
1158 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | 1158 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); |
1159 | mallopt (M_TOP_PAD, 1 * 1024); | 1159 | mallopt (M_TOP_PAD, 1 * 1024); |
diff --git a/src/service/transport/gnunet-service-transport.c b/src/service/transport/gnunet-service-transport.c index cdd7b5179..a1848fbb1 100644 --- a/src/service/transport/gnunet-service-transport.c +++ b/src/service/transport/gnunet-service-transport.c | |||
@@ -186,20 +186,20 @@ | |||
186 | * the value chosen here might be too aggressively low! | 186 | * the value chosen here might be too aggressively low! |
187 | */ | 187 | */ |
188 | #define DELAY_WARN_THRESHOLD \ | 188 | #define DELAY_WARN_THRESHOLD \ |
189 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 189 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
190 | 190 | ||
191 | /** | 191 | /** |
192 | * If a DVBox could not be forwarded after this number of | 192 | * If a DVBox could not be forwarded after this number of |
193 | * seconds we drop it. | 193 | * seconds we drop it. |
194 | */ | 194 | */ |
195 | #define DV_FORWARD_TIMEOUT \ | 195 | #define DV_FORWARD_TIMEOUT \ |
196 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) | 196 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Default value for how long we wait for reliability ack. | 199 | * Default value for how long we wait for reliability ack. |
200 | */ | 200 | */ |
201 | #define DEFAULT_ACK_WAIT_DURATION \ | 201 | #define DEFAULT_ACK_WAIT_DURATION \ |
202 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | 202 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) |
203 | 203 | ||
204 | /** | 204 | /** |
205 | * We only consider queues as "quality" connections when | 205 | * We only consider queues as "quality" connections when |
@@ -207,53 +207,53 @@ | |||
207 | * the latency of the queue is below this threshold. | 207 | * the latency of the queue is below this threshold. |
208 | */ | 208 | */ |
209 | #define DV_QUALITY_RTT_THRESHOLD \ | 209 | #define DV_QUALITY_RTT_THRESHOLD \ |
210 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | 210 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) |
211 | 211 | ||
212 | /** | 212 | /** |
213 | * How long do we consider a DV path valid if we see no | 213 | * How long do we consider a DV path valid if we see no |
214 | * further updates on it? Note: the value chosen here might be too low! | 214 | * further updates on it? Note: the value chosen here might be too low! |
215 | */ | 215 | */ |
216 | #define DV_PATH_VALIDITY_TIMEOUT \ | 216 | #define DV_PATH_VALIDITY_TIMEOUT \ |
217 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) | 217 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) |
218 | 218 | ||
219 | /** | 219 | /** |
220 | * How long do we cache backchannel (struct Backtalker) information | 220 | * How long do we cache backchannel (struct Backtalker) information |
221 | * after a backchannel goes inactive? | 221 | * after a backchannel goes inactive? |
222 | */ | 222 | */ |
223 | #define BACKCHANNEL_INACTIVITY_TIMEOUT \ | 223 | #define BACKCHANNEL_INACTIVITY_TIMEOUT \ |
224 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) | 224 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) |
225 | 225 | ||
226 | /** | 226 | /** |
227 | * How long before paths expire would we like to (re)discover DV paths? Should | 227 | * How long before paths expire would we like to (re)discover DV paths? Should |
228 | * be below #DV_PATH_VALIDITY_TIMEOUT. | 228 | * be below #DV_PATH_VALIDITY_TIMEOUT. |
229 | */ | 229 | */ |
230 | #define DV_PATH_DISCOVERY_FREQUENCY \ | 230 | #define DV_PATH_DISCOVERY_FREQUENCY \ |
231 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4) | 231 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4) |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * How long are ephemeral keys valid? | 234 | * How long are ephemeral keys valid? |
235 | */ | 235 | */ |
236 | #define EPHEMERAL_VALIDITY \ | 236 | #define EPHEMERAL_VALIDITY \ |
237 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) | 237 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) |
238 | 238 | ||
239 | /** | 239 | /** |
240 | * How long do we keep partially reassembled messages around before giving up? | 240 | * How long do we keep partially reassembled messages around before giving up? |
241 | */ | 241 | */ |
242 | #define REASSEMBLY_EXPIRATION \ | 242 | #define REASSEMBLY_EXPIRATION \ |
243 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4) | 243 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 4) |
244 | 244 | ||
245 | /** | 245 | /** |
246 | * What is the fastest rate at which we send challenges *if* we keep learning | 246 | * What is the fastest rate at which we send challenges *if* we keep learning |
247 | * an address (gossip, DHT, etc.)? | 247 | * an address (gossip, DHT, etc.)? |
248 | */ | 248 | */ |
249 | #define FAST_VALIDATION_CHALLENGE_FREQ \ | 249 | #define FAST_VALIDATION_CHALLENGE_FREQ \ |
250 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) | 250 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) |
251 | 251 | ||
252 | /** | 252 | /** |
253 | * What is the slowest rate at which we send challenges? | 253 | * What is the slowest rate at which we send challenges? |
254 | */ | 254 | */ |
255 | #define MAX_VALIDATION_CHALLENGE_FREQ \ | 255 | #define MAX_VALIDATION_CHALLENGE_FREQ \ |
256 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_DAYS, 1) | 256 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_DAYS, 1) |
257 | 257 | ||
258 | /** | 258 | /** |
259 | * How long until we forget about historic accumulators and thus | 259 | * How long until we forget about historic accumulators and thus |
@@ -261,7 +261,7 @@ | |||
261 | * active connection experiences without an ACK. | 261 | * active connection experiences without an ACK. |
262 | */ | 262 | */ |
263 | #define ACK_CUMMULATOR_TIMEOUT \ | 263 | #define ACK_CUMMULATOR_TIMEOUT \ |
264 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) | 264 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) |
265 | 265 | ||
266 | /** | 266 | /** |
267 | * What is the non-randomized base frequency at which we | 267 | * What is the non-randomized base frequency at which we |
@@ -279,13 +279,13 @@ | |||
279 | * When do we forget an invalid address for sure? | 279 | * When do we forget an invalid address for sure? |
280 | */ | 280 | */ |
281 | #define MAX_ADDRESS_VALID_UNTIL \ | 281 | #define MAX_ADDRESS_VALID_UNTIL \ |
282 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MONTHS, 1) | 282 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MONTHS, 1) |
283 | 283 | ||
284 | /** | 284 | /** |
285 | * How long do we consider an address valid if we just checked? | 285 | * How long do we consider an address valid if we just checked? |
286 | */ | 286 | */ |
287 | #define ADDRESS_VALIDATION_LIFETIME \ | 287 | #define ADDRESS_VALIDATION_LIFETIME \ |
288 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) | 288 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4) |
289 | 289 | ||
290 | /** | 290 | /** |
291 | * What is the maximum frequency at which we do address validation? | 291 | * What is the maximum frequency at which we do address validation? |
@@ -2249,7 +2249,7 @@ struct PendingMessage | |||
2249 | * UUID we use to identify this message in our logs. | 2249 | * UUID we use to identify this message in our logs. |
2250 | * Generated by incrementing the "logging_uuid_gen". | 2250 | * Generated by incrementing the "logging_uuid_gen". |
2251 | */ | 2251 | */ |
2252 | unsigned long long logging_uuid; | 2252 | uint64_t logging_uuid; |
2253 | 2253 | ||
2254 | /** | 2254 | /** |
2255 | * Type of the pending message. | 2255 | * Type of the pending message. |
@@ -2280,7 +2280,7 @@ struct PendingMessage | |||
2280 | /** | 2280 | /** |
2281 | * Are we sending fragments at the moment? | 2281 | * Are we sending fragments at the moment? |
2282 | */ | 2282 | */ |
2283 | unsigned int frags_in_flight; | 2283 | uint32_t frags_in_flight; |
2284 | 2284 | ||
2285 | /** | 2285 | /** |
2286 | * How many fragments do we have? | 2286 | * How many fragments do we have? |
@@ -2377,11 +2377,26 @@ struct AddressListEntry | |||
2377 | struct TransportClient *tc; | 2377 | struct TransportClient *tc; |
2378 | 2378 | ||
2379 | /** | 2379 | /** |
2380 | * Store hello handle | ||
2381 | */ | ||
2382 | struct GNUNET_PEERSTORE_StoreHelloContext *shc; | ||
2383 | |||
2384 | /** | ||
2380 | * The actual address. | 2385 | * The actual address. |
2381 | */ | 2386 | */ |
2382 | const char *address; | 2387 | const char *address; |
2383 | 2388 | ||
2384 | /** | 2389 | /** |
2390 | * Signed address | ||
2391 | */ | ||
2392 | void *signed_address; | ||
2393 | |||
2394 | /** | ||
2395 | * Signed address length | ||
2396 | */ | ||
2397 | size_t signed_address_len; | ||
2398 | |||
2399 | /** | ||
2385 | * Current context for storing this address in the peerstore. | 2400 | * Current context for storing this address in the peerstore. |
2386 | */ | 2401 | */ |
2387 | struct GNUNET_PEERSTORE_StoreContext *sc; | 2402 | struct GNUNET_PEERSTORE_StoreContext *sc; |
@@ -2889,16 +2904,6 @@ static struct GNUNET_TIME_Absolute hello_mono_time; | |||
2889 | static int in_shutdown; | 2904 | static int in_shutdown; |
2890 | 2905 | ||
2891 | /** | 2906 | /** |
2892 | * Head of the linkd list to store the store context for hellos. | ||
2893 | */ | ||
2894 | static struct GNUNET_PEERSTORE_StoreHelloContext *shc_head; | ||
2895 | |||
2896 | /** | ||
2897 | * Tail of the linkd list to store the store context for hellos. | ||
2898 | */ | ||
2899 | static struct GNUNET_PEERSTORE_StoreHelloContext *shc_tail; | ||
2900 | |||
2901 | /** | ||
2902 | * Get an offset into the transmission history buffer for `struct | 2907 | * Get an offset into the transmission history buffer for `struct |
2903 | * PerformanceData`. Note that the caller must perform the required | 2908 | * PerformanceData`. Note that the caller must perform the required |
2904 | * modulo #GOODPUT_AGING_SLOTS operation before indexing into the | 2909 | * modulo #GOODPUT_AGING_SLOTS operation before indexing into the |
@@ -2959,7 +2964,7 @@ free_pending_acknowledgement (struct PendingAcknowledgement *pa) | |||
2959 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2964 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2960 | "remove pa from message\n"); | 2965 | "remove pa from message\n"); |
2961 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2966 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2962 | "remove pa from message %llu\n", | 2967 | "remove pa from message %" PRIu64 "\n", |
2963 | pm->logging_uuid); | 2968 | pm->logging_uuid); |
2964 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2969 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2965 | "remove pa from message %u\n", | 2970 | "remove pa from message %u\n", |
@@ -3047,7 +3052,7 @@ free_pending_message (struct PendingMessage *pm) | |||
3047 | if ((NULL != vl) && (NULL == pm->frag_parent)) | 3052 | if ((NULL != vl) && (NULL == pm->frag_parent)) |
3048 | { | 3053 | { |
3049 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 3054 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
3050 | "Removing pm %llu\n", | 3055 | "Removing pm %" PRIu64 "\n", |
3051 | pm->logging_uuid); | 3056 | pm->logging_uuid); |
3052 | GNUNET_CONTAINER_MDLL_remove (vl, | 3057 | GNUNET_CONTAINER_MDLL_remove (vl, |
3053 | vl->pending_msg_head, | 3058 | vl->pending_msg_head, |
@@ -4137,7 +4142,7 @@ client_send_response (struct PendingMessage *pm) | |||
4137 | env = GNUNET_MQ_msg (so_msg, GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); | 4142 | env = GNUNET_MQ_msg (so_msg, GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK); |
4138 | so_msg->peer = vl->target; | 4143 | so_msg->peer = vl->target; |
4139 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 4144 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
4140 | "Confirming transmission of <%llu> to %s\n", | 4145 | "Confirming transmission of <%" PRIu64 "> to %s\n", |
4141 | pm->logging_uuid, | 4146 | pm->logging_uuid, |
4142 | GNUNET_i2s (&vl->target)); | 4147 | GNUNET_i2s (&vl->target)); |
4143 | GNUNET_MQ_send (tc->mq, env); | 4148 | GNUNET_MQ_send (tc->mq, env); |
@@ -4461,7 +4466,8 @@ queue_send_msg (struct Queue *queue, | |||
4461 | 4466 | ||
4462 | GNUNET_log ( | 4467 | GNUNET_log ( |
4463 | GNUNET_ERROR_TYPE_DEBUG, | 4468 | GNUNET_ERROR_TYPE_DEBUG, |
4464 | "Queueing %u bytes of payload for transmission <%llu> on queue %llu to %s\n", | 4469 | "Queueing %u bytes of payload for transmission <%" PRIu64 |
4470 | "> on queue %llu to %s\n", | ||
4465 | (unsigned int) payload_size, | 4471 | (unsigned int) payload_size, |
4466 | (NULL == pm) ? 0 : pm->logging_uuid, | 4472 | (NULL == pm) ? 0 : pm->logging_uuid, |
4467 | (unsigned long long) queue->qid, | 4473 | (unsigned long long) queue->qid, |
@@ -4495,7 +4501,8 @@ queue_send_msg (struct Queue *queue, | |||
4495 | if (NULL != pm->qe) | 4501 | if (NULL != pm->qe) |
4496 | { | 4502 | { |
4497 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 4503 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
4498 | "Retransmitting message <%llu> remove pm from qe with MID: %llu \n", | 4504 | "Retransmitting message <%" PRIu64 |
4505 | "> remove pm from qe with MID: %llu \n", | ||
4499 | pm->logging_uuid, | 4506 | pm->logging_uuid, |
4500 | (unsigned long long) pm->qe->mid); | 4507 | (unsigned long long) pm->qe->mid); |
4501 | pm->qe->pm = NULL; | 4508 | pm->qe->pm = NULL; |
@@ -4509,7 +4516,8 @@ queue_send_msg (struct Queue *queue, | |||
4509 | // Messages without FC or fragments can get here. | 4516 | // Messages without FC or fragments can get here. |
4510 | if (NULL != pm) | 4517 | if (NULL != pm) |
4511 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 4518 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
4512 | "Message %llu (pm type %u) was not send because queue has no capacity.\n", | 4519 | "Message %" PRIu64 |
4520 | " (pm type %u) was not send because queue has no capacity.\n", | ||
4513 | pm->logging_uuid, | 4521 | pm->logging_uuid, |
4514 | pm->pmt); | 4522 | pm->pmt); |
4515 | GNUNET_free (env); | 4523 | GNUNET_free (env); |
@@ -5179,7 +5187,8 @@ check_vl_transmission (struct VirtualLink *vl) | |||
5179 | vl->outbound_fc_window_size) | 5187 | vl->outbound_fc_window_size) |
5180 | { | 5188 | { |
5181 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5189 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5182 | "Stalled message %llu transmission on VL %s due to flow control: %llu < %llu\n", | 5190 | "Stalled message %" PRIu64 |
5191 | " transmission on VL %s due to flow control: %llu < %llu\n", | ||
5183 | pm->logging_uuid, | 5192 | pm->logging_uuid, |
5184 | GNUNET_i2s (&vl->target), | 5193 | GNUNET_i2s (&vl->target), |
5185 | (unsigned long long) vl->outbound_fc_window_size, | 5194 | (unsigned long long) vl->outbound_fc_window_size, |
@@ -5237,7 +5246,8 @@ check_vl_transmission (struct VirtualLink *vl) | |||
5237 | vl_next_hop->outbound_fc_window_size) | 5246 | vl_next_hop->outbound_fc_window_size) |
5238 | { | 5247 | { |
5239 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5248 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5240 | "Stalled message %llu transmission on next hop %s due to flow control: %llu < %llu\n", | 5249 | "Stalled message %" PRIu64 |
5250 | " transmission on next hop %s due to flow control: %llu < %llu\n", | ||
5241 | pm->logging_uuid, | 5251 | pm->logging_uuid, |
5242 | GNUNET_i2s (&vl_next_hop->target), | 5252 | GNUNET_i2s (&vl_next_hop->target), |
5243 | (unsigned long | 5253 | (unsigned long |
@@ -5271,7 +5281,7 @@ check_vl_transmission (struct VirtualLink *vl) | |||
5271 | } | 5281 | } |
5272 | if (GNUNET_YES == elig) | 5282 | if (GNUNET_YES == elig) |
5273 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5283 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5274 | "Eligible message %llu of size %u to %s: %llu/%llu\n", | 5284 | "Eligible message %" PRIu64 " of size %u to %s: %llu/%llu\n", |
5275 | pm->logging_uuid, | 5285 | pm->logging_uuid, |
5276 | pm->bytes_msg, | 5286 | pm->bytes_msg, |
5277 | GNUNET_i2s (&vl->target), | 5287 | GNUNET_i2s (&vl->target), |
@@ -5333,7 +5343,8 @@ handle_client_send (void *cls, const struct OutboundMessage *obm) | |||
5333 | pm->bytes_msg = bytes_msg; | 5343 | pm->bytes_msg = bytes_msg; |
5334 | memcpy (&pm[1], obmm, bytes_msg); | 5344 | memcpy (&pm[1], obmm, bytes_msg); |
5335 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5345 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5336 | "Sending message of type %u with %u bytes as <%llu> to %s\n", | 5346 | "Sending message of type %u with %u bytes as <%" PRIu64 |
5347 | "> to %s\n", | ||
5337 | ntohs (obmm->type), | 5348 | ntohs (obmm->type), |
5338 | bytes_msg, | 5349 | bytes_msg, |
5339 | pm->logging_uuid, | 5350 | pm->logging_uuid, |
@@ -5482,14 +5493,21 @@ peerstore_store_own_cb (void *cls, int success) | |||
5482 | static void | 5493 | static void |
5483 | shc_cont (void *cls, int success) | 5494 | shc_cont (void *cls, int success) |
5484 | { | 5495 | { |
5485 | (void *) cls; | 5496 | struct AddressListEntry *ale = cls; |
5486 | 5497 | struct GNUNET_TIME_Absolute expiration; | |
5487 | if (GNUNET_YES == success) | 5498 | expiration = GNUNET_TIME_relative_to_absolute (ale->expiration); |
5488 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5499 | ale->sc = GNUNET_PEERSTORE_store (peerstore, |
5489 | "Hello stored successfully!\n"); | 5500 | "transport", |
5490 | else | 5501 | &GST_my_identity, |
5491 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5502 | GNUNET_PEERSTORE_TRANSPORT_HELLO_KEY, |
5492 | "Error storing hello!\n"); | 5503 | ale->signed_address, |
5504 | ale->signed_address_len, | ||
5505 | expiration, | ||
5506 | GNUNET_PEERSTORE_STOREOPTION_MULTIPLE, | ||
5507 | &peerstore_store_own_cb, | ||
5508 | ale); | ||
5509 | GNUNET_free (ale->signed_address); | ||
5510 | GNUNET_free (ale); | ||
5493 | } | 5511 | } |
5494 | 5512 | ||
5495 | 5513 | ||
@@ -5502,78 +5520,54 @@ static void | |||
5502 | store_pi (void *cls) | 5520 | store_pi (void *cls) |
5503 | { | 5521 | { |
5504 | struct AddressListEntry *ale = cls; | 5522 | struct AddressListEntry *ale = cls; |
5505 | struct GNUNET_PEERSTORE_StoreHelloContext *shc; | ||
5506 | void *addr; | ||
5507 | size_t addr_len; | ||
5508 | struct GNUNET_TIME_Absolute expiration; | ||
5509 | enum GNUNET_GenericReturnValue add_result; | ||
5510 | struct GNUNET_MQ_Envelope *env; | 5523 | struct GNUNET_MQ_Envelope *env; |
5511 | const struct GNUNET_MessageHeader *msg; | 5524 | const struct GNUNET_MessageHeader *msg; |
5512 | const char *dash; | 5525 | const char *dash; |
5513 | char *prefix = GNUNET_HELLO_address_to_prefix (ale->address); | ||
5514 | char *address_uri; | 5526 | char *address_uri; |
5527 | char *prefix = GNUNET_HELLO_address_to_prefix (ale->address); | ||
5515 | 5528 | ||
5516 | dash = strchr (ale->address, '-'); | 5529 | dash = strchr (ale->address, '-'); |
5517 | dash++; | 5530 | dash++; |
5518 | GNUNET_asprintf (&address_uri, | 5531 | GNUNET_asprintf (&address_uri, |
5519 | "%s://%s", | 5532 | "%s://%s", |
5520 | prefix, | 5533 | prefix, |
5521 | dash); | 5534 | dash); |
5535 | GNUNET_free (prefix); | ||
5522 | ale->st = NULL; | 5536 | ale->st = NULL; |
5523 | expiration = GNUNET_TIME_relative_to_absolute (ale->expiration); | ||
5524 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5537 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5525 | "Storing our address `%s' in peerstore until %s!\n", | 5538 | "Storing our address `%s' in peerstore until %s!\n", |
5526 | ale->address, | 5539 | ale->address, |
5527 | GNUNET_STRINGS_absolute_time_to_string (expiration)); | 5540 | GNUNET_STRINGS_absolute_time_to_string (hello_mono_time)); |
5528 | add_result = GNUNET_HELLO_builder_add_address (GST_my_hello, | 5541 | if (GNUNET_OK != GNUNET_HELLO_builder_add_address (GST_my_hello, |
5529 | address_uri); | 5542 | address_uri)) |
5543 | { | ||
5544 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
5545 | "Address `%s' invalid\n", | ||
5546 | address_uri); | ||
5547 | GNUNET_free (address_uri); | ||
5548 | ale->st = | ||
5549 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &store_pi, ale); | ||
5550 | return; | ||
5551 | } | ||
5552 | // FIXME hello_mono_time used here?? What about expiration in ale? | ||
5553 | GNUNET_HELLO_sign_address (ale->address, | ||
5554 | ale->nt, | ||
5555 | hello_mono_time, | ||
5556 | GST_my_private_key, | ||
5557 | &ale->signed_address, | ||
5558 | &ale->signed_address_len); | ||
5559 | GNUNET_free (address_uri); | ||
5530 | env = GNUNET_HELLO_builder_to_env (GST_my_hello, | 5560 | env = GNUNET_HELLO_builder_to_env (GST_my_hello, |
5531 | GST_my_private_key, | 5561 | GST_my_private_key, |
5532 | GNUNET_TIME_UNIT_ZERO); | 5562 | GNUNET_TIME_UNIT_ZERO); |
5533 | msg = GNUNET_MQ_env_get_msg (env); | 5563 | msg = GNUNET_MQ_env_get_msg (env); |
5534 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 5564 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
5535 | "store_pi 1\n"); | 5565 | "store_pi 1\n"); |
5536 | if (GNUNET_YES == add_result) | 5566 | ale->shc = GNUNET_PEERSTORE_hello_add (peerstore, |
5537 | { | 5567 | msg, |
5538 | shc = GNUNET_PEERSTORE_hello_add (peerstore, | 5568 | shc_cont, |
5539 | msg, | 5569 | ale); |
5540 | shc_cont, | ||
5541 | NULL); | ||
5542 | GNUNET_CONTAINER_DLL_insert (shc_head, shc_tail, shc); | ||
5543 | } | ||
5544 | else if (GNUNET_SYSERR == add_result) | ||
5545 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
5546 | "Error adding address to peerstore hello!\n"); | ||
5547 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
5548 | "store_pi 2\n"); | ||
5549 | GNUNET_HELLO_sign_address (ale->address, | ||
5550 | ale->nt, | ||
5551 | hello_mono_time, | ||
5552 | GST_my_private_key, | ||
5553 | &addr, | ||
5554 | &addr_len); | ||
5555 | ale->sc = GNUNET_PEERSTORE_store (peerstore, | ||
5556 | "transport", | ||
5557 | &GST_my_identity, | ||
5558 | GNUNET_PEERSTORE_TRANSPORT_HELLO_KEY, | ||
5559 | addr, | ||
5560 | addr_len, | ||
5561 | expiration, | ||
5562 | GNUNET_PEERSTORE_STOREOPTION_MULTIPLE, | ||
5563 | &peerstore_store_own_cb, | ||
5564 | ale); | ||
5565 | GNUNET_free (addr); | ||
5566 | GNUNET_free (env); | 5570 | GNUNET_free (env); |
5567 | GNUNET_free (prefix); | ||
5568 | GNUNET_free (address_uri); | ||
5569 | if (NULL == ale->sc) | ||
5570 | { | ||
5571 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
5572 | "Failed to store our address `%s' with peerstore\n", | ||
5573 | ale->address); | ||
5574 | ale->st = | ||
5575 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &store_pi, ale); | ||
5576 | } | ||
5577 | } | 5571 | } |
5578 | 5572 | ||
5579 | 5573 | ||
@@ -6422,7 +6416,7 @@ completed_pending_message (struct PendingMessage *pm) | |||
6422 | struct PendingMessage *pos; | 6416 | struct PendingMessage *pos; |
6423 | 6417 | ||
6424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 6418 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
6425 | "Complete transmission of message %llu %u\n", | 6419 | "Complete transmission of message %" PRIu64 " %u\n", |
6426 | pm->logging_uuid, | 6420 | pm->logging_uuid, |
6427 | pm->pmt); | 6421 | pm->pmt); |
6428 | switch (pm->pmt) | 6422 | switch (pm->pmt) |
@@ -6469,7 +6463,7 @@ completed_pending_message (struct PendingMessage *pm) | |||
6469 | 6463 | ||
6470 | case PMT_DV_BOX: | 6464 | case PMT_DV_BOX: |
6471 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 6465 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
6472 | "Completed transmission of message %llu (DV Box)\n", | 6466 | "Completed transmission of message %" PRIu64 " (DV Box)\n", |
6473 | pm->logging_uuid); | 6467 | pm->logging_uuid); |
6474 | if (NULL != pm->frag_parent) | 6468 | if (NULL != pm->frag_parent) |
6475 | { | 6469 | { |
@@ -7939,7 +7933,8 @@ forward_dv_box (struct Neighbour *next_hop, | |||
7939 | memcpy (buf, msg_buf, msg_size); | 7933 | memcpy (buf, msg_buf, msg_size); |
7940 | 7934 | ||
7941 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 7935 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
7942 | "Created pending message %llu for DV Box with next hop %s (%u/%u)\n", | 7936 | "Created pending message %" PRIu64 |
7937 | " for DV Box with next hop %s (%u/%u)\n", | ||
7943 | pm->logging_uuid, | 7938 | pm->logging_uuid, |
7944 | GNUNET_i2s (&next_hop->pid), | 7939 | GNUNET_i2s (&next_hop->pid), |
7945 | (unsigned int) num_hops, | 7940 | (unsigned int) num_hops, |
@@ -8659,7 +8654,6 @@ handle_hello_for_incoming (void *cls, | |||
8659 | const struct GNUNET_MessageHeader *hello, | 8654 | const struct GNUNET_MessageHeader *hello, |
8660 | const char *emsg) | 8655 | const char *emsg) |
8661 | { | 8656 | { |
8662 | struct IncomingRequest *ir = cls; | ||
8663 | struct GNUNET_HELLO_Builder *builder; | 8657 | struct GNUNET_HELLO_Builder *builder; |
8664 | 8658 | ||
8665 | if (NULL != emsg) | 8659 | if (NULL != emsg) |
@@ -8898,7 +8892,8 @@ handle_validation_response ( | |||
8898 | struct Queue *q; | 8892 | struct Queue *q; |
8899 | struct Neighbour *n; | 8893 | struct Neighbour *n; |
8900 | struct VirtualLink *vl; | 8894 | struct VirtualLink *vl; |
8901 | const struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get_monotonic (GST_cfg); | 8895 | const struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get_monotonic ( |
8896 | GST_cfg); | ||
8902 | 8897 | ||
8903 | /* check this is one of our challenges */ | 8898 | /* check this is one of our challenges */ |
8904 | (void) GNUNET_CONTAINER_multipeermap_get_multiple (validation_map, | 8899 | (void) GNUNET_CONTAINER_multipeermap_get_multiple (validation_map, |
@@ -9372,7 +9367,7 @@ prepare_pending_acknowledgement (struct Queue *queue, | |||
9372 | pa->transmission_time = GNUNET_TIME_absolute_get (); | 9367 | pa->transmission_time = GNUNET_TIME_absolute_get (); |
9373 | pa->message_size = pm->bytes_msg; | 9368 | pa->message_size = pm->bytes_msg; |
9374 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9369 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9375 | "Waiting for ACKnowledgment `%s' for <%llu>\n", | 9370 | "Waiting for ACKnowledgment `%s' for <%" PRIu64 ">\n", |
9376 | GNUNET_uuid2s (&pa->ack_uuid.value), | 9371 | GNUNET_uuid2s (&pa->ack_uuid.value), |
9377 | pm->logging_uuid); | 9372 | pm->logging_uuid); |
9378 | return pa; | 9373 | return pa; |
@@ -9404,15 +9399,17 @@ fragment_message (struct Queue *queue, | |||
9404 | ? UINT16_MAX - sizeof(struct GNUNET_TRANSPORT_SendMessageTo) | 9399 | ? UINT16_MAX - sizeof(struct GNUNET_TRANSPORT_SendMessageTo) |
9405 | : queue->mtu; | 9400 | : queue->mtu; |
9406 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9401 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9407 | "Fragmenting message <%llu> with size %u to %s for MTU %u\n", | 9402 | "Fragmenting message <%" PRIu64 |
9403 | "> with size %u to %s for MTU %u\n", | ||
9408 | pm->logging_uuid, | 9404 | pm->logging_uuid, |
9409 | pm->bytes_msg, | 9405 | pm->bytes_msg, |
9410 | GNUNET_i2s (&pm->vl->target), | 9406 | GNUNET_i2s (&pm->vl->target), |
9411 | (unsigned int) mtu); | 9407 | (unsigned int) mtu); |
9412 | set_pending_message_uuid (pm); | 9408 | set_pending_message_uuid (pm); |
9413 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9409 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9414 | "Fragmenting message %llu <%llu> with size %u to %s for MTU %u\n", | 9410 | "Fragmenting message %" PRIu64 " <%" PRIu64 |
9415 | (unsigned long long) pm->msg_uuid.uuid, | 9411 | "> with size %u to %s for MTU %u\n", |
9412 | pm->msg_uuid.uuid, | ||
9416 | pm->logging_uuid, | 9413 | pm->logging_uuid, |
9417 | pm->bytes_msg, | 9414 | pm->bytes_msg, |
9418 | GNUNET_i2s (&pm->vl->target), | 9415 | GNUNET_i2s (&pm->vl->target), |
@@ -9574,7 +9571,8 @@ reliability_box_message (struct Queue *queue, | |||
9574 | memcpy (&msg[sizeof(rbox)], &pm[1], pm->bytes_msg); | 9571 | memcpy (&msg[sizeof(rbox)], &pm[1], pm->bytes_msg); |
9575 | pm->bpm = bpm; | 9572 | pm->bpm = bpm; |
9576 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9577 | "Preparing reliability box for message <%llu> of size %d (%d) to %s on queue %s\n", | 9574 | "Preparing reliability box for message <%" PRIu64 |
9575 | "> of size %d (%d) to %s on queue %s\n", | ||
9578 | pm->logging_uuid, | 9576 | pm->logging_uuid, |
9579 | pm->bytes_msg, | 9577 | pm->bytes_msg, |
9580 | ntohs (((const struct GNUNET_MessageHeader *) &pm[1])->size), | 9578 | ntohs (((const struct GNUNET_MessageHeader *) &pm[1])->size), |
@@ -9700,7 +9698,8 @@ update_pm_next_attempt (struct PendingMessage *pm, | |||
9700 | } | 9698 | } |
9701 | else | 9699 | else |
9702 | { | 9700 | { |
9703 | double factor = (root->frag_count - 1) / root->frag_count; | 9701 | double factor = ((double) root->frag_count - 1) |
9702 | / (double) root->frag_count; | ||
9704 | struct GNUNET_TIME_Relative s1; | 9703 | struct GNUNET_TIME_Relative s1; |
9705 | struct GNUNET_TIME_Relative s2; | 9704 | struct GNUNET_TIME_Relative s2; |
9706 | struct GNUNET_TIME_Relative plus_mean = | 9705 | struct GNUNET_TIME_Relative plus_mean = |
@@ -9818,13 +9817,14 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, | |||
9818 | { | 9817 | { |
9819 | sc->frags_in_flight = GNUNET_YES; | 9818 | sc->frags_in_flight = GNUNET_YES; |
9820 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9819 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9821 | "Fragments in flight for message %llu\n", | 9820 | "Fragments in flight for message %" PRIu64 "\n", |
9822 | pos->logging_uuid); | 9821 | pos->logging_uuid); |
9823 | } | 9822 | } |
9824 | else | 9823 | else |
9825 | { | 9824 | { |
9826 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9825 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9827 | "Maybe too early, because message are sorted by next_attempt, if there are no fragments in flight.Checked message %llu\n", | 9826 | "Maybe too early, because message are sorted by next_attempt, if there are no fragments in flight.Checked message %" |
9827 | PRIu64 "\n", | ||
9828 | pos->logging_uuid); | 9828 | pos->logging_uuid); |
9829 | sc->to_early = GNUNET_YES; | 9829 | sc->to_early = GNUNET_YES; |
9830 | sc->to_early_retry_delay = GNUNET_TIME_absolute_get_remaining ( | 9830 | sc->to_early_retry_delay = GNUNET_TIME_absolute_get_remaining ( |
@@ -9843,7 +9843,7 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, | |||
9843 | /* determine if we have to fragment, if so add fragmentation | 9843 | /* determine if we have to fragment, if so add fragmentation |
9844 | overhead! */ | 9844 | overhead! */ |
9845 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9845 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9846 | "check %llu for sc->best\n", | 9846 | "check %" PRIu64 " for sc->best\n", |
9847 | pos->logging_uuid); | 9847 | pos->logging_uuid); |
9848 | frag = GNUNET_NO; | 9848 | frag = GNUNET_NO; |
9849 | if (((0 != queue->mtu) && | 9849 | if (((0 != queue->mtu) && |
@@ -9936,7 +9936,8 @@ select_best_pending_from_link (struct PendingMessageScoreContext *sc, | |||
9936 | if (sc_score + time_delta > pm_score) | 9936 | if (sc_score + time_delta > pm_score) |
9937 | { | 9937 | { |
9938 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9938 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9939 | "sc_score of %llu larger, keep sc->best %llu\n", | 9939 | "sc_score of %" PRIu64 " larger, keep sc->best %" PRIu64 |
9940 | "\n", | ||
9940 | pos->logging_uuid, | 9941 | pos->logging_uuid, |
9941 | sc->best->logging_uuid); | 9942 | sc->best->logging_uuid); |
9942 | continue; /* sc_score larger, keep sc->best */ | 9943 | continue; /* sc_score larger, keep sc->best */ |
@@ -9987,7 +9988,8 @@ extract_box_cb (void *cls, | |||
9987 | bpm->frag_parent = pm; | 9988 | bpm->frag_parent = pm; |
9988 | set_pending_message_uuid (bpm); | 9989 | set_pending_message_uuid (bpm); |
9989 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 9990 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
9990 | "Creating DV Box %llu for original message %llu (next hop is %s)\n", | 9991 | "Creating DV Box %" PRIu64 " for original message %" PRIu64 |
9992 | " (next hop is %s)\n", | ||
9991 | bpm->logging_uuid, | 9993 | bpm->logging_uuid, |
9992 | pm->logging_uuid, | 9994 | pm->logging_uuid, |
9993 | GNUNET_i2s (&next_hop->pid)); | 9995 | GNUNET_i2s (&next_hop->pid)); |
@@ -10067,7 +10069,7 @@ transmit_on_queue (void *cls) | |||
10067 | /* Given selection in `sc`, do transmission */ | 10069 | /* Given selection in `sc`, do transmission */ |
10068 | pm = sc.best; | 10070 | pm = sc.best; |
10069 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 10071 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
10070 | "Selected message <%llu>\n", | 10072 | "Selected message <%" PRIu64 ">\n", |
10071 | pm->logging_uuid); | 10073 | pm->logging_uuid); |
10072 | if (NULL != sc.dvh) | 10074 | if (NULL != sc.dvh) |
10073 | { | 10075 | { |
@@ -10113,7 +10115,8 @@ transmit_on_queue (void *cls) | |||
10113 | if (NULL == pm) | 10115 | if (NULL == pm) |
10114 | { | 10116 | { |
10115 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 10117 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
10116 | "Fragmentation failed queue %s to %s for <%llu>, trying again\n", | 10118 | "Fragmentation failed queue %s to %s for <%" PRIu64 |
10119 | ">, trying again\n", | ||
10117 | queue->address, | 10120 | queue->address, |
10118 | GNUNET_i2s (&n->pid), | 10121 | GNUNET_i2s (&n->pid), |
10119 | sc.best->logging_uuid); | 10122 | sc.best->logging_uuid); |
@@ -10131,7 +10134,8 @@ transmit_on_queue (void *cls) | |||
10131 | /* Reliability boxing failed, try next message... */ | 10134 | /* Reliability boxing failed, try next message... */ |
10132 | GNUNET_log ( | 10135 | GNUNET_log ( |
10133 | GNUNET_ERROR_TYPE_DEBUG, | 10136 | GNUNET_ERROR_TYPE_DEBUG, |
10134 | "Reliability boxing failed queue %s to %s for <%llu>, trying again\n", | 10137 | "Reliability boxing failed queue %s to %s for <%" PRIu64 |
10138 | ">, trying again\n", | ||
10135 | queue->address, | 10139 | queue->address, |
10136 | GNUNET_i2s (&n->pid), | 10140 | GNUNET_i2s (&n->pid), |
10137 | sc.best->logging_uuid); | 10141 | sc.best->logging_uuid); |
@@ -10145,7 +10149,8 @@ transmit_on_queue (void *cls) | |||
10145 | /* Pass 'pm' for transission to the communicator */ | 10149 | /* Pass 'pm' for transission to the communicator */ |
10146 | GNUNET_log ( | 10150 | GNUNET_log ( |
10147 | GNUNET_ERROR_TYPE_DEBUG, | 10151 | GNUNET_ERROR_TYPE_DEBUG, |
10148 | "Passing message <%llu> to queue %s for peer %s (considered %u others)\n", | 10152 | "Passing message <%" PRIu64 |
10153 | "> to queue %s for peer %s (considered %u others)\n", | ||
10149 | pm->logging_uuid, | 10154 | pm->logging_uuid, |
10150 | queue->address, | 10155 | queue->address, |
10151 | GNUNET_i2s (&n->pid), | 10156 | GNUNET_i2s (&n->pid), |
@@ -10198,9 +10203,10 @@ transmit_on_queue (void *cls) | |||
10198 | root = root->frag_parent; | 10203 | root = root->frag_parent; |
10199 | 10204 | ||
10200 | root->frag_count++; | 10205 | root->frag_count++; |
10201 | wait_multiplier = (unsigned int) ceil (root->bytes_msg | 10206 | wait_multiplier = (unsigned int) ceil ((double) root->bytes_msg |
10202 | / (root->frag_off | 10207 | / ((double) root->frag_off |
10203 | / root->frag_count)) * 4; | 10208 | / (double) root->frag_count)) |
10209 | * 4; | ||
10204 | } | 10210 | } |
10205 | else | 10211 | else |
10206 | { | 10212 | { |
@@ -10364,7 +10370,7 @@ handle_send_message_ack (void *cls, | |||
10364 | // Update: Maybe QueueEntry was accidentally freed during freeing PendingMessage. | 10370 | // Update: Maybe QueueEntry was accidentally freed during freeing PendingMessage. |
10365 | /* this should never happen */ | 10371 | /* this should never happen */ |
10366 | GNUNET_break (0); | 10372 | GNUNET_break (0); |
10367 | //GNUNET_SERVICE_client_drop (tc->client); | 10373 | // GNUNET_SERVICE_client_drop (tc->client); |
10368 | GNUNET_SERVICE_client_continue (tc->client); | 10374 | GNUNET_SERVICE_client_continue (tc->client); |
10369 | return; | 10375 | return; |
10370 | } | 10376 | } |
@@ -11242,7 +11248,7 @@ handle_suggest_cancel (void *cls, const struct ExpressPreferenceMessage *msg) | |||
11242 | 11248 | ||
11243 | static void | 11249 | static void |
11244 | hello_for_client_cb (void *cls, | 11250 | hello_for_client_cb (void *cls, |
11245 | const char *uri) | 11251 | const char *uri) |
11246 | { | 11252 | { |
11247 | const struct GNUNET_PeerIdentity *peer = cls; | 11253 | const struct GNUNET_PeerIdentity *peer = cls; |
11248 | int pfx_len; | 11254 | int pfx_len; |
@@ -11282,7 +11288,6 @@ handle_hello_for_client (void *cls, | |||
11282 | const char *emsg) | 11288 | const char *emsg) |
11283 | { | 11289 | { |
11284 | (void) cls; | 11290 | (void) cls; |
11285 | const char *val; | ||
11286 | struct GNUNET_HELLO_Builder *builder; | 11291 | struct GNUNET_HELLO_Builder *builder; |
11287 | 11292 | ||
11288 | if (NULL != emsg) | 11293 | if (NULL != emsg) |
@@ -11514,16 +11519,9 @@ static void | |||
11514 | do_shutdown (void *cls) | 11519 | do_shutdown (void *cls) |
11515 | { | 11520 | { |
11516 | struct LearnLaunchEntry *lle; | 11521 | struct LearnLaunchEntry *lle; |
11517 | struct GNUNET_PEERSTORE_StoreHelloContext *pos; | ||
11518 | 11522 | ||
11519 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 11523 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
11520 | "shutdown logic\n"); | 11524 | "shutdown logic\n"); |
11521 | while (NULL != (pos = shc_head)) | ||
11522 | { | ||
11523 | GNUNET_CONTAINER_DLL_remove (shc_head, shc_tail, pos); | ||
11524 | GNUNET_PEERSTORE_hello_add_cancel (pos); | ||
11525 | } | ||
11526 | |||
11527 | (void) cls; | 11525 | (void) cls; |
11528 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, | 11526 | GNUNET_CONTAINER_multipeermap_iterate (neighbours, |
11529 | &free_neighbour_cb, NULL); | 11527 | &free_neighbour_cb, NULL); |
diff --git a/src/service/transport/meson.build b/src/service/transport/meson.build index 4f8b592fd..3cacc53f6 100644 --- a/src/service/transport/meson.build +++ b/src/service/transport/meson.build | |||
@@ -111,6 +111,7 @@ executable ('gnunet-service-transport', | |||
111 | libgnunethello_dep, | 111 | libgnunethello_dep, |
112 | libgnunetnat_dep, | 112 | libgnunetnat_dep, |
113 | gcrypt_dep, | 113 | gcrypt_dep, |
114 | m_dep, | ||
114 | libgnunetutil_dep], | 115 | libgnunetutil_dep], |
115 | include_directories: [incdir, configuration_inc], | 116 | include_directories: [incdir, configuration_inc], |
116 | install: true, | 117 | install: true, |
diff --git a/src/service/transport/transport_api_cmd_connecting_peers.c b/src/service/transport/transport_api_cmd_connecting_peers.c index c3f63d920..e38d5b860 100644 --- a/src/service/transport/transport_api_cmd_connecting_peers.c +++ b/src/service/transport/transport_api_cmd_connecting_peers.c | |||
@@ -134,12 +134,11 @@ connect_peers_run (void *cls, | |||
134 | { | 134 | { |
135 | char *prefix; | 135 | char *prefix; |
136 | char *rest; | 136 | char *rest; |
137 | char *rest2; | ||
138 | char *address; | 137 | char *address; |
139 | 138 | ||
140 | prefix = strtok (addr, "_"); | 139 | prefix = strtok (addr, "_"); |
141 | rest = strtok (NULL, "_"); | 140 | rest = strtok (NULL, "_"); |
142 | rest2 = strtok (rest, "-"); | 141 | strtok (rest, "-"); |
143 | address = strtok (NULL, "-"); | 142 | address = strtok (NULL, "-"); |
144 | 143 | ||
145 | GNUNET_asprintf (&addr_and_port, | 144 | GNUNET_asprintf (&addr_and_port, |