// Uploads
static void pakfire_client_upload_free(struct pakfire_client_upload* upload) {
+ struct pakfire_client* client = upload->client;
+
+ // Remove the upload from the queue (if present)
+ if (client)
+ STAILQ_REMOVE(&client->uploads, upload, pakfire_client_upload, nodes);
+
// Close the file handle
if (upload->f)
fclose(upload->f);
return r;
}
-static void pakfire_client_upload_remove(struct pakfire_client* self, struct pakfire_client_upload* upload) {
- STAILQ_REMOVE(&self->uploads, upload, pakfire_client_upload, nodes);
-}
-
static int pakfire_client_upload_payload(struct pakfire_client_upload* upload) {
struct pakfire_client* self = upload->client;
struct pakfire_xfer* xfer = NULL;