X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=add.c;h=f65203c3a06b906486686e8c131f8a2f093aeade;hb=556f51f104fbbb5bd0d51b61a18d7e5af2759079;hp=80afaddf5ba352615af93f22f7978e54d77214ac;hpb=62078c1601192c2594b954a122ac44a0c319c9bd;p=onak.git diff --git a/add.c b/add.c index 80afadd..f65203c 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,9 +58,15 @@ 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(); } else { puts("No OpenPGP packets found in input.");