[PATCH] agent, gpg: Forward progress output for --gen-key

Werner Koch wk at gnupg.org
Sun Nov 1 15:40:18 CET 2015


Hi!

Thanks for the patch.  Some comments:

On Sun,  1 Nov 2015 02:53, ueno at gnu.org said:

> +  if ( printchar == '\n' )
> +    snprintf (buf, sizeof buf -1, "%.20s X 100 100", what );
> +  else
> +    snprintf (buf, sizeof buf -1, "%.20s %c %d %d",
> +              what, printchar=='\n'?'X':printchar, current, total );
                       ^^^^^^^^^^^^^^^
This test will always be false - see above.  Can you please send a
revised patch?

> +  gcry_set_progress_handler (progress_cb, ctrl);

This changes a global variable in libgcrypt - should be set only once.

> +static gpg_error_t
> +agent_genkey_status_cb (void *opaque, const char *line)

Minor thing: I would prefer to have this named without the "agent_"
prefix.  I know that it is a little bit annoying if you have several
functions with the same name and gtags-mode presents an extra selection
screen. OTOH, "agent_" may indicate a global function.

Also please add a
GnuPG-bug-id: 1415
line to your commit message and add you explanations.


Salam-Shalom,

   Werner


-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-devel mailing list