From: Andre Noll Date: Fri, 4 Sep 2015 07:24:12 +0000 (+0200) Subject: rmblob: Generate proper BLOB_REMOVE_EVENT. X-Git-Tag: v0.5.5~5^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=05e3b9416f4d08b49c3a18dce78e2e9235f94e7c 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). --- 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)