X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/1e609737b4c0e0b191f80e7a152cae36c4afaa09..a534b3b856a1e3cbfe60bc0bca432e802f9718be:/onak.c diff --git a/onak.c b/onak.c index 30f7710..e6b9287 100644 --- a/onak.c +++ b/onak.c @@ -74,7 +74,7 @@ void dump_func(void *ctx, struct openpgp_publickey *key) state = (struct dump_ctx *) ctx; - if (state->fd == -1 || state->count > state->maxcount) { + if (state->fd == -1 || state->count++ > state->maxcount) { if (state->fd != -1) { close(state->fd); state->fd = -1; @@ -161,7 +161,7 @@ int main(int argc, char *argv[]) } else if (!strcmp("dump", argv[optind])) { config.dbbackend->initdb(true); dumpstate.count = dumpstate.filenum = 0; - dumpstate.maxcount = 1000000; + dumpstate.maxcount = 100000; dumpstate.fd = -1; dumpstate.filebase = "keydump.%d.pgp"; config.dbbackend->iterate_keys(dump_func, &dumpstate);