diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-31 15:13:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-31 15:13:38 +0200 |
commit | e60c006499ec9a1604f85f84a98145535a7ad0a7 (patch) | |
tree | 8697c803a43e1b0a0bba0e7f2cb3d05573baa683 /lib | |
parent | f9a9c1ddeaff8e0fc6e1c5b1fb323c4da4763401 (diff) | |
download | abrt-e60c006499ec9a1604f85f84a98145535a7ad0a7.tar.gz abrt-e60c006499ec9a1604f85f84a98145535a7ad0a7.tar.xz abrt-e60c006499ec9a1604f85f84a98145535a7ad0a7.zip |
Move PLUGIN_INFOs to .cpp files: same object must never be defined twice
and if structure is defined in a .h file, that happens.
Since this particular structure has non-trivial destructor,
it was running twice and resulted in double-free.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MiddleWare/Plugin.h | 15 | ||||
-rw-r--r-- | lib/MiddleWare/PluginManager.cpp | 6 | ||||
-rw-r--r-- | lib/Plugins/Bugzilla.cpp | 10 | ||||
-rw-r--r-- | lib/Plugins/Bugzilla.h | 11 | ||||
-rw-r--r-- | lib/Plugins/CCpp.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/CCpp.h | 10 | ||||
-rw-r--r-- | lib/Plugins/FileTransfer.cpp | 12 | ||||
-rw-r--r-- | lib/Plugins/FileTransfer.h | 11 | ||||
-rw-r--r-- | lib/Plugins/Kerneloops.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/Kerneloops.h | 9 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsReporter.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsReporter.h | 9 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsScanner.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/KerneloopsScanner.h | 9 | ||||
-rw-r--r-- | lib/Plugins/Logger.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/Logger.h | 10 | ||||
-rw-r--r-- | lib/Plugins/Mailx.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/Mailx.h | 10 | ||||
-rw-r--r-- | lib/Plugins/Python.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/Python.h | 11 | ||||
-rw-r--r-- | lib/Plugins/RunApp.cpp | 11 | ||||
-rw-r--r-- | lib/Plugins/RunApp.h | 10 | ||||
-rw-r--r-- | lib/Plugins/SOSreport.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/SOSreport.h | 9 | ||||
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 9 | ||||
-rw-r--r-- | lib/Plugins/SQLite3.h | 9 |
26 files changed, 123 insertions, 130 deletions
diff --git a/lib/MiddleWare/Plugin.h b/lib/MiddleWare/Plugin.h index ef107e3d..c7ae9ce7 100644 --- a/lib/MiddleWare/Plugin.h +++ b/lib/MiddleWare/Plugin.h @@ -60,15 +60,12 @@ class CPlugin /** * An emun of plugin types. */ -typedef enum { ANALYZER, /**< An analyzer plugin*/ - ACTION, /**< An action plugin*/ - REPORTER, /**< A reporter plugin*/ - DATABASE /**< A database plugin*/ - } plugin_type_t; -/** - * Text reprezentation of plugin types. - */ -const char* const plugin_type_str_t[] = {"Analyzer", "Action", "Reporter", "Database"}; +typedef enum { + ANALYZER, /**< An analyzer plugin*/ + ACTION, /**< An action plugin*/ + REPORTER, /**< A reporter plugin*/ + DATABASE /**< A database plugin*/ +} plugin_type_t; /** * A struct contains all needed data about particular plugin. diff --git a/lib/MiddleWare/PluginManager.cpp b/lib/MiddleWare/PluginManager.cpp index 916eabe9..2d110936 100644 --- a/lib/MiddleWare/PluginManager.cpp +++ b/lib/MiddleWare/PluginManager.cpp @@ -27,6 +27,12 @@ #include <stdio.h> #include <sys/types.h> +/** + * Text reprezentation of plugin types. + */ +static const char* const plugin_type_str_t[] = { "Analyzer", "Action", "Reporter", "Database" }; + + CPluginManager::CPluginManager(const std::string& pPlugisConfDir, const std::string& pPlugisLibDir) : m_sPlugisConfDir(pPlugisConfDir), diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 07398355..864321f2 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -342,3 +342,13 @@ void CReporterBugzilla::LoadSettings(const std::string& pPath) m_bNoSSLVerify = settings["NoSSLVerify"] == "yes"; } } + +PLUGIN_INFO(REPORTER, + CReporterBugzilla, + "Bugzilla", + "0.0.2", + "Check if a bug isn't already reported in a bugzilla " + "and if not, report it.", + "zprikryl@redhat.com", + "https://fedorahosted.org/abrt/wiki", + PLUGINS_LIB_DIR"/Bugzilla.GTKBuilder"); diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h index fe23cdca..6d53defe 100644 --- a/lib/Plugins/Bugzilla.h +++ b/lib/Plugins/Bugzilla.h @@ -43,15 +43,4 @@ class CReporterBugzilla : public CReporter const std::string& pArgs); }; -PLUGIN_INFO(REPORTER, - CReporterBugzilla, - "Bugzilla", - "0.0.2", - "Check if a bug isn't already reported in a bugzilla " - "and if not, report it.", - "zprikryl@redhat.com", - "https://fedorahosted.org/abrt/wiki", - PLUGINS_LIB_DIR"/Bugzilla.GTKBuilder"); - - #endif /* BUGZILLA_H_ */ diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index c38f19b9..6c2bc444 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -581,3 +581,12 @@ void CAnalyzerCCpp::LoadSettings(const std::string& pPath) m_bMemoryMap = settings["MemoryMap"] == "yes"; } } + +PLUGIN_INFO(ANALYZER, + CAnalyzerCCpp, + "CCpp", + "0.0.1", + "Simple C/C++ analyzer plugin.", + "zprikryl@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h index d79b61ee..27f17cdd 100644 --- a/lib/Plugins/CCpp.h +++ b/lib/Plugins/CCpp.h @@ -50,14 +50,4 @@ class CAnalyzerCCpp : public CAnalyzer virtual void LoadSettings(const std::string& pPath); }; - -PLUGIN_INFO(ANALYZER, - CAnalyzerCCpp, - "CCpp", - "0.0.1", - "Simple C/C++ analyzer plugin.", - "zprikryl@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - #endif /* CCPP */ diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp index db289718..3b7b979b 100644 --- a/lib/Plugins/FileTransfer.cpp +++ b/lib/Plugins/FileTransfer.cpp @@ -241,7 +241,7 @@ void CFileTransfer::LoadSettings(const std::string& pPath) { m_nRetryCount = atoi(settings["RetryCount"].c_str()); } - + if (settings.find("RetryDelay")!= settings.end()) { m_nRetryDelay = atoi(settings["RetryDelay"].c_str()); @@ -256,5 +256,13 @@ void CFileTransfer::LoadSettings(const std::string& pPath) m_sArchiveType = "." + m_sArchiveType; } } - } + +PLUGIN_INFO(ACTION, + CFileTransfer, + "FileTransfer", + "0.0.6", + "Sends a report via FTP or SCTP", + "dnovotny@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/FileTransfer.h b/lib/Plugins/FileTransfer.h index b44aad5c..f044cf7b 100644 --- a/lib/Plugins/FileTransfer.h +++ b/lib/Plugins/FileTransfer.h @@ -55,15 +55,4 @@ class CFileTransfer : public CAction const std::string& pArgs); }; - -PLUGIN_INFO(ACTION, - CFileTransfer, - "FileTransfer", - "0.0.6", - "Sends a report via FTP or SCTP", - "dnovotny@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - - #endif /* FILETRANSFER_H_ */ diff --git a/lib/Plugins/Kerneloops.cpp b/lib/Plugins/Kerneloops.cpp index f4714834..1eabd215 100644 --- a/lib/Plugins/Kerneloops.cpp +++ b/lib/Plugins/Kerneloops.cpp @@ -61,3 +61,12 @@ std::string CAnalyzerKerneloops::GetGlobalUUID(const std::string& pDebugDumpDir) { return GetLocalUUID(pDebugDumpDir); } + +PLUGIN_INFO(ANALYZER, + CAnalyzerKerneloops, + "Kerneloops", + "0.0.2", + "Abrt's Kerneloops plugin.", + "anton@redhat.com", + "https://people.redhat.com/aarapov", + ""); diff --git a/lib/Plugins/Kerneloops.h b/lib/Plugins/Kerneloops.h index 6dc440f9..77d44191 100644 --- a/lib/Plugins/Kerneloops.h +++ b/lib/Plugins/Kerneloops.h @@ -43,13 +43,4 @@ class CAnalyzerKerneloops : public CAnalyzer virtual void CreateReport(const std::string& pDebugDumpDir) {} }; -PLUGIN_INFO(ANALYZER, - CAnalyzerKerneloops, - "Kerneloops", - "0.0.2", - "Abrt's Kerneloops plugin.", - "anton@redhat.com", - "https://people.redhat.com/aarapov", - ""); - #endif diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp index 30119809..e3a28956 100644 --- a/lib/Plugins/KerneloopsReporter.cpp +++ b/lib/Plugins/KerneloopsReporter.cpp @@ -118,3 +118,12 @@ void CKerneloopsReporter::LoadSettings(const std::string& pPath) m_sSubmitURL = settings["SubmitURL"]; } } + +PLUGIN_INFO(REPORTER, + CKerneloopsReporter, + "KerneloopsReporter", + "0.0.1", + "Sends the Kerneloops crash information to Kerneloopsoops.org", + "anton@redhat.com", + "http://people.redhat.com/aarapov", + PLUGINS_LIB_DIR"/KerneloopsReporter.GTKBuilder"); diff --git a/lib/Plugins/KerneloopsReporter.h b/lib/Plugins/KerneloopsReporter.h index aea774d8..a5e06836 100644 --- a/lib/Plugins/KerneloopsReporter.h +++ b/lib/Plugins/KerneloopsReporter.h @@ -45,13 +45,4 @@ class CKerneloopsReporter : public CReporter virtual void Report(const map_crash_report_t& pCrashReport, const std::string& pArgs); }; -PLUGIN_INFO(REPORTER, - CKerneloopsReporter, - "KerneloopsReporter", - "0.0.1", - "Sends the Kerneloops crash information to Kerneloopsoops.org", - "anton@redhat.com", - "http://people.redhat.com/aarapov", - PLUGINS_LIB_DIR"/KerneloopsReporter.GTKBuilder"); - #endif diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp index 01020e68..96fe1973 100644 --- a/lib/Plugins/KerneloopsScanner.cpp +++ b/lib/Plugins/KerneloopsScanner.cpp @@ -151,3 +151,12 @@ void CKerneloopsScanner::LoadSettings(const std::string& pPath) m_sSysLogFile = settings["SysLogFile"]; } } + +PLUGIN_INFO(ACTION, + CKerneloopsScanner, + "KerneloopsScanner", + "0.0.1", + "Save new Kerneloops crashes into debug dump dir", + "anton@redhat.com", + "http://people.redhat.com/aarapov", + ""); diff --git a/lib/Plugins/KerneloopsScanner.h b/lib/Plugins/KerneloopsScanner.h index ccc2606e..50e8a4d9 100644 --- a/lib/Plugins/KerneloopsScanner.h +++ b/lib/Plugins/KerneloopsScanner.h @@ -29,13 +29,4 @@ class CKerneloopsScanner : public CAction virtual void LoadSettings(const std::string& pPath); }; -PLUGIN_INFO(ACTION, - CKerneloopsScanner, - "KerneloopsScanner", - "0.0.1", - "Save new Kerneloops crashes into debug dump dir", - "anton@redhat.com", - "http://people.redhat.com/aarapov", - ""); - #endif /* KERNELOOPSSCANNER_H_ */ diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp index 33ebfa03..5e99cf9d 100644 --- a/lib/Plugins/Logger.cpp +++ b/lib/Plugins/Logger.cpp @@ -125,3 +125,12 @@ void CLogger::Report(const map_crash_report_t& pCrashReport, const std::string& fOut.close(); } } + +PLUGIN_INFO(REPORTER, + CLogger, + "Logger", + "0.0.1", + "Write a report to a specific file", + "zprikryl@redhat.com", + "https://fedorahosted.org/abrt/wiki", + PLUGINS_LIB_DIR"/Logger.GTKBuilder"); diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h index 07e7576d..5200f0ec 100644 --- a/lib/Plugins/Logger.h +++ b/lib/Plugins/Logger.h @@ -39,14 +39,4 @@ class CLogger : public CReporter virtual void Report(const map_crash_report_t& pCrashReport, const std::string& pArgs); }; - -PLUGIN_INFO(REPORTER, - CLogger, - "Logger", - "0.0.1", - "Write a report to a specific file", - "zprikryl@redhat.com", - "https://fedorahosted.org/abrt/wiki", - PLUGINS_LIB_DIR"/Logger.GTKBuilder"); - #endif /* LOGGER_H_ */ diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index d4b44cff..fdc3dcb1 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -164,3 +164,12 @@ void CMailx::LoadSettings(const std::string& pPath) m_bSendBinaryData = settings["SendBinaryData"] == "yes"; } } + +PLUGIN_INFO(REPORTER, + CMailx, + "Mailx", + "0.0.2", + "Sends an email with a report via mailx command", + "zprikryl@redhat.com", + "https://fedorahosted.org/abrt/wiki", + PLUGINS_LIB_DIR"/Mailx.GTKBuilder"); diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h index 4235764e..e2173ed5 100644 --- a/lib/Plugins/Mailx.h +++ b/lib/Plugins/Mailx.h @@ -47,14 +47,4 @@ class CMailx : public CReporter virtual void Report(const map_crash_report_t& pCrashReport, const std::string& pArgs); }; - -PLUGIN_INFO(REPORTER, - CMailx, - "Mailx", - "0.0.2", - "Sends an email with a report via mailx command", - "zprikryl@redhat.com", - "https://fedorahosted.org/abrt/wiki", - PLUGINS_LIB_DIR"/Mailx.GTKBuilder"); - #endif /* MAILX_H_ */ diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp index f58a6c90..c3677e7b 100644 --- a/lib/Plugins/Python.cpp +++ b/lib/Plugins/Python.cpp @@ -48,3 +48,12 @@ void CAnalyzerPython::DeInit() fOutPySiteCustomize.close(); } } + +PLUGIN_INFO(ANALYZER, + CAnalyzerPython, + "Python", + "0.0.1", + "Simple Python analyzer plugin.", + "zprikryl@redhat.com, jmoskovc@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/Python.h b/lib/Plugins/Python.h index 62a43222..6eaf1d14 100644 --- a/lib/Plugins/Python.h +++ b/lib/Plugins/Python.h @@ -17,15 +17,4 @@ class CAnalyzerPython : public CAnalyzer virtual std::string CreateHash(const std::string& pInput); }; - -PLUGIN_INFO(ANALYZER, - CAnalyzerPython, - "Python", - "0.0.1", - "Simple Python analyzer plugin.", - "zprikryl@redhat.com, jmoskovc@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - - #endif /* PYTHON_H_ */ diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp index 9d996eea..8d37f11c 100644 --- a/lib/Plugins/RunApp.cpp +++ b/lib/Plugins/RunApp.cpp @@ -86,5 +86,14 @@ void CActionRunApp::Run(const std::string& pActionDir, dd.SaveText(args[FILENAME], output); dd.Close(); } - } + +PLUGIN_INFO(ACTION, + CActionRunApp, + "RunApp", + "0.0.1", + "Simple action plugin which runs a command " + "and it can save command's output", + "zprikryl@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/RunApp.h b/lib/Plugins/RunApp.h index 839992b0..65fbe500 100644 --- a/lib/Plugins/RunApp.h +++ b/lib/Plugins/RunApp.h @@ -38,14 +38,4 @@ class CActionRunApp : public CAction const std::string& pArgs); }; -PLUGIN_INFO(ACTION, - CActionRunApp, - "RunApp", - "0.0.1", - "Simple action plugin which runs a command " - "and it can save command's output", - "zprikryl@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - #endif diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp index 2790cd25..5247a5d5 100644 --- a/lib/Plugins/SOSreport.cpp +++ b/lib/Plugins/SOSreport.cpp @@ -114,3 +114,12 @@ void CActionSOSreport::Run(const std::string& pActionDir, CopyFile(sosreport_filename,sosreport_dd_filename); dd.Close(); } + +PLUGIN_INFO(ACTION, + CActionSOSreport , + "SOSreport", + "0.0.2", + "Run sosreport, save the output in the crash dump", + "gavin@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/SOSreport.h b/lib/Plugins/SOSreport.h index d70494ad..dbddafdb 100644 --- a/lib/Plugins/SOSreport.h +++ b/lib/Plugins/SOSreport.h @@ -38,13 +38,4 @@ class CActionSOSreport : public CAction const std::string& pArgs); }; -PLUGIN_INFO(ACTION, - CActionSOSreport , - "SOSreport", - "0.0.2", - "Run sosreport, save the output in the crash dump", - "gavin@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - #endif diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 66c654ef..ada5f507 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -278,3 +278,12 @@ void CSQLite3::LoadSettings(const std::string& pPath) m_sDBPath = settings["DBPath"]; } } + +PLUGIN_INFO(DATABASE, + CSQLite3, + "SQLite3", + "0.0.1", + "SQLite3 database plugin.", + "zprikryl@redhat.com,jmoskovc@redhat.com", + "https://fedorahosted.org/abrt/wiki", + ""); diff --git a/lib/Plugins/SQLite3.h b/lib/Plugins/SQLite3.h index e283e3c0..ce0b81e9 100644 --- a/lib/Plugins/SQLite3.h +++ b/lib/Plugins/SQLite3.h @@ -61,13 +61,4 @@ class CSQLite3 : public CDatabase virtual void LoadSettings(const std::string& pPath); }; -PLUGIN_INFO(DATABASE, - CSQLite3, - "SQLite3", - "0.0.1", - "SQLite3 database plugin.", - "zprikryl@redhat.com,jmoskovc@redhat.com", - "https://fedorahosted.org/abrt/wiki", - ""); - #endif /* SQLITE3_H_ */ |