commit e573e782cea7c06b038401407863a4e7d8ccd39e
parent 69e753bce51bf54aff2304b16e64fb2918decf09
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 19 Oct 2016 20:47:02 +0300
upgrade: fixed connection states with same value
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -2354,6 +2354,8 @@ MHD_connection_handle_read (struct MHD_Connection *connection)
case MHD_CONNECTION_UPGRADE:
EXTRA_CHECK (0);
break;
+ case MHD_CONNECTION_UPGRADE_CLOSED:
+ break;
default:
/* shrink read buffer to how much is actually used */
MHD_pool_reallocate (connection->pool,
@@ -2538,6 +2540,8 @@ MHD_connection_handle_write (struct MHD_Connection *connection)
case MHD_CONNECTION_UPGRADE:
EXTRA_CHECK (0);
break;
+ case MHD_CONNECTION_UPGRADE_CLOSED:
+ break;
default:
EXTRA_CHECK (0);
CONNECTION_CLOSE_ERROR (connection,
@@ -3057,6 +3061,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection)
cleanup_connection (connection);
return MHD_NO;
case MHD_CONNECTION_UPGRADE:
+ case MHD_CONNECTION_UPGRADE_CLOSED:
return MHD_YES; /* keep open */
default:
EXTRA_CHECK (0);
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
@@ -508,7 +508,7 @@ enum MHD_CONNECTION_STATE
* by the application. We now need to do our own
* internal cleanup.
*/
- MHD_CONNECTION_UPGRADE_CLOSED = MHD_TLS_CONNECTION_INIT + 1
+ MHD_CONNECTION_UPGRADE_CLOSED = MHD_CONNECTION_UPGRADE + 1
};