[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: [gnunet-search] Fix `-s` and `-o` option
From: |
gnunet |
Subject: |
[gnunet] branch master updated: [gnunet-search] Fix `-s` and `-o` options not working together |
Date: |
Sun, 25 Sep 2022 10:05:18 +0200 |
This is an automated email from the git hooks/post-receive script.
madmurphy pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new f66919668 [gnunet-search] Fix `-s` and `-o` options not working
together
f66919668 is described below
commit f669196680e705b1a677f2b2a6fb9af305a37e93
Author: madmurphy <madmurphy333@gmail.com>
AuthorDate: Sun Sep 25 09:05:16 2022 +0100
[gnunet-search] Fix `-s` and `-o` options not working together
---
src/fs/gnunet-search.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index 7e2e4d2a6..54f0095ea 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -114,6 +114,8 @@ static int silent_mode;
static struct GNUNET_SCHEDULER_Task *tt;
+static int stop_searching;
+
/**
* Print the escape sequence at the beginning of a string.
@@ -474,7 +476,7 @@ progress_cb (void *const cls,
break;
case GNUNET_FS_STATUS_SEARCH_RESULT:
- if (silent_mode)
+ if (stop_searching)
break;
if (db != NULL)
@@ -484,6 +486,9 @@ progress_cb (void *const cls,
info->value.search.specifics.result.meta,
NULL);
+ if (silent_mode)
+ break;
+
cnt++;
filename = GNUNET_CONTAINER_meta_data_get_by_type (
info->value.search.specifics.result.meta,
@@ -513,7 +518,7 @@ progress_cb (void *const cls,
{
GNUNET_SCHEDULER_shutdown ();
/* otherwise the function might keep printing results for a while... */
- silent_mode = GNUNET_YES;
+ stop_searching = GNUNET_YES;
}
break;
@@ -558,7 +563,7 @@ static void
timeout_task (void *const cls)
{
tt = NULL;
- silent_mode = GNUNET_YES;
+ stop_searching = GNUNET_YES;
GNUNET_SCHEDULER_shutdown ();
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: [gnunet-search] Fix `-s` and `-o` options not working together,
gnunet <=