]> git.ipfire.org Git - pakfire.git/commitdiff
cli: upload: list: Connect to the build service
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2023 09:44:25 +0000 (09:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2023 09:44:25 +0000 (09:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/cli/lib/upload_list.c

index ffb3b22f00b3c2b1569f54c28f3332f2e0116662..cfcd9753e7e84054085a6023769bf983a673fb77 100644 (file)
@@ -18,6 +18,7 @@
 #                                                                             #
 #############################################################################*/
 
+#include <pakfire/buildservice.h>
 #include <pakfire/ctx.h>
 
 #include "command.h"
 static const char* doc = "Lists all uploads";
 
 int cli_upload_list(void* data, int argc, char* argv[]) {
-       struct pakfire_ctx* ctx = data;
+       struct pakfire_buildservice* service = NULL;
        int r;
 
+       struct pakfire_ctx* ctx = data;
+
        // Parse the command line
        r = cli_parse(NULL, NULL, NULL, doc, NULL, argc, argv, NULL);
        if (r)
                goto ERROR;
 
+       // Connect to the build service
+       r = pakfire_buildservice_create(&service, ctx);
+       if (r)
+               goto ERROR;
+
        // XXX TODO
 
 ERROR:
+       if (service)
+               pakfire_buildservice_unref(service);
+
        return r;
 }