diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index ad52f806..86e3f325 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -648,6 +648,7 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh, | |||
648 | { | 648 | { |
649 | struct MHD_Connection *connection; | 649 | struct MHD_Connection *connection; |
650 | struct MHD_Daemon *daemon; | 650 | struct MHD_Daemon *daemon; |
651 | |||
651 | if (NULL == urh) | 652 | if (NULL == urh) |
652 | return MHD_NO; | 653 | return MHD_NO; |
653 | connection = urh->connection; | 654 | connection = urh->connection; |
@@ -662,11 +663,11 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh, | |||
662 | switch (action) | 663 | switch (action) |
663 | { | 664 | { |
664 | case MHD_UPGRADE_ACTION_CLOSE: | 665 | case MHD_UPGRADE_ACTION_CLOSE: |
665 | if (MHD_YES == urh->was_closed) | 666 | if (urh->was_closed) |
666 | return MHD_NO; /* Already closed. */ | 667 | return MHD_NO; /* Already closed. */ |
667 | 668 | ||
668 | /* transition to special 'closed' state for start of cleanup */ | 669 | /* transition to special 'closed' state for start of cleanup */ |
669 | urh->was_closed = MHD_YES; | 670 | urh->was_closed = true; |
670 | connection->state = MHD_CONNECTION_UPGRADE_CLOSED; | 671 | connection->state = MHD_CONNECTION_UPGRADE_CLOSED; |
671 | /* As soon as connection will be marked with BOTH | 672 | /* As soon as connection will be marked with BOTH |
672 | * 'urh->was_closed' AND 'urh->clean_ready', it will | 673 | * 'urh->was_closed' AND 'urh->clean_ready', it will |