websocket_threaded_example: minor fixes

This commit is contained in:
Evgeny Grin (Karlson2k)
2022-06-14 20:13:46 +03:00
parent b7eaffc0ed
commit 4e5bddd004
+3 -3
View File
@@ -282,7 +282,7 @@ SHA1Result (struct SHA1Context *context, unsigned char
}
if (context->corrupted)
{
return context->corrupted;
return SHA1_RESULT_STATE_ERROR;
}
if (! context->computed)
{
@@ -319,12 +319,12 @@ SHA1Input (struct SHA1Context *context, const unsigned char *message_array,
}
if (context->computed)
{
context->corrupted = SHA1_RESULT_STATE_ERROR;
context->corrupted = 1;
return SHA1_RESULT_STATE_ERROR;
}
if (context->corrupted)
{
return context->corrupted;
return SHA1_RESULT_STATE_ERROR;
}
while (length-- && ! context->corrupted)
{