commit 4e5bddd004b36211b61bce7734fc797e7a950100
parent b7eaffc0ed90be9a763795eb279395efe9623d8b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 14 Jun 2022 20:13:46 +0300
websocket_threaded_example: minor fixes
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c
@@ -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)
{