mood: Clear the score table on attribute changes.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 20 Jun 2015 18:26:33 +0000 (20:26 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 25 Jul 2015 11:57:36 +0000 (13:57 +0200)
commit1565acea5e9fe7413831c3a49032f35f721de608
tree5e5f92bdfd43412dc9bf1b24ceb0759cbaa875a8
parent70f1568da2eeefdc0b01c3e9806da348b350a6b1
mood: Clear the score table on attribute changes.

Although the comment in mood.c correctly states that the score table
must be cleared and reloaded if an attribute is added, removed or
renamed, the mood event handler misses to clear the score table.
Therefore, after reload_current_mood() has reloaded the mood object,
insertion of admissible files fails with

afs_event: table moods, event 0: key already exists in rbtree

This results in an unmodified set of admissible files.

The only other caller of reload_current_mood() clears the score table
right before the function call, so the easiest fix is to move the
call to clear_score_table() into reload_current_mood().
mood.c