summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-08 18:05:31 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-08 18:05:31 +0100
commit693f8cd5cd05f896fbf73e6b2d1f2fda4f458cce (patch)
treeb4be24b9080e15ae099d4931ea480b20e86d544c
parentf1bf98f5efd3535a264264d6f57b1826fcca4f25 (diff)
downloadabrt-693f8cd5cd05f896fbf73e6b2d1f2fda4f458cce.tar.gz
abrt-693f8cd5cd05f896fbf73e6b2d1f2fda4f458cce.tar.xz
abrt-693f8cd5cd05f896fbf73e6b2d1f2fda4f458cce.zip
abrtd: remove support for ActionsAndReporters, abrt_event.conf supersedes it
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--src/daemon/Daemon.cpp10
-rw-r--r--src/daemon/MiddleWare.cpp49
-rw-r--r--src/daemon/MiddleWare.h14
-rw-r--r--src/daemon/Settings.cpp10
-rw-r--r--src/daemon/Settings.h1
-rw-r--r--src/daemon/abrt.conf7
-rw-r--r--src/daemon/abrt.conf.54
7 files changed, 0 insertions, 95 deletions
diff --git a/src/daemon/Daemon.cpp b/src/daemon/Daemon.cpp
index 79828fd9..7eeb0710 100644
--- a/src/daemon/Daemon.cpp
+++ b/src/daemon/Daemon.cpp
@@ -263,12 +263,6 @@ static gboolean cron_activation_reshedule_cb(gpointer data)
static int SetUpMW()
{
- VERB1 log("Adding actions or reporters");
- vector_pair_string_string_t::iterator it_ar = g_settings_vectorActionsAndReporters.begin();
- for (; it_ar != g_settings_vectorActionsAndReporters.end(); it_ar++)
- {
- AddActionOrReporter(it_ar->first.c_str(), it_ar->second.c_str());
- }
VERB1 log("Adding analyzers, actions or reporters");
map_analyzer_actions_and_reporters_t::iterator it_aar = g_settings_mapAnalyzerActionsAndReporters.begin();
for (; it_aar != g_settings_mapAnalyzerActionsAndReporters.end(); it_aar++)
@@ -427,8 +421,6 @@ static void FindNewDumps(const char* pPath)
/* Not VERB1: this is new, unprocessed crash dump.
* Last abrtd somehow missed it - need to inform user */
log("Non-processed crash in %s, saving into database", dir_name);
- /* Run automatic actions and reporters on it (if we have them configured) */
- RunActionsAndReporters(dir_name);
break;
case MW_IN_DB:
/* This debugdump was found in DB, nothing else was done
@@ -652,8 +644,6 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
{
case MW_OK:
log("New crash %s, processing", fullname);
- /* Run automatic actions and reporters on it (if we have them configured) */
- RunActionsAndReporters(fullname);
/* Fall through */
case MW_REPORTED: /* already reported dup */
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index c02d5150..dedc492e 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -41,11 +41,6 @@ CPluginManager* g_pPluginManager;
*/
typedef std::map<std::string, vector_pair_string_string_t> map_analyzer_actions_and_reporters_t;
static map_analyzer_actions_and_reporters_t s_mapAnalyzerActionsAndReporters;
-/**
- * A vector of one or more action or reporter plugins. These are
- * activated when any crash occurs.
- */
-static vector_pair_string_string_t s_vectorActionsAndReporters;
/**
@@ -186,43 +181,6 @@ void RunAction(const char *pActionDir,
}
}
-void RunActionsAndReporters(const char *pDebugDumpDir)
-{
- vector_pair_string_string_t::iterator it_ar = s_vectorActionsAndReporters.begin();
- map_plugin_settings_t plugin_settings;
- for (; it_ar != s_vectorActionsAndReporters.end(); it_ar++)
- {
- const char *plugin_name = it_ar->first.c_str();
- try
- {
- VERB3 log("RunActionsAndReporters: checking %s", plugin_name);
- plugin_type_t tp = g_pPluginManager->GetPluginType(plugin_name);
- if (tp == REPORTER)
- {
- CReporter* reporter = g_pPluginManager->GetReporter(plugin_name); /* can't be NULL */
- map_crash_data_t crashReport;
- if (DebugDumpToCrashReport(pDebugDumpDir, crashReport))
- {
- VERB2 log("%s.Report(...)", plugin_name);
- reporter->Report(crashReport, plugin_settings, it_ar->second.c_str());
- }
- else
- error_msg("Activation of plugin '%s' was not successful: Error converting crash data", plugin_name);
- }
- else if (tp == ACTION)
- {
- CAction* action = g_pPluginManager->GetAction(plugin_name); /* can't be NULL */
- VERB2 log("%s.Run('%s','%s')", plugin_name, pDebugDumpDir, it_ar->second.c_str());
- action->Run(pDebugDumpDir, it_ar->second.c_str(), /*force:*/ 0);
- }
- }
- catch (CABRTException& e)
- {
- error_msg("Activation of plugin '%s' was not successful: %s", plugin_name, e.what());
- }
- }
-}
-
struct logging_state {
char *last_line;
};
@@ -685,10 +643,3 @@ void AddAnalyzerActionOrReporter(const char *pAnalyzer,
{
s_mapAnalyzerActionsAndReporters[pAnalyzer].push_back(make_pair(std::string(pAnalyzerOrReporter), std::string(pArgs)));
}
-
-void AddActionOrReporter(const char *pActionOrReporter,
- const char *pArgs)
-{
- VERB3 log("AddActionOrReporter('%s','%s')", pActionOrReporter, pArgs);
- s_vectorActionsAndReporters.push_back(make_pair(std::string(pActionOrReporter), std::string(pArgs)));
-}
diff --git a/src/daemon/MiddleWare.h b/src/daemon/MiddleWare.h
index 8eb2759c..8d0dcd96 100644
--- a/src/daemon/MiddleWare.h
+++ b/src/daemon/MiddleWare.h
@@ -70,12 +70,6 @@ void RunAction(const char *pActionDir,
const char *pPluginName,
const char *pPluginArgs);
/**
- * Activates all action and reporter plugins when any
- * crash occurs.
- * @param pDebugDumpDir A debugdump dir containing all necessary data.
- */
-void RunActionsAndReporters(const char *pDebugDumpDir);
-/**
* Reports a crash report to particular receiver. It
* takes an user uid, tries to find user config file and load it. If it
* fails, then default config is used. If pUID is emply string, default
@@ -135,14 +129,6 @@ void GetUUIDsOfCrash(long caller_uid, vector_string_t &result);
void AddAnalyzerActionOrReporter(const char *pAnalyzer,
const char *pActionOrReporter,
const char *pArgs);
-/**
- * Add action and reporter plugins, which are activated
- * when any crash occurs.
- * @param pActionOrReporter A name of an action or reporter plugin.
- * @param pArgs An arguments for action or reporter plugin.
- */
-void AddActionOrReporter(const char *pActionOrReporter,
- const char *pArgs);
bool analyzer_has_InformAllUsers(const char *analyzer_name);
#endif /*MIDDLEWARE_H_*/
diff --git a/src/daemon/Settings.cpp b/src/daemon/Settings.cpp
index 1be85954..0f358b2a 100644
--- a/src/daemon/Settings.cpp
+++ b/src/daemon/Settings.cpp
@@ -59,8 +59,6 @@ char *g_settings_sWatchCrashdumpArchiveDir = NULL;
unsigned int g_settings_nMaxCrashReportsSize = 1000;
bool g_settings_bProcessUnpackaged = false;
-/* one line: "ActionsAndReporters = aa_first,bb_first(bb_second),cc_first" */
-vector_pair_string_string_t g_settings_vectorActionsAndReporters;
/* [ AnalyzerActionsAndReporters ] */
/* many lines, one per key: "map_key = aa_first,bb_first(bb_second),cc_first" */
map_analyzer_actions_and_reporters_t g_settings_mapAnalyzerActionsAndReporters;
@@ -230,14 +228,6 @@ static int ParseCommon()
{
g_settings_nMaxCrashReportsSize = xatoi_u(it->second.c_str());
}
- it = s_mapSectionCommon.find("ActionsAndReporters");
- if (it != end)
- {
- int err = 0;
- g_settings_vectorActionsAndReporters = ParseListWithArgs(it->second.c_str(), &err);
- if (err)
- return err;
- }
it = s_mapSectionCommon.find("ProcessUnpackaged");
if (it != end)
{
diff --git a/src/daemon/Settings.h b/src/daemon/Settings.h
index 5ee365f6..21cb8d0c 100644
--- a/src/daemon/Settings.h
+++ b/src/daemon/Settings.h
@@ -35,7 +35,6 @@ extern bool g_settings_bProcessUnpackaged;
extern char *g_settings_sDatabase;
extern char *g_settings_sWatchCrashdumpArchiveDir;
extern map_cron_t g_settings_mapCron;
-extern vector_pair_string_string_t g_settings_vectorActionsAndReporters;
extern map_analyzer_actions_and_reporters_t g_settings_mapAnalyzerActionsAndReporters;
int LoadSettings();
diff --git a/src/daemon/abrt.conf b/src/daemon/abrt.conf
index 534aef8f..9bae2c50 100644
--- a/src/daemon/abrt.conf
+++ b/src/daemon/abrt.conf
@@ -33,13 +33,6 @@ Database = SQLite3
#
MaxCrashReportsSize = 1000
-# Vector of actions and reporters which are activated immediately
-# after a crash occurs, comma separated.
-#
-#ActionsAndReporters = Mailx("[abrt] new crash was detected")
-#ActionsAndReporters = FileTransfer("store")
-ActionsAndReporters = RunApp("test x\"`cat component`\" = x\"xorg-x11-server-Xorg\" && cp /var/log/Xorg.0.log .")
-
# What actions or reporters to run on each crash type
#
diff --git a/src/daemon/abrt.conf.5 b/src/daemon/abrt.conf.5
index f8afe393..968b5ea8 100644
--- a/src/daemon/abrt.conf.5
+++ b/src/daemon/abrt.conf.5
@@ -47,10 +47,6 @@ will use for all the crash dumps. Specify a value here to ensure
that the crash dumps will not fill all available storage space.
The default is 1000.
.TP
-.B ActionsAndReporters = \fIplugin\fP, \fIplugin(parameters)\fP
-List of reporter and action plugins which will be
-run at crash time.
-.TP
.B ProcessUnpackaged = \fIyes\fP | \fIno\fP
When set to "yes",
.I abrt