From 707f64b85c8a1b88923617ff72bd8a4ca562f3bd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Dec 2009 15:09:55 +0100 Subject: prevent destructors from throwing exceptions; check curl_easy_init errors Signed-off-by: Denys Vlasenko --- lib/Plugins/TicketUploader.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Plugins/TicketUploader.cpp') diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp index 14f5e1d..a4fe0e8 100644 --- a/lib/Plugins/TicketUploader.cpp +++ b/lib/Plugins/TicketUploader.cpp @@ -20,8 +20,8 @@ #include #include #include -#include #include "abrtlib.h" +#include "abrt_xmlrpc.h" /* for xcurl_easy_init */ #include "TicketUploader.h" #include "DebugDump.h" #include "ABRTException.h" @@ -124,11 +124,7 @@ void CTicketUploader::SendFile(const char *pURL, const char *pFilename) { throw CABRTException(EXCEP_PLUGIN, "Can't stat archive file '%s'", pFilename); } - CURL* curl = curl_easy_init(); - if (!curl) - { - throw CABRTException(EXCEP_PLUGIN, "Curl library init error"); - } + CURL* curl = xcurl_easy_init(); /* enable uploading */ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); /* specify target */ -- cgit