summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-03 18:07:45 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-03 18:07:45 +0100
commit51f279ca689ea79a873d1f80b000fd3f163b3087 (patch)
treef7ee061992c21c27ad7c82cac84b86391502d425 /src
parenta756114f9d29983d9505309efb3b6f0ed09f946f (diff)
downloadabrt-51f279ca689ea79a873d1f80b000fd3f163b3087.tar.gz
abrt-51f279ca689ea79a873d1f80b000fd3f163b3087.tar.xz
abrt-51f279ca689ea79a873d1f80b000fd3f163b3087.zip
rename CreateReport -> StartJob, GetJobResult -> CreateReport
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/CLI/dbus.cpp6
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp14
-rw-r--r--src/Daemon/CrashWatcher.cpp15
-rw-r--r--src/Daemon/CrashWatcher.h2
-rw-r--r--src/Daemon/Daemon.cpp10
-rw-r--r--src/Gui/CCDBusBackend.py4
6 files changed, 23 insertions, 28 deletions
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp
index 50ca651b..67c489e0 100644
--- a/src/CLI/dbus.cpp
+++ b/src/CLI/dbus.cpp
@@ -121,9 +121,7 @@ vector_crash_infos_t call_GetCrashInfos()
map_crash_report_t call_CreateReport(const char* uuid)
{
- /* Yes, call name is not "CreateReport" but "GetJobResult".
- * We need to clean up the names one day. */
- DBusMessage* msg = new_call_msg("GetJobResult");
+ DBusMessage* msg = new_call_msg("CreateReport");
dbus_message_append_args(msg,
DBUS_TYPE_STRING, &uuid,
DBUS_TYPE_INVALID);
@@ -135,7 +133,7 @@ map_crash_report_t call_CreateReport(const char* uuid)
dbus_message_iter_init(reply, &in_iter);
int r = load_val(&in_iter, argout);
if (r != ABRT_DBUS_LAST_FIELD) /* more values present, or bad type */
- error_msg_and_die("dbus call %s: return type mismatch", "GetJobResult");
+ error_msg_and_die("dbus call %s: return type mismatch", "CreateReport");
dbus_message_unref(reply);
return argout;
}
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index 2c2ca3a5..8f3f5044 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -145,7 +145,7 @@ static int handle_GetCrashInfos(DBusMessage* call, DBusMessage* reply)
return 0;
}
-static int handle_CreateReport(DBusMessage* call, DBusMessage* reply)
+static int handle_StartJob(DBusMessage* call, DBusMessage* reply)
{
int r;
DBusMessageIter in_iter;
@@ -178,7 +178,7 @@ static int handle_CreateReport(DBusMessage* call, DBusMessage* reply)
return 0;
}
-static int handle_GetJobResult(DBusMessage* call, DBusMessage* reply)
+static int handle_CreateReport(DBusMessage* call, DBusMessage* reply)
{
int r;
DBusMessageIter in_iter;
@@ -192,7 +192,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(), /*force:*/ 0);
+ map_crash_report_t report = CreateReport(pUUID, to_string(unix_uid).c_str(), /*force:*/ 0);
DBusMessageIter out_iter;
dbus_message_iter_init_append(reply, &out_iter);
@@ -482,14 +482,14 @@ static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg
int r = -1;
if (strcmp(member, "GetCrashInfos") == 0)
r = handle_GetCrashInfos(msg, reply);
- else if (strcmp(member, "CreateReport") == 0)
- r = handle_CreateReport(msg, reply);
+ else if (strcmp(member, "StartJob") == 0)
+ r = handle_StartJob(msg, reply);
else if (strcmp(member, "Report") == 0)
r = handle_Report(msg, reply);
else if (strcmp(member, "DeleteDebugDump") == 0)
r = handle_DeleteDebugDump(msg, reply);
- else if (strcmp(member, "GetJobResult") == 0)
- r = handle_GetJobResult(msg, reply);
+ else if (strcmp(member, "CreateReport") == 0)
+ r = handle_CreateReport(msg, reply);
else if (strcmp(member, "GetPluginsInfo") == 0)
r = handle_GetPluginsInfo(msg, reply);
else if (strcmp(member, "GetPluginSettings") == 0)
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index d9c3cb11..7f19ea32 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -99,16 +99,14 @@ vector_crash_infos_t GetCrashInfos(const char *pUID)
}
/*
- * "GetJobResult" is a bit of a misnomer.
- * It actually _creates_ a_ report_ and returns the result.
- * It is called in two cases:
- * (1) by CreateReport dbus call -> CreateReportThread(), in the thread
- * (2) by GetJobResult dbus call
+ * Called in two cases:
+ * (1) by StartJob dbus call -> CreateReportThread(), in the thread
+ * (2) by CreateReport dbus call
* In the second case, it finishes quickly, because previous
- * CreateReport dbus call already did all the processing, and we just retrieve
+ * StartJob 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, int force)
+map_crash_report_t CreateReport(const char* pUUID, const char* pUID, int force)
{
map_crash_info_t crashReport;
@@ -155,9 +153,8 @@ static void* create_report(void* arg)
try
{
- /* "GetJobResult" is a bit of a misnomer */
log("Creating report...");
- map_crash_info_t crashReport = GetJobResult(thread_data->UUID, thread_data->UID, thread_data->force);
+ map_crash_info_t crashReport = CreateReport(thread_data->UUID, thread_data->UID, thread_data->force);
g_pCommLayer->JobDone(thread_data->peer, thread_data->UUID);
}
catch (CABRTException& e)
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index 00814183..3f543e18 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -50,7 +50,7 @@ class CCrashWatcher
vector_crash_infos_t GetCrashInfos(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);
+map_crash_report_t CreateReport(const char* pUUID, const char* pUID, int force);
bool DeleteDebugDump(const char *pUUID, const char *pUID);
bool DeleteDebugDump_by_dir(const char *dump_dir);
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 4cfd0491..6f901f39 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -55,11 +55,11 @@
* - 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,force): starts creating a report for /var/cache/abrt/DIR with this UUID.
+ * - StartJob(UUID,force): starts creating a report for /var/cache/abrt/DIR with this UUID.
* Returns job id (uint64).
* 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)
+ * - CreateReport(UUID): returns map_crash_report_t (map_vector_string_t)
* - Report(map_crash_report_t (map_vector_string_t[, map_map_string_t])):
* "Please report this crash": calls Report() of all registered reporter plugins.
* Returns report_status_t (map_vector_string_t) - the status of each call.
@@ -75,8 +75,8 @@
*
* DBus signals we emit:
* - Crash(progname,uid) - a new crash occurred (new /var/cache/abrt/DIR is found)
- * - JobDone(client_dbus_ID,UUID) - see CreateReport above.
- * Sent as unicast to the client which did CreateReport.
+ * - JobDone(client_dbus_ID,UUID) - see StartJob above.
+ * Sent as unicast to the client which did StartJob.
* - Warning(msg,job_id)
* - Update(msg,job_id)
* Both are sent as unicast to last client set by set_client_name(name).
@@ -84,7 +84,7 @@
*
* TODO:
* - JobDone signal does not need to pass any parameters
- * - our clients never send multiple CreateReport's.
+ * - our clients never send multiple StartJob's.
*/
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py
index 665f17a8..85987e89 100644
--- a/src/Gui/CCDBusBackend.py
+++ b/src/Gui/CCDBusBackend.py
@@ -152,7 +152,7 @@ class DBusManager(gobject.GObject):
# 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.daemon().GetJobResult(uuid)
+ dump = self.daemon().CreateReport(uuid)
if dump:
self.emit("analyze-complete", dump)
else:
@@ -163,7 +163,7 @@ class DBusManager(gobject.GObject):
def getReport(self, UUID, force=0):
# 2nd param is "force recreating of backtrace etc"
- self.daemon().CreateReport(UUID, force, timeout=60)
+ self.daemon().StartJob(UUID, force, timeout=60)
def Report(self, report, reporters_settings = None):
# map < Plguin_name vec <status, message> >