aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-14 20:13:46 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-06-14 20:13:46 +0300
commit4e5bddd004b36211b61bce7734fc797e7a950100 (patch)
tree365c246c8bcafc7821f1975d8aeeaf51e5465e1c
parentb7eaffc0ed90be9a763795eb279395efe9623d8b (diff)
downloadlibmicrohttpd-4e5bddd004b36211b61bce7734fc797e7a950100.tar.gz
libmicrohttpd-4e5bddd004b36211b61bce7734fc797e7a950100.zip
websocket_threaded_example: minor fixes
-rw-r--r--src/examples/websocket_threaded_example.c6
1 files 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
282 } 282 }
283 if (context->corrupted) 283 if (context->corrupted)
284 { 284 {
285 return context->corrupted; 285 return SHA1_RESULT_STATE_ERROR;
286 } 286 }
287 if (! context->computed) 287 if (! context->computed)
288 { 288 {
@@ -319,12 +319,12 @@ SHA1Input (struct SHA1Context *context, const unsigned char *message_array,
319 } 319 }
320 if (context->computed) 320 if (context->computed)
321 { 321 {
322 context->corrupted = SHA1_RESULT_STATE_ERROR; 322 context->corrupted = 1;
323 return SHA1_RESULT_STATE_ERROR; 323 return SHA1_RESULT_STATE_ERROR;
324 } 324 }
325 if (context->corrupted) 325 if (context->corrupted)
326 { 326 {
327 return context->corrupted; 327 return SHA1_RESULT_STATE_ERROR;
328 } 328 }
329 while (length-- && ! context->corrupted) 329 while (length-- && ! context->corrupted)
330 { 330 {