From: Daniel Stenberg Date: Wed, 21 Aug 2024 21:21:26 +0000 (+0200) Subject: getinfo: return zero for unsupported options (when disabled) X-Git-Tag: curl-8_10_0~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20d447c1a7d00d83a89ad00f5e7203307a91a3a0;p=thirdparty%2Fcurl.git getinfo: return zero for unsupported options (when disabled) instead of returning an error code to the getinfo() call. Like other info variables work. Closes #14634 --- diff --git a/lib/getinfo.c b/lib/getinfo.c index c05d3c9d37..ef16a12eb6 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -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) {