1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 18:53:12 +02:00

relay: rename variable length_hash to hash_size

This commit is contained in:
Sébastien Helleu
2020-03-01 22:32:43 +01:00
parent 3157d1f06e
commit 0271eacbe5
+3 -3
View File
@@ -188,7 +188,7 @@ relay_websocket_build_handshake (struct t_relay_client *client)
{
const char *sec_websocket_key;
char *key, sec_websocket_accept[128], handshake[1024], hash[160 / 8];
int length, length_hash;
int length, hash_size;
sec_websocket_key = weechat_hashtable_get (client->http_headers,
"sec-websocket-key");
@@ -207,12 +207,12 @@ relay_websocket_build_handshake (struct t_relay_client *client)
snprintf (key, length, "%s%s", sec_websocket_key, WEBSOCKET_GUID);
/* compute 160-bit SHA1 on the key and encode it with base64 */
if (!weechat_crypto_hash (key, strlen (key), "sha1", hash, &length_hash))
if (!weechat_crypto_hash (key, strlen (key), "sha1", hash, &hash_size))
{
free (key);
return NULL;
}
if (weechat_string_base_encode (64, hash, length_hash,
if (weechat_string_base_encode (64, hash, hash_size,
sec_websocket_accept) < 0)
{
sec_websocket_accept[0] = '\0';