summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-26 16:06:57 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-26 16:06:57 +0100
commitb1756b440359c381ebafd62709ddcfa78ea74805 (patch)
treed0841706bc82a054d4c55e668fa46d7d3201e3d8 /lib
parentffb51df395d5e0427ef00a6cff1f93a63eaa65e5 (diff)
downloadabrt-b1756b440359c381ebafd62709ddcfa78ea74805.tar.gz
abrt-b1756b440359c381ebafd62709ddcfa78ea74805.tar.xz
abrt-b1756b440359c381ebafd62709ddcfa78ea74805.zip
small corrections to nicola's new xmlrpc code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/Bugzilla.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 55ce62e5..d6f6c0c7 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -41,17 +41,13 @@ static void get_product_and_version(const std::string& pRelease,
std::string& pVersion);
-#define throw_if_fault_occurred(env) \
-do \
-{ \
- xmlrpc_env* e = (env); \
- if (e->fault_occurred) \
- { \
- char buffer[2048]; \
- snprintf(buffer, 2047, "XML-RPC Fault: %s(%d)", e->fault_string, e->fault_code); \
- throw CABRTException(EXCEP_PLUGIN, std::string(buffer)); \
- } \
-}while(0)
+static void throw_if_fault_occurred(xmlrpc_env* e)
+{
+ if (e->fault_occurred)
+ {
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("XML-RPC Fault: %s(%d)", e->fault_string, e->fault_code));;
+ }
+}
static void new_xmlrpc_client(const char* url, bool no_ssl_verify)
{
@@ -88,10 +84,10 @@ static void destroy_xmlrpc_client()
}
CReporterBugzilla::CReporterBugzilla() :
- m_sBugzillaURL("https://bugzilla.redhat.com"),
- m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX)),
m_bNoSSLVerify(false),
- m_bLoggedIn(false)
+ m_bLoggedIn(false),
+ m_sBugzillaURL("https://bugzilla.redhat.com"),
+ m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX))
{}
CReporterBugzilla::~CReporterBugzilla()