X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=mood.c;h=1dc401c9d37478d4dd47c440c664c203b096cd3e;hb=d22871a6956d0ca4a7afb71b1f85d86ede25e572;hp=8d257e0cd9768b4b3fb6000cf76f6e7edb2039ab;hpb=f7fb539505316b2cd8c5e57b6529d43b936208fb;p=paraslash.git diff --git a/mood.c b/mood.c index 8d257e0c..1dc401c9 100644 --- a/mood.c +++ b/mood.c @@ -261,7 +261,7 @@ static int add_item_score(const struct osl_row *row, struct mood_item *item, lon return 1; } -static int compute_mood_score(const struct osl_row *row, long *result) +static int compute_mood_score(const struct osl_row *aft_row, long *result) { struct mood_item *item; int match = 0; @@ -271,16 +271,16 @@ static int compute_mood_score(const struct osl_row *row, long *result) return -E_NO_MOOD; /* reject audio file if it matches any entry in the deny list */ list_for_each_entry(item, ¤t_mood->deny_list, mood_item_node) - if (add_item_score(row, item, &score, &score_arg_sum) > 0) + if (add_item_score(aft_row, item, &score, &score_arg_sum) > 0) return -E_NOT_ADMISSIBLE; list_for_each_entry(item, ¤t_mood->accept_list, mood_item_node) - if (add_item_score(row, item, &score, &score_arg_sum) > 0) + if (add_item_score(aft_row, item, &score, &score_arg_sum) > 0) match = 1; /* reject if there is no matching entry in the accept list */ if (!match && !list_empty(¤t_mood->accept_list)) return -E_NOT_ADMISSIBLE; list_for_each_entry(item, ¤t_mood->score_list, mood_item_node) - add_item_score(row, item, &score, &score_arg_sum); + add_item_score(aft_row, item, &score, &score_arg_sum); if (score_arg_sum) score /= score_arg_sum; *result = score;