From 38a0e2f132853f6ded18b9cb3c787b7e0a0206e8 Mon Sep 17 00:00:00 2001 From: Karel Klic Date: Mon, 31 Jan 2011 17:06:43 +0100 Subject: Rating 0 (worst) for backtrace on which the parser fails. --- src/plugins/abrt-action-generate-backtrace.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/abrt-action-generate-backtrace.c b/src/plugins/abrt-action-generate-backtrace.c index 05f878e2..0c4d4165 100644 --- a/src/plugins/abrt-action-generate-backtrace.c +++ b/src/plugins/abrt-action-generate-backtrace.c @@ -318,10 +318,9 @@ int main(int argc, char **argv) { VERB1 log(_("Backtrace parsing failed for %s"), dump_dir_name); VERB1 log("%d:%d: %s", location.line, location.column, location.message); - /* If the parser failed compute the UUID from the executable - and package only. This is not supposed to happen often. - Do not store the rating, as we do not know how good the - backtrace is. */ + /* If the parser failed, compute the UUID from the executable + * and package only. This is not supposed to happen often. + */ struct strbuf *emptybt = strbuf_new(); strbuf_prepend_str(emptybt, executable); strbuf_prepend_str(emptybt, package); @@ -329,6 +328,13 @@ int main(int argc, char **argv) create_hash(hash_str, emptybt->buf); dd_save_text(dd, FILENAME_DUPHASH, hash_str); + /* Other parts of ABRT assume that if no rating is available, + * it is ok to allow reporting of the bug. To be sure no bad + * backtrace is reported, rate the backtrace with the lowest + * rating. + */ + dd_save_text(dd, FILENAME_RATING, "0"); + strbuf_free(emptybt); free(backtrace_str); free(package); -- cgit