From f23058b3dd64a35892df4a7e2e96441d4ec0c5ca Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Wed, 7 Oct 2009 14:37:15 +0200 Subject: fixed saving/reading user config - if user changes else then the password, the keyring was duped and the next time the old one was returned, so we need to make sure that the keyring is only updated (so far by removing the old one and creating a new one) --- src/Gui/ConfBackend.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/Gui/ConfBackend.py b/src/Gui/ConfBackend.py index e0f6434..eb94b87 100644 --- a/src/Gui/ConfBackend.py +++ b/src/Gui/ConfBackend.py @@ -33,6 +33,17 @@ class ConfBackendGnomeKeyring(ConfBackend): settings_tmp["AbrtPluginInfo"] = name password = "" + item_list = [] + try: + item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, {"AbrtPluginInfo":str(name)}) + except gkey.NoMatchError, ex: + # nothing found + pass + + # delete all items containg "AbrtPluginInfo":, so we always have only 1 item per plugin + for item in item_list: + gkey.item_delete_sync(self.default_key_ring, item.item_id) + if "Password" in settings_tmp: password = settings_tmp["Password"] del settings_tmp["Password"] @@ -43,6 +54,7 @@ class ConfBackendGnomeKeyring(ConfBackend): password, True) + def load(self, name): item_list = None try: -- cgit From d4d523f17caf7176a620b90d064f2386898de552 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 7 Oct 2009 14:53:08 +0200 Subject: abrt-gui: make it safe wrt abrtd restarts Signed-off-by: Denys Vlasenko --- src/Gui/CCDBusBackend.py | 92 ++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 53 deletions(-) (limited to 'src') diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index f1ab443..dfb405e 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -61,7 +61,6 @@ class DBusManager(gobject.GObject): gobject.signal_new("update", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)) # signal emited to show gui if user try to run it again gobject.signal_new("show", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()) - # signal emited to show gui if user try to run it again gobject.signal_new("daemon-state-changed", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)) gobject.signal_new("report-done", self, gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)) @@ -70,7 +69,9 @@ class DBusManager(gobject.GObject): session.request_name(APP_NAME) iface = DBusInterface(self) - self.connect_to_daemon() + self.bus = dbus.SystemBus() + if not self.bus: + raise Exception(_("Can't connect to system dbus")) self.bus.add_signal_receiver(self.owner_changed_cb, "NameOwnerChanged", dbus_interface="org.freedesktop.DBus") # new crash notification self.bus.add_signal_receiver(self.crash_cb, "Crash", dbus_interface=CC_IFACE) @@ -81,9 +82,30 @@ class DBusManager(gobject.GObject): # watch for job-done signals self.bus.add_signal_receiver(self.jobdone_cb, "JobDone", dbus_interface=CC_IFACE) - # disconnect callback - def disconnected(self, *args): - print "disconnect" + # We use this function instead of caching and reusing of + # dbus.Interface(proxy, dbus_interface=CC_IFACE) because we want + # to restart abrtd in this scenario: + # (1) abrt-gui was run + # (2) user generated the report, then left for coffee break + # (3) abrtd exited on inactivity timeout + # (4) user returned and wants to submit the report + # for (4) to restart abrtd, we must recreate proxy and daemon + def daemon(self): + if not self.bus: + self.bus = dbus.SystemBus() + if not self.bus: + raise Exception(_("Can't connect to system dbus")) + proxy = self.bus.get_object(CC_IFACE, CC_PATH, introspect=False) + if not proxy: + raise Exception(_("Please check if abrt daemon is running")) + daemon = dbus.Interface(proxy, dbus_interface=CC_IFACE) + if not daemon: + raise Exception(_("Please check if abrt daemon is running")) + return daemon + +# # disconnect callback +# def disconnected(self, *args): +# print "disconnect" def error_handler_cb(self,error): self.emit("abrt-error",error) @@ -115,43 +137,18 @@ class DBusManager(gobject.GObject): print "Warning >>%s<<" % message self.emit("warning", message) -# Seems to be not needed at all. Not only that, it is actively harmful -# when abrtd is autostarted by dbus-daemon: connect_to_daemon() would install -# duplicate signal handlers! def owner_changed_cb(self,name, old_owner, new_owner): if name == CC_NAME: - # No need to connect at once, we can do it when we need it - # (and this "connect on demand" mode of operation is needed - # anyway if abrtd is autostarted by dbus: before we call it, - # there is no abrtd to connect to!) if new_owner: - #self.proxy = self.connect_to_daemon() self.emit("daemon-state-changed", "up") else: - #self.proxy = None self.emit("daemon-state-changed", "down") - def connect_to_daemon(self): - if not self.bus: - self.bus = dbus.SystemBus() - if not self.bus: - raise Exception(_("Can't connect to dbus")) - # Can't do this: abrtd may be autostarted by dbus-daemon - #if self.bus.name_has_owner(CC_NAME): - # self.proxy = self.bus.get_object(CC_IFACE, CC_PATH, introspect=False) - #else: - # raise Exception(_("Please check if abrt daemon is running.")) - self.proxy = self.bus.get_object(CC_IFACE, CC_PATH, introspect=False) - if self.proxy: - self.cc = dbus.Interface(self.proxy, dbus_interface=CC_IFACE) - else: - raise Exception(_("Please check if abrt daemon is running.")) - def jobdone_cb(self, dest, uuid): # TODO: check that it is indeed OUR job: # remember uuid in getReport and compare here print "Our job for UUID %s is done." % uuid - dump = self.cc.GetJobResult(uuid) + dump = self.daemon().GetJobResult(uuid) if dump: self.emit("analyze-complete", dump) else: @@ -161,31 +158,20 @@ class DBusManager(gobject.GObject): self.emit("report-done", result) def getReport(self, UUID): - try: - # let's try it async - # even if it's async it timeouts, so let's try to set the timeout to 60sec - #self.cc.CreateReport(UUID, reply_handler=self.addJob, error_handler=self.error_handler, timeout=60) - # we don't need the return value, as the job_id is sent via JobStarted signal - self.cc.CreateReport(UUID, timeout=60) - except dbus.exceptions.DBusException, e: - # One case when it fails is if abrtd exited and needs to be - # autostarted by dbus again. (This is a first stab - # at making it work in this case, I want to find a better way) - self.connect_to_daemon() - self.cc.CreateReport(UUID, timeout=60) + self.daemon().CreateReport(UUID, timeout=60) def Report(self, report, reporters_settings = None): # map < Plguin_name vec > - self.cc.Report(report, reporters_settings, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60) + self.daemon().Report(report, reporters_settings, reply_handler=self.report_done, error_handler=self.error_handler_cb, timeout=60) def DeleteDebugDump(self,UUID): - return self.cc.DeleteDebugDump(UUID) + return self.daemon().DeleteDebugDump(UUID) def getDumps(self): row_dict = None rows = [] # FIXME check the arguments - for row in self.cc.GetCrashInfos(): + for row in self.daemon().GetCrashInfos(): row_dict = {} for column in row: row_dict[column] = row[column] @@ -193,28 +179,28 @@ class DBusManager(gobject.GObject): return rows def getPluginsInfo(self): - return self.cc.GetPluginsInfo() + return self.daemon().GetPluginsInfo() def getPluginSettings(self, plugin_name): - settings = self.cc.GetPluginSettings(plugin_name) + settings = self.daemon().GetPluginSettings(plugin_name) #for i in settings.keys(): # print i return settings def registerPlugin(self, plugin_name): - return self.cc.RegisterPlugin(plugin_name) + return self.daemon().RegisterPlugin(plugin_name) def unRegisterPlugin(self, plugin_name): - return self.cc.UnRegisterPlugin(plugin_name) + return self.daemon().UnRegisterPlugin(plugin_name) def setPluginSettings(self, plugin_name, plugin_settings): - return self.cc.SetPluginSettings(plugin_name, plugin_settings) + return self.daemon().SetPluginSettings(plugin_name, plugin_settings) def getSettings(self): - return self.cc.GetSettings() + return self.daemon().GetSettings() def setSettings(self, settings): # FIXME: STUB!!!! print "setSettings stub" - retval = self.cc.SetSettings(self.cc.GetSettings()) + retval = self.daemon().SetSettings(self.daemon().GetSettings()) print ">>>", retval -- cgit From a1aadc72bb236567a5c95f3d4ab6e6a286eb3f97 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 8 Oct 2009 10:07:35 +0200 Subject: GUI: fixed report cells editing rhbz#527763 - changed cell behavior, so now it remembers the text even on "focus-out" and forgets the new text only if escape is pressed --- src/Gui/CellRenderers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Gui/CellRenderers.py b/src/Gui/CellRenderers.py index 5777a7c..0bedf7a 100644 --- a/src/Gui/CellRenderers.py +++ b/src/Gui/CellRenderers.py @@ -29,11 +29,12 @@ class MultilineCellRenderer(gtk.CellRendererText): def __init__(self): gtk.CellRendererText.__init__(self) self._in_editor_menu = False + self.old_text = "" - def _on_editor_focus_out_event(self, editor, *args): + def _on_editor_focus_out_event(self, editor, event): if self._in_editor_menu: return editor.remove_widget() - self.emit("editing-canceled") + self.emit("edited", editor.get_data("path"), editor.get_text()) def _on_editor_key_press_event(self, editor, event): if event.state & (gtk.gdk.SHIFT_MASK | gtk.gdk.CONTROL_MASK): return @@ -41,6 +42,7 @@ class MultilineCellRenderer(gtk.CellRendererText): editor.remove_widget() self.emit("edited", editor.get_data("path"), editor.get_text()) elif event.keyval == gtk.keysyms.Escape: + editor.set_text(self.old_text) editor.remove_widget() self.emit("editing-canceled") @@ -53,6 +55,7 @@ class MultilineCellRenderer(gtk.CellRendererText): def do_start_editing(self, event, widget, path, bg_area, cell_area, flags): editor = CellTextView() editor.modify_font(self.props.font_desc) + self.old_text = self.props.text editor.set_text(self.props.text) editor.set_size_request(cell_area.width, cell_area.height) editor.set_border_width(min(self.props.xpad, self.props.ypad)) -- cgit From e6f8f27e67c99cb8daa44cadcf01257d4f269108 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Thu, 8 Oct 2009 16:07:14 +0200 Subject: GUI: added option to show password in plugin settings gui - if there is an entry with visibility set to False and toggle button called the same name as entry, we make the toggle button to reveal the password in respective entry --- src/Gui/PluginSettingsUI.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/Gui/PluginSettingsUI.py b/src/Gui/PluginSettingsUI.py index ae5b64d..a26f87f 100644 --- a/src/Gui/PluginSettingsUI.py +++ b/src/Gui/PluginSettingsUI.py @@ -25,6 +25,13 @@ class PluginSettingsUI(gtk.Dialog): self.add(no_ui_label) no_ui_label.show() + #connect show_pass buttons if present + + + def on_show_pass_toggled(self, button, entry=None): + if entry: + entry.set_visibility(button.get_active()) + def hydrate(self): if self.plugin_gui: if self.pluginfo.Enabled == "yes": @@ -35,6 +42,13 @@ class PluginSettingsUI(gtk.Dialog): widget = self.plugin_gui.get_object("conf_%s" % key) if type(widget) == gtk.Entry: widget.set_text(value) + if widget.get_visibility() == False: + # if we find toggle button called the same name as entry and entry has + # visibility set to False, connect set_visible to it + # coz I guess it's toggle for revealing the password + button = self.plugin_gui.get_object("cb_%s" % key) + if type(button) == gtk.CheckButton: + button.connect("toggled", self.on_show_pass_toggled, widget) elif type(widget) == gtk.CheckButton: widget.set_active(value == "yes") elif type(widget) == gtk.ComboBox: -- cgit From b0d2f3c7f257be07bbf8af8e963335127ef43d65 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 9 Oct 2009 12:57:59 +0200 Subject: *: add "force" param to CreateReport dbus call. If !0, regenerates backtrace Signed-off-by: Denys Vlasenko --- src/Daemon/CommLayerServerDBus.cpp | 11 +++++++++-- src/Daemon/CrashWatcher.cpp | 10 ++++++---- src/Daemon/CrashWatcher.h | 4 ++-- src/Daemon/Daemon.cpp | 6 +++--- src/Daemon/MiddleWare.cpp | 14 ++++++++------ src/Daemon/MiddleWare.h | 1 + src/Gui/CCDBusBackend.py | 3 ++- 7 files changed, 31 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index 1085d80..35d2944 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -156,6 +156,13 @@ static int handle_CreateReport(DBusMessage* call, DBusMessage* reply) dbus_message_iter_init(call, &in_iter); const char* pUUID; r = load_val(&in_iter, pUUID); + if (r != ABRT_DBUS_MORE_FIELDS) + { + error_msg("dbus call %s: parameter type mismatch", __func__ + 7); + return -1; + } + int32_t force; + r = load_val(&in_iter, force); if (r != ABRT_DBUS_LAST_FIELD) { error_msg("dbus call %s: parameter type mismatch", __func__ + 7); @@ -164,7 +171,7 @@ static int handle_CreateReport(DBusMessage* call, DBusMessage* reply) const char* sender; long unix_uid = get_remote_uid(call, &sender); - if (CreateReportThread(pUUID, to_string(unix_uid).c_str(), sender) != 0) + if (CreateReportThread(pUUID, to_string(unix_uid).c_str(), force, sender) != 0) return -1; /* can't create thread (err msg is already logged) */ dbus_message_append_args(reply, @@ -189,7 +196,7 @@ static int handle_GetJobResult(DBusMessage* call, DBusMessage* reply) } long unix_uid = get_remote_uid(call); - map_crash_report_t report = GetJobResult(pUUID, to_string(unix_uid).c_str()); + map_crash_report_t report = GetJobResult(pUUID, to_string(unix_uid).c_str(), /*force:*/ 0); DBusMessageIter out_iter; dbus_message_iter_init_append(reply, &out_iter); diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 5cc9dc7..6093646 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -109,7 +109,7 @@ vector_crash_infos_t GetCrashInfos(const std::string &pUID) * CreateReport dbus call already did all the processing, and we just retrieve * the result from dump directory, which is fast. */ -map_crash_report_t GetJobResult(const char* pUUID, const char* pUID) +map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force) { map_crash_info_t crashReport; @@ -118,7 +118,7 @@ map_crash_report_t GetJobResult(const char* pUUID, const char* pUID) * g_pPluginManager->GetDatabase(g_settings_sDatabase); * which is unsafe wrt concurrent updates to g_pPluginManager state. */ - mw_result_t res = CreateCrashReport(pUUID, pUID, crashReport); + mw_result_t res = CreateCrashReport(pUUID, pUID, force, crashReport); switch (res) { case MW_OK: @@ -144,6 +144,7 @@ typedef struct thread_data_t { pthread_t thread_id; char* UUID; char* UID; + int force; char* peer; } thread_data_t; static void* create_report(void* arg) @@ -159,7 +160,7 @@ static void* create_report(void* arg) { /* "GetJobResult" is a bit of a misnomer */ log("Creating report..."); - map_crash_info_t crashReport = GetJobResult(thread_data->UUID, thread_data->UID); + map_crash_info_t crashReport = GetJobResult(thread_data->UUID, thread_data->UID, thread_data->force); g_pCommLayer->JobDone(thread_data->peer, thread_data->UUID); } catch (CABRTException& e) @@ -187,11 +188,12 @@ static void* create_report(void* arg) /* Bogus value. pthreads require us to return void* */ return NULL; } -int CreateReportThread(const char* pUUID, const char* pUID, const char* pSender) +int CreateReportThread(const char* pUUID, const char* pUID, int force, const char* pSender) { thread_data_t *thread_data = (thread_data_t *)xzalloc(sizeof(thread_data_t)); thread_data->UUID = xstrdup(pUUID); thread_data->UID = xstrdup(pUID); + thread_data->force = force; thread_data->peer = xstrdup(pSender); //TODO: do we need this? //pthread_attr_t attr; diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index 00bb4d5..d8c7c28 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -49,8 +49,8 @@ class CCrashWatcher }; vector_crash_infos_t GetCrashInfos(const std::string &pUID); -int CreateReportThread(const char* pUUID, const char* pUID, const char* pSender); -map_crash_report_t GetJobResult(const char* pUUID, const char* pUID); +int CreateReportThread(const char* pUUID, const char* pUID, int force, const char* pSender); +map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force); bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID); #endif /*CRASHWATCHER_H_*/ diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 3b66bdb..05c5f0b 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -50,7 +50,7 @@ * - GetCrashInfos(): returns a vector_crash_infos_t (vector_map_vector_string_t) * of crashes for given uid * v[N]["executable"/"uid"/"kernel"/"backtrace"][N] = "contents" - * - CreateReport(UUID): starts creating a report for /var/cache/abrt/DIR with this UUID. + * - CreateReport(UUID,force): starts creating a report for /var/cache/abrt/DIR with this UUID. * Returns job id (uint64). * Emits JobStarted(client_dbus_ID,job_id) dbus signal. * After it returns, when report creation thread has finished, @@ -82,7 +82,7 @@ * * TODO: * - API does not really need JobStarted dbus signal at all, and JobDone signal - * does not need to pass any parameters - out clients never sent multiple + * does not need to pass any parameters - out clients never send multiple * CreateReport's. */ @@ -153,7 +153,7 @@ static double GetDirSize(const std::string &pPath, std::string *worst_dir = NULL if (worst_dir && strcmp(excluded, ep->d_name) != 0) { /* Calculate "weighted" size and age - /* w = sz_kbytes * age_mins */ + * w = sz_kbytes * age_mins */ sz /= 1024; long age = (time(NULL) - stats.st_mtime) / 60; if (age > 0) diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index b05dbb6..05abc9b 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -163,15 +163,17 @@ static std::string GetGlobalUUID(const std::string& pAnalyzer, * @param pDebugDumpPath A debugdump dir containing all necessary data. */ static void CreateReport(const std::string& pAnalyzer, - const std::string& pDebugDumpDir) + const std::string& pDebugDumpDir, + int force) { CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(pAnalyzer); - analyzer->CreateReport(pDebugDumpDir); + analyzer->CreateReport(pDebugDumpDir, force); } mw_result_t CreateCrashReport(const std::string& pUUID, - const std::string& pUID, - map_crash_report_t& pCrashReport) + const std::string& pUID, + int force, + map_crash_report_t& pCrashReport) { VERB2 log("CreateCrashReport('%s','%s',result)", pUUID.c_str(), pUID.c_str()); @@ -185,7 +187,7 @@ mw_result_t CreateCrashReport(const std::string& pUUID, } if (pUUID == "" || row.m_sUUID != pUUID) { - warn_client("CreateCrashReport(): UUID '"+pUUID+"' is not in database."); + warn_client("CreateCrashReport(): UUID '"+pUUID+"' is not in database"); return MW_IN_DB_ERROR; } @@ -211,7 +213,7 @@ mw_result_t CreateCrashReport(const std::string& pUUID, dd.Close(); VERB3 log(" CreateReport('%s')", analyzer.c_str()); - CreateReport(analyzer, row.m_sDebugDumpDir); + CreateReport(analyzer, row.m_sDebugDumpDir, force); gUUID = GetGlobalUUID(analyzer, row.m_sDebugDumpDir); VERB3 log(" GetGlobalUUID:'%s'", gUUID.c_str()); diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h index bc80952..fab822f 100644 --- a/src/Daemon/MiddleWare.h +++ b/src/Daemon/MiddleWare.h @@ -65,6 +65,7 @@ void LoadOpenGPGPublicKey(const char* key); */ mw_result_t CreateCrashReport(const std::string& pUUID, const std::string& pUID, + int force, map_crash_report_t& pCrashReport); /** * Activates particular action plugin. diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index dfb405e..70db9ff 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -158,7 +158,8 @@ class DBusManager(gobject.GObject): self.emit("report-done", result) def getReport(self, UUID): - self.daemon().CreateReport(UUID, timeout=60) + # 2nd param is "force recreating of backtrace etc" + self.daemon().CreateReport(UUID, 0, timeout=60) def Report(self, report, reporters_settings = None): # map < Plguin_name vec > -- cgit From 0026fde273b378156b79df5146d1dbfb2175abd8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 9 Oct 2009 13:31:45 +0200 Subject: removed JobStarted signal; fixed a small bug in build-id scanning code Signed-off-by: Denys Vlasenko --- src/Daemon/CommLayerServer.h | 1 - src/Daemon/CommLayerServerDBus.cpp | 12 ------------ src/Daemon/CommLayerServerDBus.h | 1 - src/Daemon/CommLayerServerSocket.h | 1 - src/Daemon/CrashWatcher.cpp | 2 -- src/Daemon/Daemon.cpp | 10 +++------- 6 files changed, 3 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h index aface8a..6ede581 100644 --- a/src/Daemon/CommLayerServer.h +++ b/src/Daemon/CommLayerServer.h @@ -15,7 +15,6 @@ class CCommLayerServer { /* just stubs to be called when not implemented in specific comm layer */ virtual void Crash(const std::string& progname, const std::string& uid) {} virtual void JobDone(const char* pDest, const char* pUUID) = 0; - virtual void JobStarted(const char* pDest) {}; virtual void QuotaExceed(const char* str) {} virtual void Update(const std::string& pMessage, const char* peer, uint64_t pJobID) {}; diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index 35d2944..fc28a12 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -69,18 +69,6 @@ void CCommLayerServerDBus::QuotaExceed(const char* str) send_flush_and_unref(msg); } -void CCommLayerServerDBus::JobStarted(const char* peer) -{ - DBusMessage* msg = new_signal_msg("JobStarted", peer); - uint64_t nJobID = uint64_t(pthread_self()); - dbus_message_append_args(msg, - DBUS_TYPE_STRING, &peer, /* TODO: redundant parameter, remove from API */ - DBUS_TYPE_UINT64, &nJobID, /* TODO: redundant parameter, remove from API */ - DBUS_TYPE_INVALID); - VERB2 log("Sending signal JobStarted('%s',%llx)", peer, (unsigned long long)nJobID); - send_flush_and_unref(msg); -} - void CCommLayerServerDBus::JobDone(const char* peer, const char* pUUID) { DBusMessage* msg = new_signal_msg("JobDone", peer); diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h index 06fb15d..7b2e31d 100644 --- a/src/Daemon/CommLayerServerDBus.h +++ b/src/Daemon/CommLayerServerDBus.h @@ -12,7 +12,6 @@ class CCommLayerServerDBus /* DBus signal senders */ virtual void Crash(const std::string& progname, const std::string& uid); - virtual void JobStarted(const char* pDest); virtual void JobDone(const char* pDest, const char* pUUID); virtual void QuotaExceed(const char* str); diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h index f598841..baca195 100644 --- a/src/Daemon/CommLayerServerSocket.h +++ b/src/Daemon/CommLayerServerSocket.h @@ -31,5 +31,4 @@ class CCommLayerServerSocket : public CCommLayerServer virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender); virtual void Crash(const std::string& arg1); - virtual void JobStarted(const char* pDest) {}; }; diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 6093646..94fb9d7 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -151,8 +151,6 @@ static void* create_report(void* arg) { thread_data_t *thread_data = (thread_data_t *) arg; - g_pCommLayer->JobStarted(thread_data->peer); - /* Client name is per-thread, need to set it */ set_client_name(thread_data->peer); diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index 05c5f0b..cea0c15 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -52,8 +52,7 @@ * v[N]["executable"/"uid"/"kernel"/"backtrace"][N] = "contents" * - CreateReport(UUID,force): starts creating a report for /var/cache/abrt/DIR with this UUID. * Returns job id (uint64). - * Emits JobStarted(client_dbus_ID,job_id) dbus signal. - * After it returns, when report creation thread has finished, + * After thread returns, when report creation thread has finished, * JobDone(client_dbus_ID,UUID) dbus signal is emitted. * - GetJobResult(UUID): returns map_crash_report_t (map_vector_string_t) * - Report(map_crash_report_t (map_vector_string_t[, map_map_string_t])): @@ -71,8 +70,6 @@ * * DBus signals we emit: * - Crash(progname,uid) - a new crash occurred (new /var/cache/abrt/DIR is found) - * - JobStarted(client_dbus_ID,job_id) - see CreateReport above. - * Sent as unicast to the client which did CreateReport. * - JobDone(client_dbus_ID,UUID) - see CreateReport above. * Sent as unicast to the client which did CreateReport. * - Warning(msg,job_id) @@ -81,9 +78,8 @@ * If set_client_name(NULL) was done, they are not sent. * * TODO: - * - API does not really need JobStarted dbus signal at all, and JobDone signal - * does not need to pass any parameters - out clients never send multiple - * CreateReport's. + * - JobDone signal does not need to pass any parameters + * - our clients never send multiple CreateReport's. */ -- cgit