#include "charfuncs.h"
#include "cleankey.h"
#include "cleanup.h"
-#include "config.h"
#include "keydb.h"
#include "keyid.h"
#include "keyindex.h"
#include "onak-conf.h"
#include "parsekey.h"
#include "photoid.h"
+#include "version.h"
void find_keys(char *search, uint64_t keyid, bool ishex,
bool fingerprint, bool exact, bool verbose)
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;
}
void usage(void) {
- puts("onak " PACKAGE_VERSION " - an OpenPGP keyserver.\n");
+ puts("onak " ONAK_VERSION " - an OpenPGP keyserver.\n");
puts("Usage:\n");
puts("\tonak [options] <command> <parameters>\n");
puts("\tCommands:\n");
} 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);