* import.c (import_print_stats): Print new non_imported counter

which is currently not used becuase we terminate on errors.
This commit is contained in:
Werner Koch 2002-08-21 14:59:05 +00:00
parent cda3b913db
commit c7dfa3a8d2
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2002-08-21 Werner Koch <wk@gnupg.org>
* import.c (import_print_stats): Print new non_imported counter
which is currently not used becuase we terminate on errors.
2002-08-20 David Shaw <dshaw@jabberwocky.com>
* options.skel: Document no-include-attributes for

View File

@ -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 );
}
}