]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
getinfo: return zero for unsupported options (when disabled)
authorDaniel Stenberg <daniel@haxx.se>
Wed, 21 Aug 2024 21:21:26 +0000 (23:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 23 Aug 2024 06:24:33 +0000 (08:24 +0200)
instead of returning an error code to the getinfo() call. Like other
info variables work.

Closes #14634

lib/getinfo.c

index c05d3c9d37fa829668b55a0a3f5ccdbcb30e4f79..ef16a12eb6935fb0e87aeba905cc6156919404e2 100644 (file)
@@ -253,11 +253,13 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info,
   case CURLINFO_SSL_VERIFYRESULT:
     *param_longp = data->set.ssl.certverifyresult;
     break;
-#ifndef CURL_DISABLE_PROXY
   case CURLINFO_PROXY_SSL_VERIFYRESULT:
+#ifndef CURL_DISABLE_PROXY
     *param_longp = data->set.proxy_ssl.certverifyresult;
-    break;
+#else
+    *param_longp = 0;
 #endif
+    break;
   case CURLINFO_REDIRECT_COUNT:
     *param_longp = data->state.followlocation;
     break;
@@ -315,6 +317,12 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info,
   case CURLINFO_RTSP_CSEQ_RECV:
     *param_longp = data->state.rtsp_CSeq_recv;
     break;
+#else
+  case CURLINFO_RTSP_CLIENT_CSEQ:
+  case CURLINFO_RTSP_SERVER_CSEQ:
+  case CURLINFO_RTSP_CSEQ_RECV:
+    *param_longp = 0;
+    break;
 #endif
   case CURLINFO_HTTP_VERSION:
     switch(data->info.httpversion) {