diff options
41 files changed, 116 insertions, 127 deletions
diff --git a/configure.ac b/configure.ac index ae5ee9ff2..6e579e1dd 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1327,6 +1327,7 @@ src/cli/identity/Makefile | |||
1327 | src/cli/messenger/Makefile | 1327 | src/cli/messenger/Makefile |
1328 | src/cli/namecache/Makefile | 1328 | src/cli/namecache/Makefile |
1329 | src/cli/namestore/Makefile | 1329 | src/cli/namestore/Makefile |
1330 | src/cli/peerstore/Makefile | ||
1330 | src/cli/nat/Makefile | 1331 | src/cli/nat/Makefile |
1331 | src/cli/nat-auto/Makefile | 1332 | src/cli/nat-auto/Makefile |
1332 | src/cli/nse/Makefile | 1333 | src/cli/nse/Makefile |
diff --git a/ci/Containerfile b/contrib/ci/Containerfile index e0778e7b7..e0778e7b7 100644 --- a/ci/Containerfile +++ b/contrib/ci/Containerfile | |||
diff --git a/ci/ci.sh b/contrib/ci/ci.sh index 7dd3a957a..7dd3a957a 100755 --- a/ci/ci.sh +++ b/contrib/ci/ci.sh | |||
diff --git a/ci/jobs/0-build/build.sh b/contrib/ci/jobs/0-build/build.sh index a5a89ca82..a5a89ca82 100755 --- a/ci/jobs/0-build/build.sh +++ b/contrib/ci/jobs/0-build/build.sh | |||
diff --git a/ci/jobs/0-build/job.sh b/contrib/ci/jobs/0-build/job.sh index 8d79902c5..8d79902c5 100755 --- a/ci/jobs/0-build/job.sh +++ b/contrib/ci/jobs/0-build/job.sh | |||
diff --git a/ci/jobs/2-deb-package/job.sh b/contrib/ci/jobs/2-deb-package/job.sh index fc1f114f4..fc1f114f4 100755 --- a/ci/jobs/2-deb-package/job.sh +++ b/contrib/ci/jobs/2-deb-package/job.sh | |||
diff --git a/ci/jobs/2-deb-package/version.sh b/contrib/ci/jobs/2-deb-package/version.sh index 74d0099a2..74d0099a2 100755 --- a/ci/jobs/2-deb-package/version.sh +++ b/contrib/ci/jobs/2-deb-package/version.sh | |||
diff --git a/ci/jobs/3-deploy-package/config.ini b/contrib/ci/jobs/3-deploy-package/config.ini index 8d6409a6e..08c106f9c 100644 --- a/ci/jobs/3-deploy-package/config.ini +++ b/contrib/ci/jobs/3-deploy-package/config.ini | |||
@@ -3,3 +3,4 @@ HALT_ON_FAILURE = True | |||
3 | WARN_ON_FAILURE = True | 3 | WARN_ON_FAILURE = True |
4 | CONTAINER_BUILD = False | 4 | CONTAINER_BUILD = False |
5 | CONTAINER_NAME = nixery.dev/shell/rsync | 5 | CONTAINER_NAME = nixery.dev/shell/rsync |
6 | CONTAINER_ARCH = amd64 | ||
diff --git a/ci/jobs/3-deploy-package/job.sh b/contrib/ci/jobs/3-deploy-package/job.sh index d53588a0f..d53588a0f 100755 --- a/ci/jobs/3-deploy-package/job.sh +++ b/contrib/ci/jobs/3-deploy-package/job.sh | |||
diff --git a/contrib/gana b/contrib/gana | |||
Subproject c1dc2dc975742c929a523c22d91f7d4f8278723 | Subproject 840792da1b88e826a178df77a48f42b0b58a257 | ||
diff --git a/po/POTFILES.in b/po/POTFILES.in index 06cff2846..4afcf48db 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -25,6 +25,7 @@ src/cli/nat-auto/gnunet-nat-auto.c | |||
25 | src/cli/nat-auto/gnunet-nat-server.c | 25 | src/cli/nat-auto/gnunet-nat-server.c |
26 | src/cli/nat/gnunet-nat.c | 26 | src/cli/nat/gnunet-nat.c |
27 | src/cli/nse/gnunet-nse.c | 27 | src/cli/nse/gnunet-nse.c |
28 | src/cli/peerstore/gnunet-peerstore.c | ||
28 | src/cli/reclaim/gnunet-did.c | 29 | src/cli/reclaim/gnunet-did.c |
29 | src/cli/reclaim/gnunet-reclaim.c | 30 | src/cli/reclaim/gnunet-reclaim.c |
30 | src/cli/revocation/gnunet-revocation-tvg.c | 31 | src/cli/revocation/gnunet-revocation-tvg.c |
@@ -393,7 +394,6 @@ src/service/nat/nat_api_stun.c | |||
393 | src/service/nse/gnunet-nse-profiler.c | 394 | src/service/nse/gnunet-nse-profiler.c |
394 | src/service/nse/gnunet-service-nse.c | 395 | src/service/nse/gnunet-service-nse.c |
395 | src/service/nse/nse_api.c | 396 | src/service/nse/nse_api.c |
396 | src/service/peerstore/gnunet-peerstore.c | ||
397 | src/service/peerstore/gnunet-service-peerstore.c | 397 | src/service/peerstore/gnunet-service-peerstore.c |
398 | src/service/peerstore/peerstore_api.c | 398 | src/service/peerstore/peerstore_api.c |
399 | src/service/peerstore/peerstore_common.c | 399 | src/service/peerstore/peerstore_common.c |
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index d7584b2c4..6ad6dd70a 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am | |||
@@ -2,6 +2,7 @@ SUBDIRS = \ | |||
2 | util \ | 2 | util \ |
3 | arm \ | 3 | arm \ |
4 | statistics \ | 4 | statistics \ |
5 | peerstore \ | ||
5 | core \ | 6 | core \ |
6 | nat \ | 7 | nat \ |
7 | nat-auto \ | 8 | nat-auto \ |
diff --git a/src/cli/gns/test_dns2gns.conf b/src/cli/gns/test_dns2gns.conf index f484d4114..2f6bdc797 100644 --- a/src/cli/gns/test_dns2gns.conf +++ b/src/cli/gns/test_dns2gns.conf | |||
@@ -18,7 +18,7 @@ MAX_PARALLEL_BACKGROUND_QUERIES = 10 | |||
18 | DEFAULT_LOOKUP_TIMEOUT = 15 s | 18 | DEFAULT_LOOKUP_TIMEOUT = 15 s |
19 | RECORD_PUT_INTERVAL = 1 h | 19 | RECORD_PUT_INTERVAL = 1 h |
20 | ZONE_PUBLISH_TIME_WINDOW = 1 h | 20 | ZONE_PUBLISH_TIME_WINDOW = 1 h |
21 | DNS_ROOT=PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0 | 21 | .gnunet.org = |
22 | 22 | ||
23 | [namestore] | 23 | [namestore] |
24 | IMMEDIATE_START = YES | 24 | IMMEDIATE_START = YES |
@@ -65,4 +65,5 @@ IMMEDIATE_START = YES | |||
65 | RUN_PER_USER = YES | 65 | RUN_PER_USER = YES |
66 | BIND_TO = 127.0.0.1 | 66 | BIND_TO = 127.0.0.1 |
67 | BIND_TO6 = ::1 | 67 | BIND_TO6 = ::1 |
68 | OPTIONS = -d 1.1.1.1 -p 12000 | 68 | PORT = 12000 |
69 | OPTIONS = -d 1.1.1.1 | ||
diff --git a/src/cli/gns/test_dns2gns.sh b/src/cli/gns/test_dns2gns.sh index 295bcc766..a6024ca3c 100755 --- a/src/cli/gns/test_dns2gns.sh +++ b/src/cli/gns/test_dns2gns.sh | |||
@@ -20,7 +20,7 @@ MY_EGO="localego" | |||
20 | TEST_IP="127.0.0.1" | 20 | TEST_IP="127.0.0.1" |
21 | TEST_IPV6="dead::beef" | 21 | TEST_IPV6="dead::beef" |
22 | LABEL="fnord" | 22 | LABEL="fnord" |
23 | TEST_DOMAIN="gnunet.org" | 23 | TEST_DOMAIN="taler.net" |
24 | 24 | ||
25 | gnunet-arm -s -c test_dns2gns.conf | 25 | gnunet-arm -s -c test_dns2gns.conf |
26 | PKEY=`gnunet-identity -V -C $MY_EGO -c test_dns2gns.conf` | 26 | PKEY=`gnunet-identity -V -C $MY_EGO -c test_dns2gns.conf` |
@@ -34,14 +34,16 @@ if nslookup -port=12000 $LABEL.$PKEY localhost && nslookup -port=12000 $LABEL.$M | |||
34 | echo "PASS: GNS records can be resolved using dns2gns bridge" | 34 | echo "PASS: GNS records can be resolved using dns2gns bridge" |
35 | else | 35 | else |
36 | echo "FAIL: GNS records can't be resolved using dns2gns bridge" | 36 | echo "FAIL: GNS records can't be resolved using dns2gns bridge" |
37 | gnunet-arm -e -c test_dns2gns.conf | ||
37 | rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME` | 38 | rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME` |
38 | exit 1 | 39 | exit 1 |
39 | fi | 40 | fi |
40 | 41 | ||
41 | if nslookup -port=12000 gnunet.org localhost; then | 42 | if nslookup -port=12000 $TEST_DOMAIN localhost; then |
42 | echo "PASS: DNS records can be resolved using dns2gns bridge" | 43 | echo "PASS: DNS records can be resolved using dns2gns bridge" |
43 | else | 44 | else |
44 | echo "FAIL: DNS records can't be resolved using dns2gns bridge" | 45 | echo "FAIL: DNS records can't be resolved using dns2gns bridge" |
46 | gnunet-arm -e -c test_dns2gns.conf | ||
45 | rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME` | 47 | rm -rf `gnunet-config -c test_dns2gns.conf -f -s paths -o GNUNET_TEST_HOME` |
46 | exit 1 | 48 | exit 1 |
47 | fi | 49 | fi |
diff --git a/src/cli/identity/.gitignore b/src/cli/identity/.gitignore new file mode 100644 index 000000000..1c5862dbb --- /dev/null +++ b/src/cli/identity/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnunet-identity | |||
diff --git a/src/cli/meson.build b/src/cli/meson.build index 5c1fded1a..12662933d 100644 --- a/src/cli/meson.build +++ b/src/cli/meson.build | |||
@@ -1,6 +1,7 @@ | |||
1 | subdir('util') | 1 | subdir('util') |
2 | subdir('arm') | 2 | subdir('arm') |
3 | subdir('statistics') | 3 | subdir('statistics') |
4 | subdir('peerstore') | ||
4 | subdir('datastore') | 5 | subdir('datastore') |
5 | subdir('nat') | 6 | subdir('nat') |
6 | subdir('nat-auto') | 7 | subdir('nat-auto') |
diff --git a/src/cli/peerstore/.gitignore b/src/cli/peerstore/.gitignore new file mode 100644 index 000000000..3ae0f6c6c --- /dev/null +++ b/src/cli/peerstore/.gitignore | |||
@@ -0,0 +1 @@ | |||
gnunet-peerstore | |||
diff --git a/src/cli/peerstore/Makefile.am b/src/cli/peerstore/Makefile.am new file mode 100644 index 000000000..f5be82f09 --- /dev/null +++ b/src/cli/peerstore/Makefile.am | |||
@@ -0,0 +1,23 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | ||
3 | |||
4 | plugindir = $(libdir)/gnunet | ||
5 | |||
6 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
7 | |||
8 | libexecdir= $(pkglibdir)/libexec/ | ||
9 | |||
10 | if USE_COVERAGE | ||
11 | AM_CFLAGS = -fprofile-arcs -ftest-coverage | ||
12 | endif | ||
13 | |||
14 | # This program does not do anything. | ||
15 | noinst_PROGRAMS = \ | ||
16 | gnunet-peerstore | ||
17 | |||
18 | gnunet_peerstore_SOURCES = \ | ||
19 | gnunet-peerstore.c | ||
20 | gnunet_peerstore_LDADD = \ | ||
21 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
22 | $(top_builddir)/src/service/peerstore/libgnunetpeerstore.la \ | ||
23 | $(GN_LIBINTL) | ||
diff --git a/src/service/peerstore/gnunet-peerstore.c b/src/cli/peerstore/gnunet-peerstore.c index 11313b5d3..84cae675f 100644 --- a/src/service/peerstore/gnunet-peerstore.c +++ b/src/cli/peerstore/gnunet-peerstore.c | |||
@@ -45,7 +45,7 @@ shutdown_task (void *cls) | |||
45 | { | 45 | { |
46 | if (NULL != peerstore_handle) | 46 | if (NULL != peerstore_handle) |
47 | { | 47 | { |
48 | GNUNET_PEERSTORE_disconnect (peerstore_handle, GNUNET_YES); | 48 | GNUNET_PEERSTORE_disconnect (peerstore_handle); |
49 | peerstore_handle = NULL; | 49 | peerstore_handle = NULL; |
50 | } | 50 | } |
51 | } | 51 | } |
diff --git a/src/cli/peerstore/meson.build b/src/cli/peerstore/meson.build new file mode 100644 index 000000000..1fd177734 --- /dev/null +++ b/src/cli/peerstore/meson.build | |||
@@ -0,0 +1,9 @@ | |||
1 | executable ('gnunet-peerstore', | ||
2 | 'gnunet-peerstore.c', | ||
3 | dependencies: [libgnunetpeerstore_dep, | ||
4 | libgnunetutil_dep | ||
5 | ], | ||
6 | include_directories: [incdir, configuration_inc], | ||
7 | install: false, | ||
8 | install_dir: get_option('bindir')) | ||
9 | |||
diff --git a/src/contrib/service/rps/gnunet-service-rps.c b/src/contrib/service/rps/gnunet-service-rps.c index 76e33c87b..8ca25257a 100644 --- a/src/contrib/service/rps/gnunet-service-rps.c +++ b/src/contrib/service/rps/gnunet-service-rps.c | |||
@@ -4745,7 +4745,7 @@ shutdown_task (void *cls) | |||
4745 | 4745 | ||
4746 | /* Disconnect from other services */ | 4746 | /* Disconnect from other services */ |
4747 | GNUNET_PEERSTORE_hello_changed_notify_cancel (peerstore_notify); | 4747 | GNUNET_PEERSTORE_hello_changed_notify_cancel (peerstore_notify); |
4748 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_YES); | 4748 | GNUNET_PEERSTORE_disconnect (peerstore); |
4749 | peerstore = NULL; | 4749 | peerstore = NULL; |
4750 | GNUNET_NSE_disconnect (nse); | 4750 | GNUNET_NSE_disconnect (nse); |
4751 | if (NULL != map_single_hop) | 4751 | if (NULL != map_single_hop) |
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 9b2b50f01..85b67377b 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -146,12 +146,6 @@ enum GNUNET_GenericReturnValue | |||
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * wrap va_arg for enums | ||
150 | */ | ||
151 | #define GNUNET_VA_ARG_ENUM(va, X) ((enum X) va_arg (va, int)) | ||
152 | |||
153 | |||
154 | /** | ||
155 | * @ingroup logging | 149 | * @ingroup logging |
156 | * define #GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source | 150 | * define #GNUNET_EXTRA_LOGGING if using this header outside the GNUnet source |
157 | * tree where gnunet_config.h is unavailable | 151 | * tree where gnunet_config.h is unavailable |
diff --git a/src/include/gnunet_peerstore_service.h b/src/include/gnunet_peerstore_service.h index c57a66b1f..966abb7a6 100644 --- a/src/include/gnunet_peerstore_service.h +++ b/src/include/gnunet_peerstore_service.h | |||
@@ -337,15 +337,13 @@ GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); | |||
337 | 337 | ||
338 | 338 | ||
339 | /** | 339 | /** |
340 | * Disconnect from the PEERSTORE service. Any pending ITERATE and WATCH requests | 340 | * Disconnect from the PEERSTORE service. Any pending ITERATE and WATCH and |
341 | * will be canceled. | 341 | * STORE requests will be canceled. |
342 | * Any pending STORE requests will depend on @e snyc_first flag. | ||
343 | * | 342 | * |
344 | * @param h handle to disconnect | 343 | * @param h handle to disconnect |
345 | * @param sync_first send any pending STORE requests before disconnecting | ||
346 | */ | 344 | */ |
347 | void | 345 | void |
348 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first); | 346 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h); |
349 | 347 | ||
350 | 348 | ||
351 | /** | 349 | /** |
diff --git a/src/lib/util/gnunet_error_codes.c b/src/lib/util/gnunet_error_codes.c index c286f2e52..11ce2d0c8 100644 --- a/src/lib/util/gnunet_error_codes.c +++ b/src/lib/util/gnunet_error_codes.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | #include "platform.h" | ||
21 | #include "gnunet_error_codes.h" | 20 | #include "gnunet_error_codes.h" |
22 | #include <stddef.h> | 21 | #include <stddef.h> |
23 | #include <microhttpd.h> | 22 | #include <microhttpd.h> |
diff --git a/src/service/cadet/gnunet-service-cadet_hello.c b/src/service/cadet/gnunet-service-cadet_hello.c index 3c8509ea4..ac84fab1e 100644 --- a/src/service/cadet/gnunet-service-cadet_hello.c +++ b/src/service/cadet/gnunet-service-cadet_hello.c | |||
@@ -128,7 +128,7 @@ GCH_shutdown () | |||
128 | } | 128 | } |
129 | if (NULL != peerstore) | 129 | if (NULL != peerstore) |
130 | { | 130 | { |
131 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_YES); | 131 | GNUNET_PEERSTORE_disconnect (peerstore); |
132 | peerstore = NULL; | 132 | peerstore = NULL; |
133 | } | 133 | } |
134 | if (NULL != mine) | 134 | if (NULL != mine) |
diff --git a/src/service/dhtu/plugin_dhtu_gnunet.c b/src/service/dhtu/plugin_dhtu_gnunet.c index 1c56be0e5..7c02fdd15 100644 --- a/src/service/dhtu/plugin_dhtu_gnunet.c +++ b/src/service/dhtu/plugin_dhtu_gnunet.c | |||
@@ -540,7 +540,7 @@ libgnunet_plugin_dhtu_gnunet_done (void *cls) | |||
540 | if (NULL != plugin->peerstore_notify) | 540 | if (NULL != plugin->peerstore_notify) |
541 | GNUNET_PEERSTORE_hello_changed_notify_cancel (plugin->peerstore_notify); | 541 | GNUNET_PEERSTORE_hello_changed_notify_cancel (plugin->peerstore_notify); |
542 | if (NULL != plugin->peerstore) | 542 | if (NULL != plugin->peerstore) |
543 | GNUNET_PEERSTORE_disconnect (plugin->peerstore, GNUNET_YES); | 543 | GNUNET_PEERSTORE_disconnect (plugin->peerstore); |
544 | //GPI_plugins_unload (); | 544 | //GPI_plugins_unload (); |
545 | GNUNET_free (plugin->my_priv); | 545 | GNUNET_free (plugin->my_priv); |
546 | GNUNET_free (plugin); | 546 | GNUNET_free (plugin); |
diff --git a/src/service/fs/fs_api.c b/src/service/fs/fs_api.c index 627c58004..65646c7eb 100644 --- a/src/service/fs/fs_api.c +++ b/src/service/fs/fs_api.c | |||
@@ -3264,7 +3264,7 @@ GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
3264 | GNUNET_TIME_UNIT_MINUTES; /* conservative starting point */ | 3264 | GNUNET_TIME_UNIT_MINUTES; /* conservative starting point */ |
3265 | va_start (ap, flags); | 3265 | va_start (ap, flags); |
3266 | while (GNUNET_FS_OPTIONS_END != | 3266 | while (GNUNET_FS_OPTIONS_END != |
3267 | (opt = GNUNET_VA_ARG_ENUM (ap, GNUNET_FS_OPTIONS))) | 3267 | (opt = ((enum GNUNET_FS_OPTIONS) va_arg (ap, int)))) |
3268 | { | 3268 | { |
3269 | switch (opt) | 3269 | switch (opt) |
3270 | { | 3270 | { |
diff --git a/src/service/fs/gnunet-service-fs_cp.c b/src/service/fs/gnunet-service-fs_cp.c index 74dd42daf..b2b73d0a5 100644 --- a/src/service/fs/gnunet-service-fs_cp.c +++ b/src/service/fs/gnunet-service-fs_cp.c | |||
@@ -1610,8 +1610,7 @@ GSF_connected_peer_done_ () | |||
1610 | fr_task = NULL; | 1610 | fr_task = NULL; |
1611 | GNUNET_CONTAINER_multipeermap_destroy (cp_map); | 1611 | GNUNET_CONTAINER_multipeermap_destroy (cp_map); |
1612 | cp_map = NULL; | 1612 | cp_map = NULL; |
1613 | GNUNET_PEERSTORE_disconnect (peerstore, | 1613 | GNUNET_PEERSTORE_disconnect (peerstore); |
1614 | GNUNET_YES); | ||
1615 | } | 1614 | } |
1616 | 1615 | ||
1617 | 1616 | ||
diff --git a/src/service/gns/gnunet-dns2gns.c b/src/service/gns/gnunet-dns2gns.c index 04d320c62..8706bec3a 100644 --- a/src/service/gns/gnunet-dns2gns.c +++ b/src/service/gns/gnunet-dns2gns.c | |||
@@ -750,7 +750,7 @@ read_dns4 (void *cls) | |||
750 | "recvfrom"); | 750 | "recvfrom"); |
751 | return; | 751 | return; |
752 | } | 752 | } |
753 | GNUNET_break (size == sret); | 753 | GNUNET_break (size != sret); |
754 | handle_request (listen_socket4, | 754 | handle_request (listen_socket4, |
755 | &v4, | 755 | &v4, |
756 | addrlen, | 756 | addrlen, |
@@ -803,7 +803,7 @@ read_dns6 (void *cls) | |||
803 | "recvfrom"); | 803 | "recvfrom"); |
804 | return; | 804 | return; |
805 | } | 805 | } |
806 | GNUNET_break (size == sret); | 806 | GNUNET_break (size != sret); |
807 | handle_request (listen_socket6, | 807 | handle_request (listen_socket6, |
808 | &v6, | 808 | &v6, |
809 | addrlen, | 809 | addrlen, |
diff --git a/src/service/hostlist/gnunet-daemon-hostlist_client.c b/src/service/hostlist/gnunet-daemon-hostlist_client.c index bedc52612..2a03caaac 100644 --- a/src/service/hostlist/gnunet-daemon-hostlist_client.c +++ b/src/service/hostlist/gnunet-daemon-hostlist_client.c | |||
@@ -1814,7 +1814,7 @@ GNUNET_HOSTLIST_client_stop () | |||
1814 | proxy_password = NULL; | 1814 | proxy_password = NULL; |
1815 | if (NULL != peerstore) | 1815 | if (NULL != peerstore) |
1816 | { | 1816 | { |
1817 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_YES); | 1817 | GNUNET_PEERSTORE_disconnect (peerstore); |
1818 | peerstore = NULL; | 1818 | peerstore = NULL; |
1819 | } | 1819 | } |
1820 | cfg = NULL; | 1820 | cfg = NULL; |
diff --git a/src/service/hostlist/gnunet-daemon-hostlist_server.c b/src/service/hostlist/gnunet-daemon-hostlist_server.c index dd4f435a1..d2ef8dd7a 100644 --- a/src/service/hostlist/gnunet-daemon-hostlist_server.c +++ b/src/service/hostlist/gnunet-daemon-hostlist_server.c | |||
@@ -876,7 +876,7 @@ GNUNET_HOSTLIST_server_stop () | |||
876 | } | 876 | } |
877 | if (NULL != peerstore) | 877 | if (NULL != peerstore) |
878 | { | 878 | { |
879 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_YES); | 879 | GNUNET_PEERSTORE_disconnect (peerstore); |
880 | peerstore = NULL; | 880 | peerstore = NULL; |
881 | } | 881 | } |
882 | cfg = NULL; | 882 | cfg = NULL; |
diff --git a/src/service/peerstore/Makefile.am b/src/service/peerstore/Makefile.am index de301bbcf..6ca8e7925 100644 --- a/src/service/peerstore/Makefile.am +++ b/src/service/peerstore/Makefile.am | |||
@@ -14,23 +14,12 @@ if USE_COVERAGE | |||
14 | AM_CFLAGS = -fprofile-arcs -ftest-coverage | 14 | AM_CFLAGS = -fprofile-arcs -ftest-coverage |
15 | endif | 15 | endif |
16 | 16 | ||
17 | # This program does not do anything. | ||
18 | noinst_PROGRAMS = \ | ||
19 | gnunet-peerstore | ||
20 | |||
21 | libexec_PROGRAMS = \ | 17 | libexec_PROGRAMS = \ |
22 | gnunet-service-peerstore | 18 | gnunet-service-peerstore |
23 | 19 | ||
24 | lib_LTLIBRARIES = \ | 20 | lib_LTLIBRARIES = \ |
25 | libgnunetpeerstore.la | 21 | libgnunetpeerstore.la |
26 | 22 | ||
27 | gnunet_peerstore_SOURCES = \ | ||
28 | gnunet-peerstore.c | ||
29 | gnunet_peerstore_LDADD = \ | ||
30 | $(top_builddir)/src/lib/util/libgnunetutil.la \ | ||
31 | libgnunetpeerstore.la \ | ||
32 | $(GN_LIBINTL) | ||
33 | |||
34 | gnunet_service_peerstore_SOURCES = \ | 23 | gnunet_service_peerstore_SOURCES = \ |
35 | gnunet-service-peerstore.c \ | 24 | gnunet-service-peerstore.c \ |
36 | peerstore_common.c peerstore_common.h \ | 25 | peerstore_common.c peerstore_common.h \ |
diff --git a/src/service/peerstore/peerstore_api.c b/src/service/peerstore/peerstore_api.c index 9014193c7..3dec7e01b 100644 --- a/src/service/peerstore/peerstore_api.c +++ b/src/service/peerstore/peerstore_api.c | |||
@@ -86,10 +86,6 @@ struct GNUNET_PEERSTORE_Handle | |||
86 | */ | 86 | */ |
87 | struct GNUNET_TIME_Relative reconnect_delay; | 87 | struct GNUNET_TIME_Relative reconnect_delay; |
88 | 88 | ||
89 | /** | ||
90 | * Are we in the process of disconnecting but need to sync first? | ||
91 | */ | ||
92 | int disconnecting; | ||
93 | }; | 89 | }; |
94 | 90 | ||
95 | /** | 91 | /** |
@@ -465,25 +461,6 @@ destroy_watch (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
465 | 461 | ||
466 | 462 | ||
467 | /** | 463 | /** |
468 | * Kill the connection to the service. This can be delayed in case of pending | ||
469 | * STORE requests and the user explicitly asked to sync first. Otherwise it is | ||
470 | * performed instantly. | ||
471 | * | ||
472 | * @param h Handle to the service. | ||
473 | */ | ||
474 | static void | ||
475 | final_disconnect (struct GNUNET_PEERSTORE_Handle *h) | ||
476 | { | ||
477 | if (NULL != h->mq) | ||
478 | { | ||
479 | GNUNET_MQ_destroy (h->mq); | ||
480 | h->mq = NULL; | ||
481 | } | ||
482 | GNUNET_free (h); | ||
483 | } | ||
484 | |||
485 | |||
486 | /** | ||
487 | * Connect to the PEERSTORE service. | 464 | * Connect to the PEERSTORE service. |
488 | * | 465 | * |
489 | * @param cfg configuration to use | 466 | * @param cfg configuration to use |
@@ -496,7 +473,6 @@ GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
496 | 473 | ||
497 | h = GNUNET_new (struct GNUNET_PEERSTORE_Handle); | 474 | h = GNUNET_new (struct GNUNET_PEERSTORE_Handle); |
498 | h->cfg = cfg; | 475 | h->cfg = cfg; |
499 | h->disconnecting = GNUNET_NO; | ||
500 | reconnect (h); | 476 | reconnect (h); |
501 | if (NULL == h->mq) | 477 | if (NULL == h->mq) |
502 | { | 478 | { |
@@ -513,10 +489,9 @@ GNUNET_PEERSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
513 | * Any pending STORE requests will depend on @e snyc_first flag. | 489 | * Any pending STORE requests will depend on @e snyc_first flag. |
514 | * | 490 | * |
515 | * @param h handle to disconnect | 491 | * @param h handle to disconnect |
516 | * @param sync_first send any pending STORE requests before disconnecting | ||
517 | */ | 492 | */ |
518 | void | 493 | void |
519 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first) | 494 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h) |
520 | { | 495 | { |
521 | struct GNUNET_PEERSTORE_IterateContext *ic; | 496 | struct GNUNET_PEERSTORE_IterateContext *ic; |
522 | struct GNUNET_PEERSTORE_StoreContext *sc; | 497 | struct GNUNET_PEERSTORE_StoreContext *sc; |
@@ -533,19 +508,12 @@ GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first) | |||
533 | GNUNET_break (0); | 508 | GNUNET_break (0); |
534 | GNUNET_PEERSTORE_iterate_cancel (ic); | 509 | GNUNET_PEERSTORE_iterate_cancel (ic); |
535 | } | 510 | } |
536 | if (NULL != h->store_head) | 511 | while (NULL != (sc = h->store_head)) |
537 | { | 512 | { |
538 | if (GNUNET_YES == sync_first) | 513 | GNUNET_break (0); |
539 | { | 514 | GNUNET_PEERSTORE_store_cancel (sc); |
540 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
541 | "Delaying disconnection due to pending store requests.\n"); | ||
542 | h->disconnecting = GNUNET_YES; | ||
543 | return; | ||
544 | } | ||
545 | while (NULL != (sc = h->store_head)) | ||
546 | GNUNET_PEERSTORE_store_cancel (sc); | ||
547 | } | 515 | } |
548 | final_disconnect (h); | 516 | disconnect (h); |
549 | } | 517 | } |
550 | 518 | ||
551 | 519 | ||
@@ -562,8 +530,6 @@ GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first) | |||
562 | void | 530 | void |
563 | GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc) | 531 | GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc) |
564 | { | 532 | { |
565 | struct GNUNET_PEERSTORE_Handle *h = sc->h; | ||
566 | |||
567 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 533 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
568 | "store cancel with sc %p \n", | 534 | "store cancel with sc %p \n", |
569 | sc); | 535 | sc); |
@@ -575,8 +541,6 @@ GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc) | |||
575 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 541 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
576 | "store cancel with sc %p is null\n", | 542 | "store cancel with sc %p is null\n", |
577 | sc); | 543 | sc); |
578 | if ((GNUNET_YES == h->disconnecting) && (NULL == h->store_head)) | ||
579 | final_disconnect (h); | ||
580 | } | 544 | } |
581 | 545 | ||
582 | 546 | ||
@@ -751,15 +715,15 @@ handle_iterate_result (void *cls, const struct StoreRecordMessage *msg) | |||
751 | void | 715 | void |
752 | GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic) | 716 | GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic) |
753 | { | 717 | { |
754 | if (GNUNET_NO == ic->iterating) | 718 | if (GNUNET_YES == ic->iterating) |
755 | { | 719 | { |
756 | GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic); | 720 | if (NULL != ic->callback) |
757 | GNUNET_free (ic->sub_system); | 721 | ic->callback (ic->callback_cls, NULL, "Iteration canceled due to reconnection"); |
758 | GNUNET_free (ic->key); | ||
759 | GNUNET_free (ic); | ||
760 | } | 722 | } |
761 | else | 723 | GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic); |
762 | ic->callback = NULL; | 724 | GNUNET_free (ic->sub_system); |
725 | GNUNET_free (ic->key); | ||
726 | GNUNET_free (ic); | ||
763 | } | 727 | } |
764 | 728 | ||
765 | 729 | ||
@@ -965,8 +929,8 @@ GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc) | |||
965 | 929 | ||
966 | static void | 930 | static void |
967 | watch_iterate (void *cls, | 931 | watch_iterate (void *cls, |
968 | const struct GNUNET_PEERSTORE_Record *record, | 932 | const struct GNUNET_PEERSTORE_Record *record, |
969 | const char *emsg) | 933 | const char *emsg) |
970 | { | 934 | { |
971 | struct GNUNET_PEERSTORE_WatchContext *wc = cls; | 935 | struct GNUNET_PEERSTORE_WatchContext *wc = cls; |
972 | struct GNUNET_PEERSTORE_Handle *h = wc->h; | 936 | struct GNUNET_PEERSTORE_Handle *h = wc->h; |
@@ -1053,11 +1017,11 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, | |||
1053 | wc->sub_system = sub_system; | 1017 | wc->sub_system = sub_system; |
1054 | 1018 | ||
1055 | wc->ic = GNUNET_PEERSTORE_iterate (h, | 1019 | wc->ic = GNUNET_PEERSTORE_iterate (h, |
1056 | sub_system, | 1020 | sub_system, |
1057 | peer, | 1021 | peer, |
1058 | key, | 1022 | key, |
1059 | &watch_iterate, | 1023 | &watch_iterate, |
1060 | wc); | 1024 | wc); |
1061 | 1025 | ||
1062 | return wc; | 1026 | return wc; |
1063 | } | 1027 | } |
@@ -1091,7 +1055,8 @@ hello_updated (void *cls, | |||
1091 | hello = record->value; | 1055 | hello = record->value; |
1092 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1056 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1093 | "hello_updated with expired %s and size %u for peer %s\n", | 1057 | "hello_updated with expired %s and size %u for peer %s\n", |
1094 | GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)), | 1058 | GNUNET_STRINGS_absolute_time_to_string ( |
1059 | GNUNET_HELLO_builder_get_expiration_time (hello)), | ||
1095 | ntohs (hello->size), | 1060 | ntohs (hello->size), |
1096 | GNUNET_i2s (&record->peer)); | 1061 | GNUNET_i2s (&record->peer)); |
1097 | if ((0 == record->value_size)) | 1062 | if ((0 == record->value_size)) |
@@ -1119,11 +1084,11 @@ GNUNET_PEERSTORE_hello_changed_notify (struct GNUNET_PEERSTORE_Handle *h, | |||
1119 | nc->h = h; | 1084 | nc->h = h; |
1120 | 1085 | ||
1121 | nc->wc = GNUNET_PEERSTORE_watch (h, | 1086 | nc->wc = GNUNET_PEERSTORE_watch (h, |
1122 | "peerstore", | 1087 | "peerstore", |
1123 | NULL, | 1088 | NULL, |
1124 | GNUNET_PEERSTORE_HELLO_KEY, | 1089 | GNUNET_PEERSTORE_HELLO_KEY, |
1125 | &hello_updated, | 1090 | &hello_updated, |
1126 | nc); | 1091 | nc); |
1127 | 1092 | ||
1128 | return nc; | 1093 | return nc; |
1129 | } | 1094 | } |
@@ -1152,7 +1117,8 @@ merge_success (void *cls, int success) | |||
1152 | struct StoreHelloCls *shu_cls = cls; | 1117 | struct StoreHelloCls *shu_cls = cls; |
1153 | struct GNUNET_PEERSTORE_StoreHelloContext *huc = shu_cls->huc; | 1118 | struct GNUNET_PEERSTORE_StoreHelloContext *huc = shu_cls->huc; |
1154 | 1119 | ||
1155 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_remove (huc->store_context_map, huc->pid, shu_cls->sc)) | 1120 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_remove (huc->store_context_map, |
1121 | huc->pid, shu_cls->sc)) | ||
1156 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1122 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1157 | "There was no store context to be removed after storing hello for peer %s\n", | 1123 | "There was no store context to be removed after storing hello for peer %s\n", |
1158 | GNUNET_i2s (huc->pid)); | 1124 | GNUNET_i2s (huc->pid)); |
@@ -1213,14 +1179,16 @@ store_hello (struct GNUNET_PEERSTORE_StoreHelloContext *huc, | |||
1213 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1214 | "store_hello with expiration %s\n", | 1180 | "store_hello with expiration %s\n", |
1215 | GNUNET_STRINGS_absolute_time_to_string (hello_exp)); | 1181 | GNUNET_STRINGS_absolute_time_to_string (hello_exp)); |
1216 | GNUNET_assert (GNUNET_SYSERR != GNUNET_CONTAINER_multipeermap_put (huc->store_context_map, | 1182 | GNUNET_assert (GNUNET_SYSERR != GNUNET_CONTAINER_multipeermap_put ( |
1217 | huc->pid, | 1183 | huc->store_context_map, |
1218 | sc, | 1184 | huc->pid, |
1219 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); | 1185 | sc, |
1186 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); | ||
1220 | shu_cls->sc = sc; | 1187 | shu_cls->sc = sc; |
1221 | } | 1188 | } |
1222 | 1189 | ||
1223 | //TODO Find a better name for the function. We do not merge, but replace, if there is a storing process | 1190 | |
1191 | // TODO Find a better name for the function. We do not merge, but replace, if there is a storing process | ||
1224 | // during another store process with a newer hello. | 1192 | // during another store process with a newer hello. |
1225 | static void | 1193 | static void |
1226 | merge_uri (void *cls, | 1194 | merge_uri (void *cls, |
@@ -1249,11 +1217,12 @@ merge_uri (void *cls, | |||
1249 | GNUNET_STRINGS_absolute_time_to_string (huc_hello_exp_time)); | 1217 | GNUNET_STRINGS_absolute_time_to_string (huc_hello_exp_time)); |
1250 | store_hello (huc, huc->hello); | 1218 | store_hello (huc, huc->hello); |
1251 | } | 1219 | } |
1252 | else if (GNUNET_NO == huc->success && 0 == GNUNET_memcmp (huc->pid, &record->peer)) | 1220 | else if (GNUNET_NO == huc->success && 0 == GNUNET_memcmp (huc->pid, |
1221 | &record->peer)) | ||
1253 | { | 1222 | { |
1254 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1255 | "merge_uri record for peer %s\n", | 1224 | "merge_uri record for peer %s\n", |
1256 | GNUNET_i2s (&record->peer)); | 1225 | GNUNET_i2s (&record->peer)); |
1257 | hello = record->value; | 1226 | hello = record->value; |
1258 | if ((0 == record->value_size)) | 1227 | if ((0 == record->value_size)) |
1259 | { | 1228 | { |
@@ -1310,11 +1279,11 @@ GNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h, | |||
1310 | GNUNET_STRINGS_absolute_time_to_string (huc_exp), | 1279 | GNUNET_STRINGS_absolute_time_to_string (huc_exp), |
1311 | size_msg); | 1280 | size_msg); |
1312 | huc->wc = GNUNET_PEERSTORE_watch (h, | 1281 | huc->wc = GNUNET_PEERSTORE_watch (h, |
1313 | "peerstore", | 1282 | "peerstore", |
1314 | NULL, | 1283 | NULL, |
1315 | GNUNET_PEERSTORE_HELLO_KEY, | 1284 | GNUNET_PEERSTORE_HELLO_KEY, |
1316 | &merge_uri, | 1285 | &merge_uri, |
1317 | huc); | 1286 | huc); |
1318 | GNUNET_HELLO_builder_free (builder); | 1287 | GNUNET_HELLO_builder_free (builder); |
1319 | 1288 | ||
1320 | return huc; | 1289 | return huc; |
@@ -1322,13 +1291,14 @@ GNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h, | |||
1322 | 1291 | ||
1323 | 1292 | ||
1324 | static enum GNUNET_GenericReturnValue | 1293 | static enum GNUNET_GenericReturnValue |
1325 | free_store_context(void *cls, | 1294 | free_store_context (void *cls, |
1326 | const struct GNUNET_PeerIdentity *key, | 1295 | const struct GNUNET_PeerIdentity *key, |
1327 | void *value) | 1296 | void *value) |
1328 | { | 1297 | { |
1329 | (void) cls; | 1298 | (void) cls; |
1330 | 1299 | ||
1331 | GNUNET_PEERSTORE_store_cancel ((struct GNUNET_PEERSTORE_StoreContext *) value); | 1300 | GNUNET_PEERSTORE_store_cancel ((struct |
1301 | GNUNET_PEERSTORE_StoreContext *) value); | ||
1332 | return GNUNET_YES; // FIXME why is this a map anyway | 1302 | return GNUNET_YES; // FIXME why is this a map anyway |
1333 | } | 1303 | } |
1334 | 1304 | ||
diff --git a/src/service/peerstore/perf_peerstore_store.c b/src/service/peerstore/perf_peerstore_store.c index 24c7e4f01..e59af61e5 100644 --- a/src/service/peerstore/perf_peerstore_store.c +++ b/src/service/peerstore/perf_peerstore_store.c | |||
@@ -43,7 +43,7 @@ static void | |||
43 | disconnect () | 43 | disconnect () |
44 | { | 44 | { |
45 | if (NULL != h) | 45 | if (NULL != h) |
46 | GNUNET_PEERSTORE_disconnect (h, GNUNET_YES); | 46 | GNUNET_PEERSTORE_disconnect (h); |
47 | GNUNET_SCHEDULER_shutdown (); | 47 | GNUNET_SCHEDULER_shutdown (); |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/src/service/peerstore/test_peerstore_api_iterate.c b/src/service/peerstore/test_peerstore_api_iterate.c index b6cd51906..59367a110 100644 --- a/src/service/peerstore/test_peerstore_api_iterate.c +++ b/src/service/peerstore/test_peerstore_api_iterate.c | |||
@@ -58,7 +58,7 @@ iter3_cb (void *cls, | |||
58 | } | 58 | } |
59 | GNUNET_assert (count == 3); | 59 | GNUNET_assert (count == 3); |
60 | ok = 0; | 60 | ok = 0; |
61 | GNUNET_PEERSTORE_disconnect (h, GNUNET_NO); | 61 | GNUNET_PEERSTORE_disconnect (h); |
62 | GNUNET_SCHEDULER_shutdown (); | 62 | GNUNET_SCHEDULER_shutdown (); |
63 | } | 63 | } |
64 | 64 | ||
diff --git a/src/service/peerstore/test_peerstore_api_sync.c b/src/service/peerstore/test_peerstore_api_sync.c index 5057c98b5..4e16afae8 100644 --- a/src/service/peerstore/test_peerstore_api_sync.c +++ b/src/service/peerstore/test_peerstore_api_sync.c | |||
@@ -110,8 +110,7 @@ iterate_cb (void *cls, | |||
110 | it = NULL; | 110 | it = NULL; |
111 | if (0 == ok) | 111 | if (0 == ok) |
112 | { | 112 | { |
113 | GNUNET_PEERSTORE_disconnect (h, | 113 | GNUNET_PEERSTORE_disconnect (h); |
114 | GNUNET_NO); | ||
115 | if (NULL != to) | 114 | if (NULL != to) |
116 | { | 115 | { |
117 | GNUNET_SCHEDULER_cancel (to); | 116 | GNUNET_SCHEDULER_cancel (to); |
diff --git a/src/service/topology/gnunet-daemon-topology.c b/src/service/topology/gnunet-daemon-topology.c index a1875eb38..8b9360e86 100644 --- a/src/service/topology/gnunet-daemon-topology.c +++ b/src/service/topology/gnunet-daemon-topology.c | |||
@@ -943,7 +943,7 @@ cleaning_task (void *cls) | |||
943 | } | 943 | } |
944 | if (NULL != ps) | 944 | if (NULL != ps) |
945 | { | 945 | { |
946 | GNUNET_PEERSTORE_disconnect (ps, GNUNET_YES); | 946 | GNUNET_PEERSTORE_disconnect (ps); |
947 | ps = NULL; | 947 | ps = NULL; |
948 | } | 948 | } |
949 | if (NULL != stats) | 949 | if (NULL != stats) |
diff --git a/src/service/transport/gnunet-communicator-tcp.c b/src/service/transport/gnunet-communicator-tcp.c index 318f2286e..e1d11d569 100644 --- a/src/service/transport/gnunet-communicator-tcp.c +++ b/src/service/transport/gnunet-communicator-tcp.c | |||
@@ -3526,7 +3526,7 @@ do_shutdown (void *cls) | |||
3526 | } | 3526 | } |
3527 | if (NULL != peerstore) | 3527 | if (NULL != peerstore) |
3528 | { | 3528 | { |
3529 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_NO); | 3529 | GNUNET_PEERSTORE_disconnect (peerstore); |
3530 | peerstore = NULL; | 3530 | peerstore = NULL; |
3531 | } | 3531 | } |
3532 | if (NULL != resolve_request_handle) | 3532 | if (NULL != resolve_request_handle) |
diff --git a/src/service/transport/gnunet-service-transport.c b/src/service/transport/gnunet-service-transport.c index ab5613101..bb566cb25 100644 --- a/src/service/transport/gnunet-service-transport.c +++ b/src/service/transport/gnunet-service-transport.c | |||
@@ -11617,7 +11617,7 @@ do_shutdown (void *cls) | |||
11617 | { | 11617 | { |
11618 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 11618 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
11619 | "Disconnecting from PEERSTORE service\n"); | 11619 | "Disconnecting from PEERSTORE service\n"); |
11620 | GNUNET_PEERSTORE_disconnect (peerstore, GNUNET_NO); | 11620 | GNUNET_PEERSTORE_disconnect (peerstore); |
11621 | peerstore = NULL; | 11621 | peerstore = NULL; |
11622 | } | 11622 | } |
11623 | GNUNET_CONTAINER_multishortmap_destroy (dvlearn_map); | 11623 | GNUNET_CONTAINER_multishortmap_destroy (dvlearn_map); |
diff --git a/src/service/transport/transport-testing2.c b/src/service/transport/transport-testing2.c index b88a2b7e9..4081e5111 100644 --- a/src/service/transport/transport-testing2.c +++ b/src/service/transport/transport-testing2.c | |||
@@ -649,7 +649,7 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct | |||
649 | { | 649 | { |
650 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 650 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
651 | "Disconnecting from PEERSTORE service\n"); | 651 | "Disconnecting from PEERSTORE service\n"); |
652 | GNUNET_PEERSTORE_disconnect (p->ph, GNUNET_NO); | 652 | GNUNET_PEERSTORE_disconnect (p->ph); |
653 | p->ph = NULL; | 653 | p->ph = NULL; |
654 | } | 654 | } |
655 | 655 | ||
diff --git a/src/service/transport/transport_api_cmd_stop_peer.c b/src/service/transport/transport_api_cmd_stop_peer.c index 60d48c56b..795a2f0f3 100644 --- a/src/service/transport/transport_api_cmd_stop_peer.c +++ b/src/service/transport/transport_api_cmd_stop_peer.c | |||
@@ -84,7 +84,7 @@ stop_peer_run (void *cls, | |||
84 | { | 84 | { |
85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 85 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
86 | "Disconnecting from PEERSTORE service\n"); | 86 | "Disconnecting from PEERSTORE service\n"); |
87 | GNUNET_PEERSTORE_disconnect (sps->ph, GNUNET_NO); | 87 | GNUNET_PEERSTORE_disconnect (sps->ph); |
88 | } | 88 | } |
89 | if (NULL != sps->peer) | 89 | if (NULL != sps->peer) |
90 | { | 90 | { |