diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-03-18 13:35:40 +0100 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-03-18 13:35:40 +0100 |
| commit | 95a2b74dc9a4b9de18b8e7e9c28c644bba876778 (patch) | |
| tree | 52f45b6467ec81d89da25571e31e48a9797c57c2 /src/cli | |
| parent | cf9dc0c650065cd5cfc55394d9ee68c9d589e15a (diff) | |
Replace FILENAME_MESSAGE with FILENAME_REPORTED_TO.
This fixes the problem with abrt-cli not showing unreported bugs
and abrt-gui not showing "green lamp" for reported bugs.
In general, it introduces a way to record reporting results,
such as Bugzilla URL, in dump dir.
In the future, this enables such functions as "check BZ status".
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/cli')
| -rw-r--r-- | src/cli/cli.c | 4 | ||||
| -rw-r--r-- | src/cli/report.cpp | 17 |
2 files changed, 2 insertions, 19 deletions
diff --git a/src/cli/cli.c b/src/cli/cli.c index 49c08279..7a89ef30 100644 --- a/src/cli/cli.c +++ b/src/cli/cli.c @@ -121,8 +121,8 @@ static void print_crash_list(vector_of_crash_data_t *crash_list, bool include_re crash_data_t *crash = get_crash_data(crash_list, i); if (!include_reported) { - const char *msg = get_crash_item_content_or_NULL(crash, FILENAME_MESSAGE); - if (!msg || !msg[0]) + const char *msg = get_crash_item_content_or_NULL(crash, FILENAME_REPORTED_TO); + if (!msg) continue; } diff --git a/src/cli/report.cpp b/src/cli/report.cpp index 05f0b113..4391bfbc 100644 --- a/src/cli/report.cpp +++ b/src/cli/report.cpp @@ -508,8 +508,6 @@ static int run_events(const char *dump_dir_name, GList *env_list = NULL; // Run events - bool at_least_one_reporter_succeeded = false; - std::string message; struct logging_state l_state; l_state.last_line = NULL; struct run_event_state *run_state = new_run_event_state(); @@ -530,11 +528,7 @@ static int run_events(const char *dump_dir_name, } if (r == 0) { - at_least_one_reporter_succeeded = true; printf("%s: %s\n", event.c_str(), (l_state.last_line ? : "Reporting succeeded")); - if (message != "") - message += ";"; - message += (l_state.last_line ? : "Reporting succeeded"); } else { @@ -553,17 +547,6 @@ static int run_events(const char *dump_dir_name, } free_run_event_state(run_state); - // Save reporting results - if (at_least_one_reporter_succeeded) - { - struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0); - if (dd) - { - dd_save_text(dd, FILENAME_MESSAGE, message.c_str()); - dd_close(dd); - } - } - return error_cnt; } |
