git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1798 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2006/01/03 03:10:32
Showing 1 changed files
... ...
@@ -15,7 +15,7 @@
15 15
  *  along with this program; if not, write to the Free Software
16 16
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 17
  */
18
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.267 2006/01/02 18:01:54 nigelhorne Exp $";
18
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.268 2006/01/02 18:10:32 nigelhorne Exp $";
19 19
 
20 20
 #if HAVE_CONFIG_H
21 21
 #include "clamav-config.h"
... ...
@@ -3778,7 +3778,7 @@ getURL(struct arg *arg)
3778 3778
 	char fout[NAME_MAX + 1];
3779 3779
 #ifdef	CURLOPT_ERRORBUFFER
3780 3780
 	char errorbuffer[CURL_ERROR_SIZE];
3781
-#else
3781
+#elif	(LIBCURL_VERSION_NUM >= 0x070C00)
3782 3782
 	CURLcode res = CURLE_OK;
3783 3783
 #endif
3784 3784
 
... ...
@@ -3857,10 +3857,6 @@ getURL(struct arg *arg)
3857 3857
 	 */
3858 3858
 	curl_easy_setopt(curl, CURLOPT_USERPWD, "username:password");
3859 3859
 
3860
-#ifdef	CURLOPT_ERRORBUFFER
3861
-	curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
3862
-#endif
3863
-
3864 3860
 	/*
3865 3861
 	 * FIXME: valgrind reports "pthread_mutex_unlock: mutex is not locked"
3866 3862
 	 * from gethostbyaddr_r within this. It may be a bug in libcurl
... ...
@@ -3878,6 +3874,8 @@ getURL(struct arg *arg)
3878 3878
 	 *	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139559
3879 3879
 	 */
3880 3880
 #ifdef	CURLOPT_ERRORBUFFER
3881
+	curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorbuffer);
3882
+
3881 3883
 	if(curl_easy_perform(curl) != CURLE_OK)
3882 3884
 		cli_warnmsg("URL %s failed to download: %s\n", url, errorbuffer);
3883 3885
 #elif	(LIBCURL_VERSION_NUM >= 0x070C00)
... ...
@@ -3885,7 +3883,7 @@ getURL(struct arg *arg)
3885 3885
 		cli_warnmsg("URL %s failed to download: %s\n", url,
3886 3886
 			curl_easy_strerror(res));
3887 3887
 #else
3888
-	if((res = curl_easy_perform(curl)) != CURLE_OK)
3888
+	if(curl_easy_perform(curl) != CURLE_OK)
3889 3889
 		cli_warnmsg("URL %s failed to download\n", url);
3890 3890
 #endif
3891 3891