summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/KerneloopsReporter.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-11 22:30:27 +0100
committerKarel Klic <kklic@redhat.com>2009-11-11 22:30:27 +0100
commit07a12979cbf321c03c615f921aec601492e8d196 (patch)
treea0eba8c5b0cf06be829c378ca8704470e37a036b /lib/Plugins/KerneloopsReporter.cpp
parent4bb5f0163c1cf3c65745ea06f1b42545ecaa35d7 (diff)
parent640af192338643b3c9e6fbe0304726e951239c2b (diff)
downloadabrt-07a12979cbf321c03c615f921aec601492e8d196.tar.gz
abrt-07a12979cbf321c03c615f921aec601492e8d196.tar.xz
abrt-07a12979cbf321c03c615f921aec601492e8d196.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/KerneloopsReporter.cpp')
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp
index c57a1ef8..f7a6cbb8 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -98,12 +98,10 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
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(),
@@ -111,30 +109,32 @@ 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;
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("SubmitURL") != pSettings.end())
- {
- m_sSubmitURL = pSettings.find("SubmitURL")->second;
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("SubmitURL");
+ if (it != end) {
+ m_sSubmitURL = it->second;
}
}
-map_plugin_settings_t CKerneloopsReporter::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["SubmitURL"] = m_sSubmitURL;
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CKerneloopsReporter::GetSettings()
+//{
+// m_pSettings["SubmitURL"] = m_sSubmitURL;
+//
+// return m_pSettings;
+//}
PLUGIN_INFO(REPORTER,
CKerneloopsReporter,