I don't see any glitches, tested and works fine.
Reviewed-by: jmoskovc@redhat.com
Jirka
On 06/22/2010 05:33 PM, Karel Klic wrote:
src/CLI/report.cpp | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/CLI/report.cpp b/src/CLI/report.cpp index e3ecb0e..ebaeafa 100644 --- a/src/CLI/report.cpp +++ b/src/CLI/report.cpp @@ -1,5 +1,5 @@ /*
- Copyright (C) 2009 RedHat inc.
Copyright (C) 2009, 2010 Red Hat, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
@@ -302,6 +302,19 @@ static int read_crash_report(map_crash_data_t&report, const char *text) }
/**
- Ensures that the fields needed for editor are present in the crash data.
- Fields: comments, how to reproduce.
- */
+static void create_fields_for_editor(map_crash_data_t&crash_data) +{
- if (crash_data.find(FILENAME_COMMENT) == crash_data.end())
add_to_crash_data_ext(crash_data, FILENAME_COMMENT, CD_TXT, CD_ISEDITABLE, "");
- if (crash_data.find(FILENAME_REPRODUCE) == crash_data.end())
add_to_crash_data_ext(crash_data, FILENAME_REPRODUCE, CD_TXT, CD_ISEDITABLE, "1. \n2. \n3. \n");
+}
+/**
- Runs external editor.
- Returns:
- 0 if the launch was successful
@@ -663,6 +676,7 @@ int report(const char *crash_id, int flags) /* Open text editor and give a chance to review the backtrace etc. */ if (!(flags& CLI_REPORT_BATCH)) {
- create_fields_for_editor(cr); int result = run_report_editor(cr); if (result != 0) return result;