diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2011-03-31 14:52:30 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2011-04-06 16:46:24 +0200 |
commit | 8b670652df82d9f7a83dce4daa939285994100f5 (patch) | |
tree | 65357820d0fcdc1e8cbc34e7151d7a69765d7b14 /src/cli/report.c | |
parent | d9cbcb746e30440668ddab1265d4631927b99eea (diff) | |
download | abrt-8b670652df82d9f7a83dce4daa939285994100f5.tar.gz abrt-8b670652df82d9f7a83dce4daa939285994100f5.tar.xz abrt-8b670652df82d9f7a83dce4daa939285994100f5.zip |
cli: show screen_name when abrt asks for reporters
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'src/cli/report.c')
-rw-r--r-- | src/cli/report.c | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/src/cli/report.c b/src/cli/report.c index 3d1ce5b8..9374a3f7 100644 --- a/src/cli/report.c +++ b/src/cli/report.c @@ -750,36 +750,42 @@ int report(const char *dump_dir_name, int flags) for (GList *li = report_events; li; li = li->next) { char *reporter_name = (char *) li->data; + event_config_t *config = get_event_config(reporter_name); char question[255]; - snprintf(question, sizeof(question), _("Report using %s?"), reporter_name); + char *show_reporter_name; + if (config) + show_reporter_name = (config->screen_name) ? config->screen_name : reporter_name; + else + show_reporter_name = reporter_name; + + snprintf(question, sizeof(question), _("Report using %s?"), show_reporter_name); + + if (!config) + VERB1 log("No configuration file found for '%s' reporter", reporter_name); + if (!ask_yesno(question)) { puts(_("Skipping...")); continue; } -//TODO: rethink how we associate report events with configs - event_config_t *config = get_event_config(reporter_name); - if (config) + /* TODO: npajkovs; not implemented yet */ + //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired"); + //if (rating_required + // && string_to_bool(rating_required) == true + if (rating < 3) { - /* TODO: npajkovs; not implemented yet */ - //const char *rating_required = get_map_string_item_or_NULL(single_plugin_settings, "RatingRequired"); - //if (rating_required - // && string_to_bool(rating_required) == true - if (rating < 3) - { - puts(_("Reporting disabled because the backtrace is unusable")); - - const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE); - if (package && package[0]) - printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package); - - plugins++; - errors++; - continue; - } - ask_for_missing_settings(reporter_name); + puts(_("Reporting disabled because the backtrace is unusable")); + + const char *package = get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE); + if (package && package[0]) + printf(_("Please try to install debuginfo manually using the command: \"debuginfo-install %s\" and try again\n"), package); + + plugins++; + errors++; + continue; } + ask_for_missing_settings(reporter_name); /* * to avoid creating list with one item, we probably should |