From 2abf0fc078221715abbd20c8451d300eaf787848 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Feb 2011 18:04:43 +0100 Subject: abrt-gtk: make Delete key actually delete the dump dir Signed-off-by: Denys Vlasenko --- src/cli/CLI.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/cli/CLI.cpp') diff --git a/src/cli/CLI.cpp b/src/cli/CLI.cpp index e322e7cd..0e902b9e 100644 --- a/src/cli/CLI.cpp +++ b/src/cli/CLI.cpp @@ -21,9 +21,7 @@ #include #include "abrtlib.h" #include "abrt_dbus.h" -#include "dbus_common.h" #include "report.h" -#include "dbus.h" /** Creates a localized string from crash time. */ static char *localize_crash_time(const char *timestr) @@ -410,11 +408,6 @@ int main(int argc, char** argv) print_usage_and_die(argv[0]); } - DBusError err; - dbus_error_init(&err); - s_dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); - handle_dbus_err(s_dbus_conn == NULL, &err); - /* Do the selected operation. */ int exitcode = 0; switch (op) @@ -469,12 +462,10 @@ int main(int argc, char** argv) } dd_close(dd); } + /* Ask abrtd to do it for us */ - exitcode = call_DeleteDebugDump(dump_dir_name); - if (exitcode == ENOENT) - error_msg_and_die("Crash '%s' not found", dump_dir_name); - if (exitcode != 0) - error_msg_and_die("Can't delete debug dump '%s'", dump_dir_name); + exitcode = connect_to_abrtd_and_call_DeleteDebugDump(dump_dir_name); + break; } case OPT_INFO: -- cgit