From 4e5bddd004b36211b61bce7734fc797e7a950100 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Tue, 14 Jun 2022 20:13:46 +0300 Subject: [PATCH] websocket_threaded_example: minor fixes --- src/examples/websocket_threaded_example.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/examples/websocket_threaded_example.c b/src/examples/websocket_threaded_example.c index 21f58ed3..e1580548 100644 --- 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) {