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 aface8a3..6ede5815 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 35d2944e..fc28a122 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 06fb15df..7b2e31d7 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 f598841b..baca195d 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 60936466..94fb9d79 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 05c5f0b0..cea0c156 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