summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2011-01-31 17:06:43 +0100
committerKarel Klic <kklic@redhat.com>2011-01-31 17:06:43 +0100
commit38a0e2f132853f6ded18b9cb3c787b7e0a0206e8 (patch)
tree4f9045bcdb920cee6ddb29de2d9de28f14cf0f0d
parent5b2875bf208b974f27ad9a6a4ce74b8e699dfebe (diff)
downloadabrt-38a0e2f132853f6ded18b9cb3c787b7e0a0206e8.tar.gz
abrt-38a0e2f132853f6ded18b9cb3c787b7e0a0206e8.tar.xz
abrt-38a0e2f132853f6ded18b9cb3c787b7e0a0206e8.zip
Rating 0 (worst) for backtrace on which the parser fails.
-rw-r--r--src/plugins/abrt-action-generate-backtrace.c14
1 files changed, 10 insertions, 4 deletions
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);