From 4843efc642ddcfe524bb6ba37b01154e57489ff7 Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Mon, 31 May 2004 23:48:01 +0000 Subject: [PATCH] cscvs to tla changeset 103 Author: noodles Date: 2003/10/03 23:03:02 Enable logging framework in splitkeys. --- splitkeys.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/splitkeys.c b/splitkeys.c index a2daac6..6cdf0a0 100644 --- a/splitkeys.c +++ b/splitkeys.c @@ -5,7 +5,7 @@ * * Copyright 2003 Project Purple * - * $Id: splitkeys.c,v 1.1 2003/09/30 21:16:14 noodles Exp $ + * $Id: splitkeys.c,v 1.2 2003/10/03 23:03:02 noodles Exp $ */ #include @@ -16,7 +16,9 @@ #include "charfuncs.h" #include "keystructs.h" +#include "log.h" #include "mem.h" +#include "onak-conf.h" #include "parsekey.h" int main(int argc, char *argv[]) @@ -36,10 +38,13 @@ int main(int argc, char *argv[]) fprintf(stderr, "Couldn't parse %s as a number of keys!\n", argv[1]); - exit(1); + exit(EXIT_FAILURE); } } + readconfig(); + initlogthing("splitkeys", config.logfile); + do { result = read_openpgp_stream(stdin_getchar, NULL, &packets, maxkeys); @@ -65,5 +70,8 @@ int main(int argc, char *argv[]) } } while (packets != NULL); + cleanuplogthing(); + cleanupconfig(); + return 0; } -- 2.39.5