summaryrefslogtreecommitdiffstats
path: root/src/daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-04-23 17:21:17 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-04-23 17:21:17 +0200
commit042d62126a0ca8b6b9d2fb4d417f07691be90536 (patch)
tree9e43a823767d875bb35f3deb6f60df49bbd26f33 /src/daemon
parentd3da30c4726a193101ee9c17a71c23cf32fa63ca (diff)
downloadabrt-042d62126a0ca8b6b9d2fb4d417f07691be90536.zip
abrt-042d62126a0ca8b6b9d2fb4d417f07691be90536.tar.gz
abrt-042d62126a0ca8b6b9d2fb4d417f07691be90536.tar.xz
mass replace of crash_data with problem_data
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/MiddleWare.c27
-rw-r--r--src/daemon/MiddleWare.h4
-rw-r--r--src/daemon/abrt.conf.52
-rw-r--r--src/daemon/abrtd.82
-rw-r--r--src/daemon/abrtd.c14
5 files changed, 21 insertions, 28 deletions
diff --git a/src/daemon/MiddleWare.c b/src/daemon/MiddleWare.c
index fb943b1..d6c8aa1 100644
--- a/src/daemon/MiddleWare.c
+++ b/src/daemon/MiddleWare.c
@@ -23,14 +23,7 @@
#include "CommLayerServerDBus.h"
#include "MiddleWare.h"
-/**
- * Get one crash info. If getting is successful,
- * then crash info is filled.
- * @param dump_dir_name A dump dir containing all necessary data.
- * @param pCrashData A crash info.
- * @return It return results of operation. See mw_result_t.
- */
-static crash_data_t *FillCrashInfo(const char *dump_dir_name);
+static problem_data_t *FillCrashInfo(const char *dump_dir_name);
struct logging_state {
@@ -126,7 +119,7 @@ static char *do_log(char *log_line, void *param)
return log_line;
}
-mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data)
+mw_result_t LoadDebugDump(const char *dump_dir_name, problem_data_t **problem_data)
{
mw_result_t res;
@@ -182,7 +175,7 @@ mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data)
dump_dir_name = state.crash_dump_dup_name;
}
- /* Loads crash_data (from the *first debugdump dir* if this one is a dup)
+ /* Loads problem_data (from the *first debugdump dir* if this one is a dup)
* Returns:
* MW_OCCURRED: "crash count is != 1" (iow: it is > 1 - dup)
* MW_OK: "crash count is 1" (iow: this is a new crash, not a dup)
@@ -208,8 +201,8 @@ mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data)
dd_save_text(dd, FILENAME_COUNT, new_count_str);
dd_close(dd);
- *crash_data = FillCrashInfo(dump_dir_name);
- if (*crash_data != NULL)
+ *problem_data = FillCrashInfo(dump_dir_name);
+ if (*problem_data != NULL)
{
res = MW_OK;
if (count > 1)
@@ -229,24 +222,24 @@ mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data)
return res;
}
-static crash_data_t *FillCrashInfo(const char *dump_dir_name)
+static problem_data_t *FillCrashInfo(const char *dump_dir_name)
{
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
return NULL;
- crash_data_t *crash_data = create_crash_data_from_dump_dir(dd);
+ problem_data_t *problem_data = create_problem_data_from_dump_dir(dd);
char *events = list_possible_events(dd, NULL, "");
dd_close(dd);
- add_to_crash_data_ext(crash_data, CD_EVENTS, events,
+ add_to_problem_data_ext(problem_data, CD_EVENTS, events,
CD_FLAG_TXT + CD_FLAG_ISNOTEDITABLE);
free(events);
- add_to_crash_data_ext(crash_data, CD_DUMPDIR, dump_dir_name,
+ add_to_problem_data_ext(problem_data, CD_DUMPDIR, dump_dir_name,
CD_FLAG_TXT + CD_FLAG_ISNOTEDITABLE);
- return crash_data;
+ return problem_data;
}
/* Remove dump dir */
diff --git a/src/daemon/MiddleWare.h b/src/daemon/MiddleWare.h
index ef246aa..1c7645f 100644
--- a/src/daemon/MiddleWare.h
+++ b/src/daemon/MiddleWare.h
@@ -47,10 +47,10 @@ typedef enum {
* Fills crash info.
* Note that if it's a dup, loads _first crash_ info, not this one's.
* @param dump_dir_name A debugdump directory.
- * @param pCrashData A crash info.
+ * @param problem_data A problem data.
* @return It return results of operation. See mw_result_t.
*/
-mw_result_t LoadDebugDump(const char *dump_dir_name, crash_data_t **crash_data);
+mw_result_t LoadDebugDump(const char *dump_dir_name, problem_data_t **problem_data);
int DeleteDebugDump(const char *dump_dir_name, long caller_uid);
diff --git a/src/daemon/abrt.conf.5 b/src/daemon/abrt.conf.5
index 87bbdb7..4d718a9 100644
--- a/src/daemon/abrt.conf.5
+++ b/src/daemon/abrt.conf.5
@@ -5,7 +5,7 @@ abrt.conf \- configuration file for abrt
.P
.I abrt
is a daemon that watches for application crashes. When a crash occurs,
-it collects the crash data and takes action according to
+it collects the problem data and takes action according to
its configuration. This manual page describes \fIabrt\fP's configuration
file.
.P
diff --git a/src/daemon/abrtd.8 b/src/daemon/abrtd.8
index 150f0c3..4a9449a 100644
--- a/src/daemon/abrtd.8
+++ b/src/daemon/abrtd.8
@@ -6,7 +6,7 @@ abrtd \- automated bug reporting tool's daemon
.SH DESCRIPTION
.I abrtd
is a daemon that watches for application crashes. When a crash occurs,
-it collects the crash data (core file, application's command line etc.)
+it collects the problem data (core file, application's command line etc.)
and takes action according to the type of application that
crashed and according to the configuration in the
.I abrt.conf
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index d18265f..ca0e0d2 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -345,10 +345,10 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
}
char *fullname = NULL;
- crash_data_t *crash_data = NULL;
+ problem_data_t *problem_data = NULL;
fullname = concat_path_file(DEBUG_DUMPS_DIR, name);
- mw_result_t res = LoadDebugDump(fullname, &crash_data);
- const char *first = crash_data ? get_crash_item_content_or_NULL(crash_data, CD_DUMPDIR) : NULL;
+ mw_result_t res = LoadDebugDump(fullname, &problem_data);
+ const char *first = problem_data ? get_problem_item_content_or_NULL(problem_data, CD_DUMPDIR) : NULL;
switch (res)
{
case MW_OK:
@@ -365,11 +365,11 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
delete_dump_dir(fullname);
}
- const char *uid_str = get_crash_item_content_or_NULL(crash_data, FILENAME_UID);
+ const char *uid_str = get_problem_item_content_or_NULL(problem_data, FILENAME_UID);
/* When dup occurs we need to return first occurence,
* not the one which is deleted
*/
- send_dbus_sig_Crash(get_crash_item_content_or_NULL(crash_data, FILENAME_PACKAGE),
+ send_dbus_sig_Crash(get_problem_item_content_or_NULL(problem_data, FILENAME_PACKAGE),
(first) ? first : fullname,
uid_str
);
@@ -383,7 +383,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
break;
}
free(fullname);
- free_crash_data(crash_data);
+ free_problem_data(problem_data);
} /* while */
free(buf);
@@ -650,7 +650,7 @@ int main(int argc, char** argv)
goto init_error;
pidfile_created = true;
- /* Open socket to receive new crashes. */
+ /* Open socket to receive new problem data (from python etc). */
dumpsocket_init();
/* Note: this already may process a few dbus messages,