Compiler warning fix
authorYang Tse <yangsita@gmail.com>
Sun, 24 Sep 2006 23:55:53 +0000 (23:55 +0000)
committerYang Tse <yangsita@gmail.com>
Sun, 24 Sep 2006 23:55:53 +0000 (23:55 +0000)
lib/socks.c

index e0586f8..fb6f7fe 100644 (file)
 
 #include "setup.h"
 
+#include <string.h>
+
+#ifdef NEED_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
 #include "urldata.h"
 #include "sendf.h"
 #include "strequal.h"
@@ -541,7 +550,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
     code = Curl_write(conn, sock, (char *)socksreq, packetsize, &written);
     if ((code != CURLE_OK) || (written != packetsize)) {
       failf(data, "Failed to send SOCKS5 connect request.");
-      return 1;
+      return CURLE_COULDNT_CONNECT;
     }
 
     result = blockread_all(conn, sock, (char *)socksreq, packetsize,