summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/CrashWatcher.cpp34
-rw-r--r--src/Daemon/CrashWatcher.h4
-rw-r--r--src/Daemon/Makefile.am12
-rw-r--r--src/Daemon/dbus-abrt.conf (renamed from src/Daemon/dbus-crash-catcher.conf)0
-rw-r--r--src/Gui/CCMainWindow.py2
-rw-r--r--src/Gui/CCReporterDialog.py2
-rw-r--r--src/Gui/Makefile.am4
-rw-r--r--src/Gui/abrt-gui4
-rw-r--r--src/Gui/abrt.desktop (renamed from src/Gui/crash-catcher.desktop)6
-rw-r--r--src/Gui/cc-gui4
10 files changed, 44 insertions, 28 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 5eb77059..114400c0 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -69,10 +69,17 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
std::string sName = name;
CCrashWatcher *cc = (CCrashWatcher*)daemon;
crash_info_t crashinfo;
- if(cc->m_pMW->SaveDebugDump(std::string(DEBUG_DUMPS_DIR) + "/" + name, crashinfo))
+ try
{
- /* send message to dbus */
- cc->Crash(crashinfo.m_sPackage);
+ if(cc->m_pMW->SaveDebugDump(std::string(DEBUG_DUMPS_DIR) + "/" + name, crashinfo))
+ {
+ /* send message to dbus */
+ cc->Crash(crashinfo.m_sPackage);
+ }
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
}
}
#ifdef DEBUG
@@ -93,8 +100,8 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath,DBus::Connection &connecti
int watch = 0;
m_sTarget = pPath;
// middleware object
- m_pMW = new CMiddleWare(PLUGINS_CONF_DIR,PLUGINS_LIB_DIR, std::string(CONF_DIR) + "/crash-catcher.conf");
- m_nMainloop = g_main_loop_new(NULL,FALSE);
+ m_pMW = new CMiddleWare(PLUGINS_CONF_DIR,PLUGINS_LIB_DIR, std::string(CONF_DIR) + "/abrt.conf");
+ m_pMainloop = g_main_loop_new(NULL,FALSE);
connection.request_name(CC_DBUS_NAME);
if((m_nFd = inotify_init()) == -1){
throw std::string("Init Failed");
@@ -105,13 +112,15 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath,DBus::Connection &connecti
throw std::string("Add watch failed:") + pPath.c_str();
}
- m_nGio = g_io_channel_unix_new(m_nFd);
+ m_pGio = g_io_channel_unix_new(m_nFd);
}
CCrashWatcher::~CCrashWatcher()
{
//delete dispatcher, connection, etc..
delete m_pMW;
+ g_io_channel_unref(m_pGio);
+ g_main_loop_unref(m_pMainloop);
}
dbus_vector_crash_infos_t CCrashWatcher::GetCrashInfos(const std::string &pUID)
@@ -130,7 +139,14 @@ dbus_vector_map_crash_infos_t CCrashWatcher::GetCrashInfosMap(const std::string
dbus_vector_map_crash_infos_t retval;
vector_crash_infos_t crash_info;
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
- crash_info = m_pMW->GetCrashInfos(to_string(unix_uid));
+ try
+ {
+ crash_info = m_pMW->GetCrashInfos(to_string(unix_uid));
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
+ }
for (vector_crash_infos_t::iterator it = crash_info.begin(); it!=crash_info.end(); ++it) {
retval.push_back(it->GetMap());
}
@@ -237,9 +253,9 @@ void CCrashWatcher::StartWatch()
/* daemon loop with glib */
void CCrashWatcher::GStartWatch()
{
- g_io_add_watch (m_nGio, G_IO_IN, handle_event_cb, this);
+ g_io_add_watch (m_pGio, G_IO_IN, handle_event_cb, this);
//enter the event loop
- g_main_run (m_nMainloop);
+ g_main_run (m_pMainloop);
}
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index dfe716fb..b1d0d39a 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -44,8 +44,8 @@ class CCrashWatcher
void Lock();
int m_nFd;
- GIOChannel* m_nGio;
- GMainLoop *m_nMainloop;
+ GIOChannel* m_pGio;
+ GMainLoop *m_pMainloop;
std::string m_sTarget;
CMiddleWare *m_pMW;
DBus::Connection *m_pConn;
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 8a88fbc0..d36828b3 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -1,13 +1,13 @@
-sbin_PROGRAMS = crash-catcher
-crash_catcher_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
+sbin_PROGRAMS = abrt
+abrt_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
DBusCommon.h
-crash_catcher_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\
+abrt_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\
-I../../lib/DBus \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(DBUS_GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\"
-crash_catcher_LDADD = ../../lib/MiddleWare/libMiddleWare.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS)
+abrt_LDADD = ../../lib/MiddleWare/libMiddleWare.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS)
-dbuscrashcatcherconfdir = ${sysconfdir}/dbus-1/system.d/
-dist_dbuscrashcatcherconf_DATA = dbus-crash-catcher.conf
+dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
+dist_dbusabrtconf_DATA = dbus-abrt.conf
diff --git a/src/Daemon/dbus-crash-catcher.conf b/src/Daemon/dbus-abrt.conf
index 75c9a6d0..75c9a6d0 100644
--- a/src/Daemon/dbus-crash-catcher.conf
+++ b/src/Daemon/dbus-abrt.conf
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index b622b9d0..0aad71f9 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -29,7 +29,7 @@ class MainWindow():
sys.exit()
#Set the Glade file
# FIXME add to PATH
- self.gladefile = "/usr/share/crash-catcher/ccgui.glade"
+ self.gladefile = "/usr/share/abrt/ccgui.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index cd55daf8..cfe11c1f 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -13,7 +13,7 @@ class ReporterDialog():
self.report = report
#Set the Glade file
# FIXME add to path
- self.gladefile = "/usr/share/crash-catcher/report.glade"
+ self.gladefile = "/usr/share/abrt/report.glade"
self.wTree = gtk.glade.XML(self.gladefile)
#Get the Main Window, and connect the "destroy" event
self.window = self.wTree.get_widget("reporter_dialog")
diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am
index 4162dcfc..21a4423e 100644
--- a/src/Gui/Makefile.am
+++ b/src/Gui/Makefile.am
@@ -1,12 +1,12 @@
#SUBDIRS=gui tui plugins tests conf
-bin_SCRIPTS = cc-gui
+bin_SCRIPTS = abrt-gui
PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py ccgui.glade report.glade CCReporterDialog.py CCReport.py CCMainWindow.py exception.py
GLADE_FILES = ccgui.glade report.glade
-EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) cc-gui crash-catcher.desktop
+EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui abrt.desktop
#ccguidir = $(pkgdatadir)
pkgdata_PYTHON = $(PYTHON_FILES)
diff --git a/src/Gui/abrt-gui b/src/Gui/abrt-gui
new file mode 100644
index 00000000..dd0897c0
--- /dev/null
+++ b/src/Gui/abrt-gui
@@ -0,0 +1,4 @@
+#! /bin/sh
+export PYTHONPATH=/usr/share/abrt
+export XLOGNAME=$LOGNAME
+exec /usr/bin/python /usr/share/abrt/CCMainWindow.py "$@"
diff --git a/src/Gui/crash-catcher.desktop b/src/Gui/abrt.desktop
index 37db7ae8..bf3df449 100644
--- a/src/Gui/crash-catcher.desktop
+++ b/src/Gui/abrt.desktop
@@ -1,9 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
-Name=CrashCatcher
-Comment=Gui for crash-catcher
-Exec=cc-gui
+Name=Automatic Bug Reporting Tool
+Comment=Gui for abrt
+Exec=abrt-gui
Icon=
Terminal=false
Type=Application
diff --git a/src/Gui/cc-gui b/src/Gui/cc-gui
deleted file mode 100644
index cd6339f4..00000000
--- a/src/Gui/cc-gui
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-export PYTHONPATH=/usr/share/crash-catcher
-export XLOGNAME=$LOGNAME
-exec /usr/bin/python /usr/share/crash-catcher/CCMainWindow.py "$@"