diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-15 13:15:46 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-15 13:15:46 +0200 |
commit | 91e85cf829250429a2437076e9e165b4a953e5ac (patch) | |
tree | 353deae31615015eae3e11d6442cab2c8a5f1ef0 /lib/Plugins | |
parent | dd488fb6ceb80f7963b1a1a29c4b90b80977bb34 (diff) | |
download | abrt-91e85cf829250429a2437076e9e165b4a953e5ac.tar.gz abrt-91e85cf829250429a2437076e9e165b4a953e5ac.tar.xz abrt-91e85cf829250429a2437076e9e165b4a953e5ac.zip |
RHTSupport: actually use settings; report curl errors better
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/Bugzilla.conf | 1 | ||||
-rw-r--r-- | lib/Plugins/FileTransfer.conf | 3 | ||||
-rw-r--r-- | lib/Plugins/Makefile.am | 4 | ||||
-rw-r--r-- | lib/Plugins/RHTSupport.conf | 1 | ||||
-rw-r--r-- | lib/Plugins/RHTSupport.cpp | 18 | ||||
-rw-r--r-- | lib/Plugins/TicketUploader.conf | 3 |
6 files changed, 22 insertions, 8 deletions
diff --git a/lib/Plugins/Bugzilla.conf b/lib/Plugins/Bugzilla.conf index ff2f8286..bd83a08e 100644 --- a/lib/Plugins/Bugzilla.conf +++ b/lib/Plugins/Bugzilla.conf @@ -1,4 +1,5 @@ Enabled = yes + # Bugzilla URL BugzillaURL = https://bugzilla.redhat.com/ # yes means that ssl certificates will not be checked diff --git a/lib/Plugins/FileTransfer.conf b/lib/Plugins/FileTransfer.conf index 30769b18..111c1c4b 100644 --- a/lib/Plugins/FileTransfer.conf +++ b/lib/Plugins/FileTransfer.conf @@ -1,6 +1,5 @@ -Enabled = yes - # Configuration of the FileTransfer reporter plugin. +Enabled = yes # The plugin is invoked in the abrt.conf file, usually in the # ActionsAndReporters option and/or the [cron] section. diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am index d1d50218..bb370b71 100644 --- a/lib/Plugins/Makefile.am +++ b/lib/Plugins/Makefile.am @@ -35,6 +35,7 @@ dist_pluginsconf_DATA = \ Logger.conf \ Kerneloops.conf \ Bugzilla.conf \ + RHTSupport.conf \ Catcut.conf \ TicketUploader.conf \ FileTransfer.conf \ @@ -46,7 +47,8 @@ man_MANS = \ abrt-Bugzilla.7 \ abrt-KerneloopsScanner.7 \ abrt-KerneloopsReporter.7 \ - abrt-Logger.7 abrt-Mailx.7 \ + abrt-Logger.7 \ + abrt-Mailx.7 \ abrt-plugins.7 \ abrt-SQLite3.7 \ abrt-RunApp.7 \ diff --git a/lib/Plugins/RHTSupport.conf b/lib/Plugins/RHTSupport.conf new file mode 100644 index 00000000..3201c6da --- /dev/null +++ b/lib/Plugins/RHTSupport.conf @@ -0,0 +1 @@ +Enabled = yes diff --git a/lib/Plugins/RHTSupport.cpp b/lib/Plugins/RHTSupport.cpp index 01f46f13..c9467a43 100644 --- a/lib/Plugins/RHTSupport.cpp +++ b/lib/Plugins/RHTSupport.cpp @@ -104,6 +104,15 @@ string CReporterRHticket::Report(const map_crash_data_t& pCrashData, { string retval; + map_plugin_settings_t::const_iterator end = pSettings.end(); + map_plugin_settings_t::const_iterator it; + it = pSettings.find("URL"); + string URL = (it == end ? m_sStrataURL : it->second); + it = pSettings.find("Login"); + string login = (it == end ? m_sLogin : it->second); + it = pSettings.find("Password"); + string password = (it == end ? m_sPassword : it->second); + const string& package = get_crash_data_item_content(pCrashData, FILENAME_PACKAGE); // const string& component = get_crash_data_item_content(pCrashData, FILENAME_COMPONENT); // const string& release = get_crash_data_item_content(pCrashData, FILENAME_RELEASE); @@ -220,9 +229,9 @@ string CReporterRHticket::Report(const map_crash_data_t& pCrashData, { update_client(_("Creating a new case...")); - char* result = send_report_to_new_case(m_sStrataURL.c_str(), - m_sLogin.c_str(), - m_sPassword.c_str(), + char* result = send_report_to_new_case(URL.c_str(), + login.c_str(), + password.c_str(), summary.c_str(), description.c_str(), package.c_str(), @@ -234,7 +243,8 @@ string CReporterRHticket::Report(const map_crash_data_t& pCrashData, } ret: - kill(child, SIGKILL); /* just in case */ + // Damn, selinux does not allow SIGKILLing our own child! wtf?? + //kill(child, SIGKILL); /* just in case */ waitpid(child, NULL, 0); if (tar) tar_close(tar); diff --git a/lib/Plugins/TicketUploader.conf b/lib/Plugins/TicketUploader.conf index 97f455c5..57692531 100644 --- a/lib/Plugins/TicketUploader.conf +++ b/lib/Plugins/TicketUploader.conf @@ -1,3 +1,5 @@ +Enabled = yes + # Customer = "Example Inc." # Ticket = IT12345 # Encrypt = yes @@ -17,4 +19,3 @@ # How long we wait between we retry the upload (in seconds) # RetryDelay = 20 -Enabled = yes |