]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - add.c
cscvs to tla changeset 55
[onak.git] / add.c
diff --git a/add.c b/add.c
index bb12e059beb861d69afde4beea10ee4a65b3b715..b0a7fd227c90f1853612aa08cb1b0d4a3c8d0fb5 100644 (file)
--- a/add.c
+++ b/add.c
 #include "getcgi.h"
 #include "keydb.h"
 #include "keystructs.h"
 #include "getcgi.h"
 #include "keydb.h"
 #include "keystructs.h"
+#include "mem.h"
+#include "merge.h"
 #include "onak-conf.h"
 #include "parsekey.h"
 #include "onak-conf.h"
 #include "parsekey.h"
-#include "merge.h"
+#include "sendsync.h"
 
 int main(int argc, char *argv[])
 {
 
 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));
                        initdb();
                        printf("Got %d new keys.\n",
                                        update_keys(&keys, false));
+                       if (keys != NULL) {
+                               sendkeysync(keys);
+                               free_publickey(keys);
+                               keys = NULL;
+                       }
                        cleanupdb();
                        cleanupdb();
+                       cleanupconfig();
                } else {
                        puts("No OpenPGP packets found in input.");
                }
                } else {
                        puts("No OpenPGP packets found in input.");
                }