From 05e3b9416f4d08b49c3a18dce78e2e9235f94e7c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 4 Sep 2015 09:24:12 +0200 Subject: [PATCH] rmblob: Generate proper BLOB_REMOVE_EVENT. com_rmblob_callback() of blob.c is responsible for removing blobs from any of the four blob tables (images, lyrics, moods, playlists). After a blob has been removed, the function generates an AFS event to tell the other tables about the removal. However, the call to afs_event() passes the event identifier BLOB_RENAME rather than BLOB_REMOVE to the event handlers, which is clearly incorrect. Fortunately, this does not matter because the only event handler which cares about blob events is the one in mood.c, and this handler treats the two events identically. Nevertheless, it's is a bug that should be fixed. This bug was introduced eight years ago when event handling was introduced: commit 02d818d9 (Complete afs event handling). --- blob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blob.c b/blob.c index 2f175021..44e58a10 100644 --- a/blob.c +++ b/blob.c @@ -295,7 +295,7 @@ static void com_rmblob_callback(struct osl_table *table, int fd, ret2 = para_printf(&rmbd.pb, "no matches, nothing removed\n"); else { ret2 = para_printf(&rmbd.pb, "removed %d blobs\n", pmd.num_matches); - afs_event(BLOB_RENAME, NULL, table); + afs_event(BLOB_REMOVE, NULL, table); } out: if (ret2 >= 0 && rmbd.pb.offset) -- 2.39.2