diff options
| author | Werner Koch <[email protected]> | 2015-11-12 15:02:35 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2015-11-12 15:44:00 +0000 |
| commit | e3c48335f9c5081c6080bceafa7a04140403427a (patch) | |
| tree | ea08f4cb8b9c3139f7de57d47825ab257f69da90 /g10/gpg.c | |
| parent | dirmngr: Do not block during ADNS calls. (diff) | |
| download | gnupg-e3c48335f9c5081c6080bceafa7a04140403427a.tar.gz gnupg-e3c48335f9c5081c6080bceafa7a04140403427a.zip | |
gpg: Print export statistics to the status-fd.
* common/status.h (STATUS_EXPORT_RES): New.
* g10/main.h (export_stats_t): New.
* g10/export.c (export_stats_s): New.
(export_new_stats, export_release_stats): New.
(export_print_stats): New.
(export_pubkeys, export_seckeys, export_secsubkeys)
(export_pubkey_buffer, do_export): Add arg "stats".
(do_export_stream): Add arg stats and update it.
* g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create,
pass, and print a stats object to the export function calls.
* g10/export.c (export_pubkeys_stream): Remove unused function.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/gpg.c')
| -rw-r--r-- | g10/gpg.c | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -4306,7 +4306,12 @@ main (int argc, char **argv) else if( cmd == aRecvKeys ) rc = keyserver_import (ctrl, sl ); else - rc = export_pubkeys (ctrl, sl, opt.export_options); + { + export_stats_t stats = export_new_stats (); + rc = export_pubkeys (ctrl, sl, opt.export_options, stats); + export_print_stats (stats); + export_release_stats (stats); + } if(rc) { if(cmd==aSendKeys) @@ -4372,7 +4377,12 @@ main (int argc, char **argv) sl = NULL; for( ; argc; argc--, argv++ ) add_to_strlist2( &sl, *argv, utf8_strings ); - export_seckeys (ctrl, sl); + { + export_stats_t stats = export_new_stats (); + export_seckeys (ctrl, sl, stats); + export_print_stats (stats); + export_release_stats (stats); + } free_strlist(sl); break; @@ -4380,7 +4390,12 @@ main (int argc, char **argv) sl = NULL; for( ; argc; argc--, argv++ ) add_to_strlist2( &sl, *argv, utf8_strings ); - export_secsubkeys (ctrl, sl); + { + export_stats_t stats = export_new_stats (); + export_secsubkeys (ctrl, sl, stats); + export_print_stats (stats); + export_release_stats (stats); + } free_strlist(sl); break; |
