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/FileTransfer.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Plugins/FileTransfer.cpp') diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp index 08bba6ca..60e1e66b 100644 --- a/lib/Plugins/FileTransfer.cpp +++ b/lib/Plugins/FileTransfer.cpp @@ -35,8 +35,8 @@ #include #include #include -#include #include "abrtlib.h" +#include "abrt_xmlrpc.h" /* for xcurl_easy_init */ #include "FileTransfer.h" #include "DebugDump.h" #include "ABRTException.h" @@ -85,11 +85,7 @@ void CFileTransfer::SendFile(const char *pURL, const char *pFilename) fclose(f); throw CABRTException(EXCEP_PLUGIN, "Can't stat archive file '%s'", pFilename); } - curl = curl_easy_init(); - if (!curl) - { - throw CABRTException(EXCEP_PLUGIN, "Curl library init error"); - } + curl = xcurl_easy_init(); /* enable uploading */ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); /* specify target */ -- cgit