aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-08-21 14:59:05 +0000
committerWerner Koch <[email protected]>2002-08-21 14:59:05 +0000
commitc7dfa3a8d2e05be53580731fcdf1e1f3e1675c6e (patch)
treef05faf243087ed4734b8d28a961e68fe11cf2ae4 /g10/import.c
parent* query.c (agent_askpin): Hack to show the right default prompt. (diff)
downloadgnupg-c7dfa3a8d2e05be53580731fcdf1e1f3e1675c6e.tar.gz
gnupg-c7dfa3a8d2e05be53580731fcdf1e1f3e1675c6e.zip
* import.c (import_print_stats): Print new non_imported counter
which is currently not used becuase we terminate on errors.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/g10/import.c b/g10/import.c
index 6d524b4da..76f2ddb44 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -52,6 +52,7 @@ struct stats_s {
ulong secret_imported;
ulong secret_dups;
ulong skipped_new_keys;
+ ulong not_imported;
};
@@ -258,6 +259,8 @@ import( IOBUF inp, int fast, const char* fname,
keyblock->pkt->pkttype );
}
release_kbnode(keyblock);
+ /* fixme: we should increment the not imported counter but this
+ does only make sense if we keep on going despite of errors. */
if( rc )
break;
if( !(++stats->count % 100) && !opt.quiet )
@@ -306,11 +309,13 @@ import_print_stats (void *hd)
log_info(_(" secret keys imported: %lu\n"), stats->secret_imported );
if( stats->secret_dups )
log_info(_(" secret keys unchanged: %lu\n"), stats->secret_dups );
+ if( stats->not_imported )
+ log_info(_(" not imported: %lu\n"), stats->not_imported );
}
if( is_status_enabled() ) {
- char buf[13*20];
- sprintf(buf, "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
+ char buf[14*20];
+ sprintf(buf, "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
stats->count,
stats->no_user_id,
stats->imported,
@@ -323,7 +328,8 @@ import_print_stats (void *hd)
stats->secret_read,
stats->secret_imported,
stats->secret_dups,
- stats->skipped_new_keys );
+ stats->skipped_new_keys,
+ stats->not_imported );
write_status_text( STATUS_IMPORT_RES, buf );
}
}