X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=score.c;h=51ec1e4a69a92e43d5af8274b1b769b3ce8f9181;hp=7d3b024690d432ee9d4fb9b77a0388fabee90e6b;hb=d38eb22bbb5e89d70872a6ed07766f937af3ee47;hpb=57a4bfc75970e01a1e95f0807f090c70945e9f1b diff --git a/score.c b/score.c index 7d3b0246..51ec1e4a 100644 --- a/score.c +++ b/score.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Andre Noll + * Copyright (C) 2007-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -143,7 +143,7 @@ int score_add(const struct osl_row *aft_row, long score) // PARA_DEBUG_LOG("adding %p\n", *(void **) (score_objs[SCORECOL_AFT_ROW].data)); ret = osl_add_row(score_table, score_objs); if (ret < 0) { - PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret)); + PARA_ERROR_LOG("%s\n", para_strerror(-ret)); free(score_objs[SCORECOL_SCORE].data); } return ret; @@ -182,6 +182,8 @@ int score_update(const struct osl_row *aft_row, long percent) .size = sizeof(aft_row)}; int ret = osl_get_row(score_table, SCORECOL_AFT_ROW, &obj, &row); + if (ret == -E_RB_KEY_NOT_FOUND) /* not an error */ + return 1; if (ret < 0) return ret; ret = get_num_admissible_files(&n);