summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/KerneloopsReporter.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-09 13:55:20 +0100
committerKarel Klic <kklic@redhat.com>2009-11-09 13:55:20 +0100
commit19f406b4930c931a932dc6930762e8e12e29ce8b (patch)
treeb08468bf9a010cbce0ecd000a0279222f0d4b4e7 /lib/Plugins/KerneloopsReporter.cpp
parent801ab58f32f2cb7dca3352b721a07c83705a0287 (diff)
parent8fa9a6ecd247454ab758efecf818d8067455c778 (diff)
downloadabrt-19f406b4930c931a932dc6930762e8e12e29ce8b.tar.gz
abrt-19f406b4930c931a932dc6930762e8e12e29ce8b.tar.xz
abrt-19f406b4930c931a932dc6930762e8e12e29ce8b.zip
merge
Diffstat (limited to 'lib/Plugins/KerneloopsReporter.cpp')
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp
index e9967fd..cfb4e05 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -93,15 +93,15 @@ CKerneloopsReporter::CKerneloopsReporter() :
m_sSubmitURL("http://submit.kerneloops.org/submitoops.php")
{}
-std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
+std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
+ const std::string& pArgs)
{
int ret = -1;
- map_crash_report_t::const_iterator it;
update_client(_("Creating and submitting a report..."));
- it = pCrashReport.begin();
- it = pCrashReport.find(FILENAME_KERNELOOPS);
+ map_crash_report_t::const_iterator it = pCrashReport.find(FILENAME_KERNELOOPS);
if (it != pCrashReport.end()) {
ret = http_post_to_kerneloops_site(
m_sSubmitURL.c_str(),
@@ -109,29 +109,26 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
);
}
- if (ret)
- {
+ if (ret) {
/* FIXME: be more informative */
- throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
+ throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
}
- return "Kernel oops report was uploaded to :" + m_sSubmitURL;
+ return "Kernel oops report was uploaded to: " + m_sSubmitURL;
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("SubmitURL") != pSettings.end())
- {
- m_sSubmitURL = pSettings.find("SubmitURL")->second;
+ map_plugin_settings_t::const_iterator it = pSettings.find("SubmitURL");
+ if (it != pSettings.end()) {
+ m_sSubmitURL = it->second;
}
}
-map_plugin_settings_t CKerneloopsReporter::GetSettings()
+const map_plugin_settings_t& CKerneloopsReporter::GetSettings()
{
- map_plugin_settings_t ret;
+ m_pSettings["SubmitURL"] = m_sSubmitURL;
- ret["SubmitURL"] = m_sSubmitURL;
-
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(REPORTER,