No more warnings for AMD64 (at least when cross-compiling). Thus tehre is a
[gnupg.git] / keyserver / curl-shim.c
index 12c7afa..406e26e 100644 (file)
@@ -103,7 +103,7 @@ curl_easy_cleanup(CURL *curl)
 {
   if (curl)
     {
-      http_close (curl->hd);
+      http_close (curl->hd, 0);
       free(curl);
     }
 }
@@ -199,7 +199,7 @@ curl_easy_perform(CURL *curl)
           curl->status = http_get_status_code (curl->hd);
          if (!rc && curl->flags.failonerror && curl->status>=300)
            err = CURLE_HTTP_RETURNED_ERROR;
-          http_close(curl->hd);
+          http_close (curl->hd, 0);
           curl->hd = NULL;
        }
     }
@@ -217,8 +217,10 @@ curl_easy_perform(CURL *curl)
                err = CURLE_HTTP_RETURNED_ERROR;
              else
                {
-                 unsigned int maxlen = 1024, buflen, len;
-                 unsigned char *line = NULL;
+                 size_t maxlen = 1024;
+                  size_t buflen;
+                  unsigned int len;
+                 char *line = NULL;
 
                  while ((len = es_read_line (http_get_read_ptr (curl->hd),
                                               &line, &buflen, &maxlen)))
@@ -236,34 +238,29 @@ curl_easy_perform(CURL *curl)
                    }
 
                  es_free (line);
-                 http_close(curl->hd);
+                 http_close(curl->hd, 0);
                   curl->hd = NULL;
                }
            }
          else
             {
-              http_close (curl->hd);
+              http_close (curl->hd, 0);
               curl->hd = NULL;
             }
        }
     }
 
-  switch(rc)
+  switch(gpg_err_code (rc))
     {
     case 0:
       break;
 
-    case G10ERR_INVALID_URI:
+    case GPG_ERR_INV_URI:
       err=CURLE_UNSUPPORTED_PROTOCOL;
       break;
 
-    case G10ERR_NETWORK:
-      errstr=strerror(errno);
-      err=CURLE_COULDNT_CONNECT;
-      break;
-
     default:
-      errstr=g10_errstr(rc);
+      errstr=gpg_strerror (rc);
       err=CURLE_COULDNT_CONNECT;
       break;
     }