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).
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)