From 5e2f4e9902c5ae15bd55da99a28b1de61a6f4293 Mon Sep 17 00:00:00 2001 From: default Date: Thu, 4 Jan 2024 16:27:07 +0100 Subject: [PATCH] dequeue() unlinks the file, even if it's been unable to parse it. --- activitypub.c | 4 +--- data.c | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/activitypub.c b/activitypub.c index 1b98829..b658fbc 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1982,10 +1982,8 @@ int process_user_queue(snac *snac) while (xs_list_iter(&p, &fn)) { xs *q_item = dequeue(fn); - if (q_item == NULL) { - snac_log(snac, xs_fmt("process_user_queue q_item error")); + if (q_item == NULL) continue; - } process_user_queue_item(snac, q_item); cnt++; diff --git a/data.c b/data.c index a694ded..ecddfc3 100644 --- a/data.c +++ b/data.c @@ -2399,8 +2399,7 @@ xs_dict *dequeue(const char *fn) { xs_dict *obj = queue_get(fn); - if (obj != NULL) - unlink(fn); + unlink(fn); return obj; }