summaryrefslogtreecommitdiffstats
path: root/src/cli/cli.c
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2011-04-01 15:51:55 +0200
committerMiroslav Lichvar <mlichvar@redhat.com>2011-04-04 15:11:21 +0200
commit1276dd0bf10d089b89571900a27a9ff7a8187f16 (patch)
treefd3b7946c08a4947259a838b82a3a320dd79bf22 /src/cli/cli.c
parent2ee0754ffb52a8bb65cb718189536b715e56f8d3 (diff)
downloadabrt-1276dd0bf10d089b89571900a27a9ff7a8187f16.zip
abrt-1276dd0bf10d089b89571900a27a9ff7a8187f16.tar.gz
abrt-1276dd0bf10d089b89571900a27a9ff7a8187f16.tar.xz
abrt-cli: analyze on info command only when backtrace was requested
Diffstat (limited to 'src/cli/cli.c')
-rw-r--r--src/cli/cli.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 8cace59..1de0e54 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -413,16 +413,17 @@ int main(int argc, char** argv)
}
case OPT_INFO:
{
- /* Load crash_data from (possibly updated by analyze) dump dir */
+ /* Load crash_data from dump dir */
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
return -1;
char *analyze_events_as_lines = list_possible_events(dd, NULL, "analyze");
- dd_close(dd);
- if (analyze_events_as_lines && *analyze_events_as_lines)
+ if (backtrace && analyze_events_as_lines && *analyze_events_as_lines)
{
+ dd_close(dd);
+
GList *list_analyze_events = str_to_glist(analyze_events_as_lines, '\n');
free(analyze_events_as_lines);
@@ -434,12 +435,13 @@ int main(int argc, char** argv)
if (analyzer_result != 0)
return 1;
- }
- /* Load crash_data from (possibly updated by analyze) dump dir */
- dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
- if (!dd)
- return -1;
+ /* Reload crash_data from (possibly updated by analyze) dump dir */
+ dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
+ if (!dd)
+ return -1;
+ } else
+ free(analyze_events_as_lines);
crash_data_t *crash_data = create_crash_data_from_dump_dir(dd);
dd_close(dd);