X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=score.c;h=2707e6a71cef8ffb6fa36d007eac01191be414d3;hp=abccb28fe5082df36e88a5e3ba6a01888c808cb8;hb=92d50431f66fa94541927288bf2db796a4cc04f5;hpb=c2ac39f76d245816a919d94790672fb66e9a7253 diff --git a/score.c b/score.c index abccb28f..2707e6a7 100644 --- a/score.c +++ b/score.c @@ -357,26 +357,27 @@ static int score_open(__a_unused const char *dir) return osl_open_table(&score_table_desc, &score_table); } -static int score_event_handler(enum afs_events event, struct para_buffer *pb, - void *data) +/** + * Remove all entries from the score table, but keep the table open. + * + * \return Standard. + */ +int clear_score_table(void) { - int ret; + score_close(); + return score_open(NULL); +} - switch(event) { - case ATTRIBUTE_ADD: - case ATTRIBUTE_REMOVE: - case ATTRIBUTE_RENAME: { - score_close(); - return score_open(NULL); - } - default: return 1; - } +static int score_event_handler(__a_unused enum afs_events event, + __a_unused struct para_buffer *pb, __a_unused void *data) +{ + return 1; } /** * Initialize the scoring subsystem. * - * \param t The members of \t are filled in by the function. + * \param t The members of \a t are filled in by the function. */ void score_init(struct afs_table *t) {