return 0;
}
+static int pakfire_client_init(sd_event_source* event, void* data) {
+ struct pakfire_client* self = data;
+
+ DEBUG(self->ctx, "Initializing client...\n");
+
+ // XXX TODO
+
+ return 0;
+}
+
static void pakfire_client_free(struct pakfire_client* self) {
if (self->auth.timer)
sd_event_source_unref(self->auth.timer);
DEBUG(self->ctx, "Pakfire Build Service initialized for %s\n",
pakfire_client_get_url(self));
+ // Schedule to run the init function as soon as the event loop has started
+ r = sd_event_add_defer(self->loop, NULL, pakfire_client_init, self);
+ if (r < 0)
+ goto ERROR;
+
// Return the pointer
*client = self;