diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-19 20:47:02 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-22 15:41:11 +0300 |
commit | e573e782cea7c06b038401407863a4e7d8ccd39e (patch) | |
tree | cb212d4f38ff8b485c9a9e9af4709aab9da24831 | |
parent | 69e753bce51bf54aff2304b16e64fb2918decf09 (diff) | |
download | libmicrohttpd-e573e782cea7c06b038401407863a4e7d8ccd39e.tar.gz libmicrohttpd-e573e782cea7c06b038401407863a4e7d8ccd39e.zip |
upgrade: fixed connection states with same value
-rw-r--r-- | src/microhttpd/connection.c | 5 | ||||
-rw-r--r-- | src/microhttpd/internal.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 3a121b9a..da762614 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2354,6 +2354,8 @@ MHD_connection_handle_read (struct MHD_Connection *connection) | |||
2354 | case MHD_CONNECTION_UPGRADE: | 2354 | case MHD_CONNECTION_UPGRADE: |
2355 | EXTRA_CHECK (0); | 2355 | EXTRA_CHECK (0); |
2356 | break; | 2356 | break; |
2357 | case MHD_CONNECTION_UPGRADE_CLOSED: | ||
2358 | break; | ||
2357 | default: | 2359 | default: |
2358 | /* shrink read buffer to how much is actually used */ | 2360 | /* shrink read buffer to how much is actually used */ |
2359 | MHD_pool_reallocate (connection->pool, | 2361 | MHD_pool_reallocate (connection->pool, |
@@ -2538,6 +2540,8 @@ MHD_connection_handle_write (struct MHD_Connection *connection) | |||
2538 | case MHD_CONNECTION_UPGRADE: | 2540 | case MHD_CONNECTION_UPGRADE: |
2539 | EXTRA_CHECK (0); | 2541 | EXTRA_CHECK (0); |
2540 | break; | 2542 | break; |
2543 | case MHD_CONNECTION_UPGRADE_CLOSED: | ||
2544 | break; | ||
2541 | default: | 2545 | default: |
2542 | EXTRA_CHECK (0); | 2546 | EXTRA_CHECK (0); |
2543 | CONNECTION_CLOSE_ERROR (connection, | 2547 | CONNECTION_CLOSE_ERROR (connection, |
@@ -3057,6 +3061,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
3057 | cleanup_connection (connection); | 3061 | cleanup_connection (connection); |
3058 | return MHD_NO; | 3062 | return MHD_NO; |
3059 | case MHD_CONNECTION_UPGRADE: | 3063 | case MHD_CONNECTION_UPGRADE: |
3064 | case MHD_CONNECTION_UPGRADE_CLOSED: | ||
3060 | return MHD_YES; /* keep open */ | 3065 | return MHD_YES; /* keep open */ |
3061 | default: | 3066 | default: |
3062 | EXTRA_CHECK (0); | 3067 | EXTRA_CHECK (0); |
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 89516d86..4a3fe58d 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -508,7 +508,7 @@ enum MHD_CONNECTION_STATE | |||
508 | * by the application. We now need to do our own | 508 | * by the application. We now need to do our own |
509 | * internal cleanup. | 509 | * internal cleanup. |
510 | */ | 510 | */ |
511 | MHD_CONNECTION_UPGRADE_CLOSED = MHD_TLS_CONNECTION_INIT + 1 | 511 | MHD_CONNECTION_UPGRADE_CLOSED = MHD_CONNECTION_UPGRADE + 1 |
512 | 512 | ||
513 | }; | 513 | }; |
514 | 514 | ||