]> git.ipfire.org Git - pakfire.git/commitdiff
httpclient: Pass any numeric arguments to libcurl as long
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Mar 2026 17:31:42 +0000 (17:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Mar 2026 17:31:42 +0000 (17:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/httpclient.c

index 94181ca68dfbb6bbbe8cf564b83ab540627888d8..520c92f2df7b2455f171f143f2bdbdf3883c77d1 100644 (file)
@@ -617,7 +617,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) {
        }
 
        // Set the number of open idle connections
-       r = curl_multi_setopt(self->curl, CURLMOPT_MAXCONNECTS, 16);
+       r = curl_multi_setopt(self->curl, CURLMOPT_MAXCONNECTS, 16L);
        if (r) {
                ERROR(self->ctx, "Could not set max parallel transfers: %s\n",
                        curl_multi_strerror(r));
@@ -626,7 +626,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) {
        }
 
        // Do not open more than eight connections to the same host
-       r = curl_multi_setopt(self->curl, CURLMOPT_MAX_HOST_CONNECTIONS, 8);
+       r = curl_multi_setopt(self->curl, CURLMOPT_MAX_HOST_CONNECTIONS, 8L);
        if (r) {
                ERROR(self->ctx, "Could not set max host connections: %s\n",
                        curl_multi_strerror(r));
@@ -635,7 +635,7 @@ static int pakfire_httpclient_setup_curl(pakfire_httpclient* self) {
        }
 
        // Limit total number of open connections
-       r = curl_multi_setopt(self->curl, CURLMOPT_MAX_TOTAL_CONNECTIONS, 64);
+       r = curl_multi_setopt(self->curl, CURLMOPT_MAX_TOTAL_CONNECTIONS, 64L);
        if (r) {
                ERROR(self->ctx, "Could not set max total connections: %s\n",
                        curl_multi_strerror(r));