From bc76dcb2b9d3bd3b2e91123868e26381dddd6fc5 Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Fri, 8 Oct 2021 18:40:37 +0900 Subject: [PATCH] Fix typo in sock struct member: s/WaitToUseCipher/WantToUseCipher/ Pointed out by @YangShizhao. Fixes #1492. --- src/Mayaqua/Network.c | 12 ++++++------ src/Mayaqua/Network.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 772c5a18..1a6a786e 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -11427,12 +11427,12 @@ void SetWantToUseCipher(SOCK *sock, char *name) return; } - if (sock->WaitToUseCipher) + if (sock->WantToUseCipher) { - Free(sock->WaitToUseCipher); + Free(sock->WantToUseCipher); } - sock->WaitToUseCipher = CopyStr(name); + sock->WantToUseCipher = CopyStr(name); } // Add all the chain certificates in the chain_certs directory @@ -11701,12 +11701,12 @@ bool StartSSLEx(SOCK *sock, X *x, K *priv, UINT ssl_timeout, char *sni_hostname) } } - if (sock->WaitToUseCipher != NULL) + if (sock->WantToUseCipher != NULL) { // Set the cipher algorithm name to want to use Lock(openssl_lock); { - if (SSL_set_cipher_list(sock->ssl, sock->WaitToUseCipher) == 0) + if (SSL_set_cipher_list(sock->ssl, sock->WantToUseCipher) == 0) SSL_set_cipher_list(sock->ssl, DEFAULT_CIPHER_LIST); } Unlock(openssl_lock); @@ -14758,7 +14758,7 @@ void CleanupSock(SOCK *s) s->CipherName = NULL; } - Free(s->WaitToUseCipher); + Free(s->WantToUseCipher); DeleteLock(s->lock); DeleteLock(s->ssl_lock); DeleteLock(s->disconnect_lock); diff --git a/src/Mayaqua/Network.h b/src/Mayaqua/Network.h index bf58dceb..d656e68a 100644 --- a/src/Mayaqua/Network.h +++ b/src/Mayaqua/Network.h @@ -178,7 +178,7 @@ struct SOCK X *RemoteX; // Certificate of the remote host X *LocalX; // Certificate of the local host char *CipherName; // Cipher algorithm name - char *WaitToUseCipher; // Set the algorithm name to want to use + char *WantToUseCipher; // Set the algorithm name to want to use bool IgnoreRecvErr; // Whether the RecvFrom error is ignorable bool IgnoreSendErr; // Whether the SendTo error is ignorable UINT TimeOut; // Time-out value