diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-11-06 15:11:55 +0100 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2009-11-06 15:11:55 +0100 |
commit | 3a62ede25114452938acb8e1a67006633b139efc (patch) | |
tree | d3a291e5dac5d7ddf14bae4a097ff5b298b71aa5 /lib/Plugins/KerneloopsReporter.cpp | |
parent | fc571a9ac7aaa8802d3e8aacf9aefac12ca3c81c (diff) | |
parent | 80975b02ec1a2e8dfc6f7ce21e47cf71b16b5a6e (diff) | |
download | abrt-3a62ede25114452938acb8e1a67006633b139efc.tar.gz abrt-3a62ede25114452938acb8e1a67006633b139efc.tar.xz abrt-3a62ede25114452938acb8e1a67006633b139efc.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/KerneloopsReporter.cpp')
-rw-r--r-- | lib/Plugins/KerneloopsReporter.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp index c57a1ef..712adf0 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,19 +109,18 @@ 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; + map_plugin_settings_t::const_iterator it = pSettings.find("SubmitURL"); + if (it != pSettings.end()) { + m_sSubmitURL = it->second; } } |