]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: fix variable undeclared error caused by `infof` changes
authorYX Hao <lifenjoiner@163.com>
Wed, 6 Dec 2023 14:42:00 +0000 (22:42 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Dec 2023 22:01:54 +0000 (23:01 +0100)
`--disable-verbose` yields `CURL_DISABLE_VERBOSE_STRINGS` defined.
`infof` isn't `Curl_nop_stmt` anymore: dac293c.

Follow-up to dac293c

Closes #12470

lib/vauth/digest_sspi.c
lib/vtls/schannel.c

index 02e36ea5ed833a4ef3b13c77d642e87b264ae44a..4696f29addac19cbe06fb7ed40ecdb1e7c89b322 100644 (file)
@@ -211,8 +211,10 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
     if(status == SEC_E_INSUFFICIENT_MEMORY)
       return CURLE_OUT_OF_MEMORY;
 
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
     infof(data, "schannel: InitializeSecurityContext failed: %s",
           Curl_sspi_strerror(status, buffer, sizeof(buffer)));
+#endif
 
     return CURLE_AUTH_ERROR;
   }
@@ -603,8 +605,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
       if(status == SEC_E_INSUFFICIENT_MEMORY)
         return CURLE_OUT_OF_MEMORY;
 
+#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
       infof(data, "schannel: InitializeSecurityContext failed: %s",
             Curl_sspi_strerror(status, buffer, sizeof(buffer)));
+#endif
 
       return CURLE_AUTH_ERROR;
     }
index ae7f2956da69c72d0ca08ab790d600e5cc91f857..8e1d5be8d8025c74d12a34378596518cb0666363 100644 (file)
@@ -2332,10 +2332,10 @@ schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
     else {
 #ifndef CURL_DISABLE_VERBOSE_STRINGS
       char buffer[STRERROR_LEN];
-#endif
-      *err = CURLE_RECV_ERROR;
       infof(data, "schannel: failed to read data from server: %s",
             Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer)));
+#endif
+      *err = CURLE_RECV_ERROR;
       goto cleanup;
     }
   }