X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/42bcfe2cae29f375af4cf2cd3ccfa196b77a3946..b1cb08b256587f6c5d2c484438d942e58583ba88:/add.c?ds=inline diff --git a/add.c b/add.c index bb12e05..b0a7fd2 100644 --- a/add.c +++ b/add.c @@ -16,9 +16,11 @@ #include "getcgi.h" #include "keydb.h" #include "keystructs.h" +#include "mem.h" +#include "merge.h" #include "onak-conf.h" #include "parsekey.h" -#include "merge.h" +#include "sendsync.h" int main(int argc, char *argv[]) { @@ -60,7 +62,13 @@ int main(int argc, char *argv[]) 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."); }