diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-02-23 10:48:08 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-02-23 10:48:08 +0100 |
commit | f1e8076ed474a429aff32839ed5f8fc20371839c (patch) | |
tree | bb38cb99b0e9cb7b937d33b539e74b9eb9fe4d32 /src/fs | |
parent | 3d0f1dd3805bfef30ff7a7f8e246a926b7fa7838 (diff) | |
parent | 7b01b7b1760cc973719c9a20123f99e4a7e1b5a6 (diff) | |
download | gnunet-f1e8076ed474a429aff32839ed5f8fc20371839c.tar.gz gnunet-f1e8076ed474a429aff32839ed5f8fc20371839c.zip |
merge
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/Makefile.am | 5 | ||||
-rw-r--r-- | src/fs/fs.conf.in | 2 | ||||
-rw-r--r-- | src/fs/fs_dirmetascan.c | 8 | ||||
-rw-r--r-- | src/fs/fs_publish.c | 18 | ||||
-rw-r--r-- | src/fs/gnunet-publish.c | 4 | ||||
-rw-r--r-- | src/fs/gnunet-search.c | 5 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cadet_client.c | 21 | ||||
-rwxr-xr-x | src/fs/test_gnunet_fs_psd.py.in | 1 |
8 files changed, 38 insertions, 26 deletions
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index 33260a794..d452bbf3c 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am | |||
@@ -282,11 +282,6 @@ check_SCRIPTS += \ | |||
282 | endif | 282 | endif |
283 | endif | 283 | endif |
284 | 284 | ||
285 | if ENABLE_MONKEY | ||
286 | MONKEY = @MONKEYPREFIX@ | ||
287 | AM_LDFLAGS = -no-install | ||
288 | endif | ||
289 | |||
290 | 285 | ||
291 | if ENABLE_TEST_RUN | 286 | if ENABLE_TEST_RUN |
292 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; $(MONKEY) | 287 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; $(MONKEY) |
diff --git a/src/fs/fs.conf.in b/src/fs/fs.conf.in index 92bcf776d..1e4c5c268 100644 --- a/src/fs/fs.conf.in +++ b/src/fs/fs.conf.in | |||
@@ -11,6 +11,8 @@ BINARY = gnunet-service-fs | |||
11 | ACCEPT_FROM = 127.0.0.1; | 11 | ACCEPT_FROM = 127.0.0.1; |
12 | ACCEPT_FROM6 = ::1; | 12 | ACCEPT_FROM6 = ::1; |
13 | 13 | ||
14 | # PREFIX = valgrind | ||
15 | |||
14 | # Do we introduce artificial delays? (may improve anonymity) | 16 | # Do we introduce artificial delays? (may improve anonymity) |
15 | DELAY = YES | 17 | DELAY = YES |
16 | 18 | ||
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c index 4a86a717f..115f99391 100644 --- a/src/fs/fs_dirmetascan.c +++ b/src/fs/fs_dirmetascan.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -332,10 +332,7 @@ process_helper_msgs (void *cls, | |||
332 | break; | 332 | break; |
333 | } | 333 | } |
334 | if (NULL == ds->toplevel) | 334 | if (NULL == ds->toplevel) |
335 | { | ||
336 | GNUNET_break (0); | ||
337 | break; | 335 | break; |
338 | } | ||
339 | ds->progress_callback (ds->progress_callback_cls, | 336 | ds->progress_callback (ds->progress_callback_cls, |
340 | NULL, GNUNET_SYSERR, | 337 | NULL, GNUNET_SYSERR, |
341 | GNUNET_FS_DIRSCANNER_ALL_COUNTED); | 338 | GNUNET_FS_DIRSCANNER_ALL_COUNTED); |
@@ -408,10 +405,7 @@ process_helper_msgs (void *cls, | |||
408 | break; | 405 | break; |
409 | } | 406 | } |
410 | if (NULL == ds->toplevel) | 407 | if (NULL == ds->toplevel) |
411 | { | ||
412 | GNUNET_break (0); | ||
413 | break; | 408 | break; |
414 | } | ||
415 | ds->stop_task = GNUNET_SCHEDULER_add_now (&finish_scan, | 409 | ds->stop_task = GNUNET_SCHEDULER_add_now (&finish_scan, |
416 | ds); | 410 | ds); |
417 | return GNUNET_OK; | 411 | return GNUNET_OK; |
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index c7f3c4152..71ab1122c 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -716,17 +716,21 @@ handle_index_start_failed (void *cls, | |||
716 | struct GNUNET_FS_PublishContext *pc = cls; | 716 | struct GNUNET_FS_PublishContext *pc = cls; |
717 | struct GNUNET_FS_FileInformation *p; | 717 | struct GNUNET_FS_FileInformation *p; |
718 | const char *emsg = (const char *) &msg[1]; | 718 | const char *emsg = (const char *) &msg[1]; |
719 | char *msgtxt; | ||
719 | 720 | ||
720 | GNUNET_MQ_destroy (pc->mq); | 721 | GNUNET_MQ_destroy (pc->mq); |
721 | pc->mq = NULL; | 722 | pc->mq = NULL; |
722 | p = pc->fi_pos; | 723 | p = pc->fi_pos; |
723 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 724 | GNUNET_asprintf (&msgtxt, |
724 | _("Can not index file `%s': %s. Will try to insert instead.\n"), | 725 | _("Can not index file `%s': %s.\n"), |
725 | p->filename, | 726 | p->filename, |
726 | gettext (emsg)); | 727 | gettext (emsg)); |
727 | p->data.file.do_index = GNUNET_NO; | 728 | signal_publish_error (p, |
729 | pc, | ||
730 | msgtxt); | ||
731 | GNUNET_free (msgtxt); | ||
728 | GNUNET_FS_file_information_sync_ (p); | 732 | GNUNET_FS_file_information_sync_ (p); |
729 | publish_content (pc); | 733 | GNUNET_FS_publish_sync_ (pc); |
730 | } | 734 | } |
731 | 735 | ||
732 | 736 | ||
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index a825795cb..eb8a7ed19 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -684,7 +684,7 @@ directory_scan_cb (void *cls, | |||
684 | case GNUNET_FS_DIRSCANNER_INTERNAL_ERROR: | 684 | case GNUNET_FS_DIRSCANNER_INTERNAL_ERROR: |
685 | FPRINTF (stdout, | 685 | FPRINTF (stdout, |
686 | "%s", | 686 | "%s", |
687 | _("Internal error scanning directory.\n")); | 687 | _("Error scanning directory.\n")); |
688 | ret = 1; | 688 | ret = 1; |
689 | GNUNET_SCHEDULER_shutdown (); | 689 | GNUNET_SCHEDULER_shutdown (); |
690 | break; | 690 | break; |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 57d8eed5d..3995b1b5b 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -172,8 +172,11 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | |||
172 | is_directory = | 172 | is_directory = |
173 | GNUNET_FS_meta_data_test_for_directory (info->value.search. | 173 | GNUNET_FS_meta_data_test_for_directory (info->value.search. |
174 | specifics.result.meta); | 174 | specifics.result.meta); |
175 | if (filename != NULL) | 175 | if (NULL != filename) |
176 | { | 176 | { |
177 | while ( (filename[0] != '\0') && | ||
178 | ('/' == filename[strlen(filename)-1]) ) | ||
179 | filename[strlen(filename)-1] = '\0'; | ||
177 | GNUNET_DISK_filename_canonicalize (filename); | 180 | GNUNET_DISK_filename_canonicalize (filename); |
178 | if (GNUNET_YES == is_directory) | 181 | if (GNUNET_YES == is_directory) |
179 | printf ("gnunet-download -o \"%s%s\" -R %s\n", filename, GNUNET_FS_DIRECTORY_EXT, uri); | 182 | printf ("gnunet-download -o \"%s%s\" -R %s\n", filename, GNUNET_FS_DIRECTORY_EXT, uri); |
diff --git a/src/fs/gnunet-service-fs_cadet_client.c b/src/fs/gnunet-service-fs_cadet_client.c index 61f73a50a..9ba250dfa 100644 --- a/src/fs/gnunet-service-fs_cadet_client.c +++ b/src/fs/gnunet-service-fs_cadet_client.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -469,8 +469,11 @@ reset_cadet (struct CadetHandle *mh) | |||
469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 469 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
470 | "Resetting cadet channel to %s\n", | 470 | "Resetting cadet channel to %s\n", |
471 | GNUNET_i2s (&mh->target)); | 471 | GNUNET_i2s (&mh->target)); |
472 | GNUNET_CADET_channel_destroy (mh->channel); | 472 | if (NULL != mh->channel) |
473 | mh->channel = NULL; | 473 | { |
474 | GNUNET_CADET_channel_destroy (mh->channel); | ||
475 | mh->channel = NULL; | ||
476 | } | ||
474 | GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map, | 477 | GNUNET_CONTAINER_multihashmap_iterate (mh->waiting_map, |
475 | &move_to_pending, | 478 | &move_to_pending, |
476 | mh); | 479 | mh); |
@@ -741,7 +744,17 @@ GSF_cadet_release_clients (void *cls, | |||
741 | "Timeout on cadet channel to %s\n", | 744 | "Timeout on cadet channel to %s\n", |
742 | GNUNET_i2s (&mh->target)); | 745 | GNUNET_i2s (&mh->target)); |
743 | if (NULL != mh->channel) | 746 | if (NULL != mh->channel) |
744 | GNUNET_CADET_channel_destroy (mh->channel); | 747 | { |
748 | struct GNUNET_CADET_Channel *channel = mh->channel; | ||
749 | |||
750 | mh->channel = NULL; | ||
751 | GNUNET_CADET_channel_destroy (channel); | ||
752 | } | ||
753 | if (NULL != mh->reset_task) | ||
754 | { | ||
755 | GNUNET_SCHEDULER_cancel (mh->reset_task); | ||
756 | mh->reset_task = NULL; | ||
757 | } | ||
745 | return GNUNET_YES; | 758 | return GNUNET_YES; |
746 | } | 759 | } |
747 | 760 | ||
diff --git a/src/fs/test_gnunet_fs_psd.py.in b/src/fs/test_gnunet_fs_psd.py.in index 416ab5db3..d5a036c28 100755 --- a/src/fs/test_gnunet_fs_psd.py.in +++ b/src/fs/test_gnunet_fs_psd.py.in | |||
@@ -18,6 +18,7 @@ | |||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | 18 | # SPDX-License-Identifier: AGPL3.0-or-later |
19 | # | 19 | # |
20 | # Testcase for file-sharing command-line tools (publish, search, download) | 20 | # Testcase for file-sharing command-line tools (publish, search, download) |
21 | from __future__ import print_function | ||
21 | import sys | 22 | import sys |
22 | import os | 23 | import os |
23 | import subprocess | 24 | import subprocess |