int ret;
char *mood_name = NULL;
+ ret = clear_score_table();
+ if (ret < 0)
+ return ret;
if (!current_mood)
return 1;
PARA_NOTICE_LOG("reloading %s\n", current_mood->name?
int moods_event_handler(enum afs_events event, __a_unused struct para_buffer *pb,
void *data)
{
- int ret;
-
if (!current_mood)
return 0;
switch (event) {
case BLOB_ADD:
if (data == moods_table || data == playlists_table)
return 1; /* no reload necessary for these */
- ret = clear_score_table();
- if (ret < 0)
- PARA_CRIT_LOG("clear score table returned %s\n",
- para_strerror(-ret));
return reload_current_mood();
/* these also require reload of the score table */
case ATTRIBUTE_ADD: