summaryrefslogtreecommitdiffstats
path: root/lib/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Utils')
-rw-r--r--lib/Utils/abrt_xmlrpc.cpp9
-rw-r--r--lib/Utils/abrt_xmlrpc.h1
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp
index e3a4648a..c2d716e1 100644
--- a/lib/Utils/abrt_xmlrpc.cpp
+++ b/lib/Utils/abrt_xmlrpc.cpp
@@ -15,7 +15,6 @@ CURL* xcurl_easy_init()
return curl;
}
-#if 1
void throw_xml_fault(xmlrpc_env *env)
{
std::string errmsg = ssprintf("XML-RPC Fault: %s(%d)", env->fault_string, env->fault_code);
@@ -24,19 +23,13 @@ void throw_xml_fault(xmlrpc_env *env)
error_msg("%s", errmsg.c_str()); // show error in daemon log
throw CABRTException(EXCEP_PLUGIN, errmsg.c_str());
}
-#else
void throw_if_xml_fault_occurred(xmlrpc_env *env)
{
if (env->fault_occurred)
{
- std::string errmsg = ssprintf("XML-RPC Fault: %s(%d)", env->fault_string, env->fault_code);
- xmlrpc_env_clean(env); // this is needed ONLY if fault_occurred
- xmlrpc_env_init(env); // just in case user catches ex and _continues_ to use env
- error_msg("%s", errmsg.c_str()); // show error in daemon log
- throw CABRTException(EXCEP_PLUGIN, errmsg.c_str());
+ throw_xml_fault(env);
}
}
-#endif
void abrt_xmlrpc_conn::new_xmlrpc_client(const char* url, bool no_ssl_verify)
{
diff --git a/lib/Utils/abrt_xmlrpc.h b/lib/Utils/abrt_xmlrpc.h
index a8bd2cca..a0e9ca34 100644
--- a/lib/Utils/abrt_xmlrpc.h
+++ b/lib/Utils/abrt_xmlrpc.h
@@ -25,6 +25,7 @@ struct abrt_xmlrpc_conn {
/* Utility functions */
void throw_xml_fault(xmlrpc_env *env);
+void throw_if_xml_fault_occurred(xmlrpc_env *env);
CURL* xcurl_easy_init();
#endif