commit a3519410eee2b11c813d97872724b1394480eea4
parent 5060c37b95ba4b66a251f5942bd4f45066ed3635
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Sun, 21 May 2017 17:27:31 +0300
MHD_get_connection_info(): fixed returned 'bool' which is not a member of union MHD_ConnectionInfo
Diffstat:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -3486,7 +3486,8 @@ MHD_get_connection_info (struct MHD_Connection *connection,
case MHD_CONNECTION_INFO_SOCKET_CONTEXT:
return (const union MHD_ConnectionInfo *) &connection->socket_context;
case MHD_CONNECTION_INFO_CONNECTION_SUSPENDED:
- return (const union MHD_ConnectionInfo *) &connection->suspended;
+ connection->suspended_dummy = connection->suspended ? MHD_YES : MHD_NO;
+ return (const union MHD_ConnectionInfo *) &connection->suspended_dummy;
case MHD_CONNECTION_INFO_CONNECTION_TIMEOUT:
connection->connection_timeout_dummy = (unsigned int)connection->connection_timeout;
return (const union MHD_ConnectionInfo *) &connection->connection_timeout_dummy;
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
@@ -996,6 +996,11 @@ struct MHD_Connection
bool suspended;
/**
+ * Special member to be returned by #MHD_get_connection_info()
+ */
+ int suspended_dummy;
+
+ /**
* Is the connection wanting to resume?
*/
bool resuming;