X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/62078c1601192c2594b954a122ac44a0c319c9bd..87fbdd69b1885c6588ec924e37b734f2c3c5ed35:/add.c?ds=inline diff --git a/add.c b/add.c index 80afadd..b0a7fd2 100644 --- a/add.c +++ b/add.c @@ -16,8 +16,11 @@ #include "getcgi.h" #include "keydb.h" #include "keystructs.h" -#include "parsekey.h" +#include "mem.h" #include "merge.h" +#include "onak-conf.h" +#include "parsekey.h" +#include "sendsync.h" int main(int argc, char *argv[]) { @@ -55,10 +58,17 @@ int main(int argc, char *argv[]) &packets); if (packets != NULL) { parse_keys(packets, &keys); + readconfig(); initdb(); printf("Got %d new keys.\n", update_keys(&keys, false)); + if (keys != NULL) { + sendkeysync(keys); + free_publickey(keys); + keys = NULL; + } cleanupdb(); + cleanupconfig(); } else { puts("No OpenPGP packets found in input."); }