diff options
author | Zdenek Prikryl <zprikryl@redhat.com> | 2009-08-14 20:59:43 +0200 |
---|---|---|
committer | Zdenek Prikryl <zprikryl@redhat.com> | 2009-08-14 20:59:43 +0200 |
commit | 3c226c987f5015e8184bfc4293ee9f9b2f7b8f67 (patch) | |
tree | b2ec9e8f5ec3140008a15cccea4030c438dbe72e /lib/Plugins/Bugzilla.cpp | |
parent | 15e44fefb8e0ce093e91bc0fd96302c6b77bf92a (diff) | |
download | abrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.tar.gz abrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.tar.xz abrt-3c226c987f5015e8184bfc4293ee9f9b2f7b8f67.zip |
added support for storing results from reporters (used from gui)
Diffstat (limited to 'lib/Plugins/Bugzilla.cpp')
-rw-r--r-- | lib/Plugins/Bugzilla.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 2a91b959..5e3602f4 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -150,7 +150,7 @@ void CReporterBugzilla::AddPlusOneCC(const std::string& pBugId) ret = xmlrpc_c::value_struct(rpc->getResult()); } -bool CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID) +std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID) { xmlrpc_c::paramList paramList; map_xmlrpc_params_t searchParams; @@ -182,9 +182,9 @@ bool CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const AddPlusOneComment(ss.str()); AddPlusOneCC(ss.str()); - return true; + return ss.str(); } - return false; + return ""; } void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription) @@ -358,7 +358,7 @@ void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_cras } } -void CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs) +std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs) { std::string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT]; std::string component = package.substr(0, package.rfind("-", package.rfind("-")-1)); @@ -371,7 +371,7 @@ void CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std { Login(); comm_layer_inner_status("Checking for duplicates..."); - if (!CheckUUIDInBugzilla(component, uuid)) + if ((bugId = CheckUUIDInBugzilla(component, uuid)) == "") { comm_layer_inner_status("Creating new bug..."); bugId = NewBug(pCrashReport); @@ -386,6 +386,7 @@ void CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what()); } DeleteXMLRPCClient(); + return "See bug in bugzilla: " + m_sBugzillaURL + ", bug id:" + bugId; } void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings) |