gnunet-search: fflush after printing each search result

View: New views
2 Messages — Rating Filter:   Alert me  

gnunet-search: fflush after printing each search result

by Yunta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'd like to suggest this:

Index: src/applications/fs/tools/gnunet-search.c
===================================================================
--- src/applications/fs/tools/gnunet-search.c (revision 8235)
+++ src/applications/fs/tools/gnunet-search.c (working copy)
@@ -103,6 +103,7 @@
         printf ("gnunet-download %s\n", uri);
       printMeta (event->data.SearchResult.fi.meta);
       printf ("\n");
+      fflush(stdout);
       GNUNET_free_non_null (filename);
       GNUNET_free (uri);

Change is small and probably won't break anything.
It is very helpful when piping gnunet-search results to another process
or just redirecting output to file.

br,
yunta


_______________________________________________
GNUnet-developers mailing list
GNUnet-developers@...
http://lists.gnu.org/mailman/listinfo/gnunet-developers

Re: gnunet-search: fflush after printing each search result

by Christian Grothoff-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Done. -Chrisitan

On Saturday 14 February 2009 08:13:37 am Yunta wrote:

> Hi,
>
> I'd like to suggest this:
>
> Index: src/applications/fs/tools/gnunet-search.c
> ===================================================================
> --- src/applications/fs/tools/gnunet-search.c (revision 8235)
> +++ src/applications/fs/tools/gnunet-search.c (working copy)
> @@ -103,6 +103,7 @@
>          printf ("gnunet-download %s\n", uri);
>        printMeta (event->data.SearchResult.fi.meta);
>        printf ("\n");
> +      fflush(stdout);
>        GNUNET_free_non_null (filename);
>        GNUNET_free (uri);
>
> Change is small and probably won't break anything.
> It is very helpful when piping gnunet-search results to another process
> or just redirecting output to file.
>
> br,
> yunta
>
>
> _______________________________________________
> GNUnet-developers mailing list
> GNUnet-developers@...
> http://lists.gnu.org/mailman/listinfo/gnunet-developers




_______________________________________________
GNUnet-developers mailing list
GNUnet-developers@...
http://lists.gnu.org/mailman/listinfo/gnunet-developers