GENERATED: check the state before using the options

This commit is contained in:
Evgeny Grin (Karlson2k)
2024-06-08 14:38:18 +02:00
parent e4dd181aa5
commit d3b09093c8
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -24,6 +24,9 @@ MHD_daemon_set_options (struct MHD_Daemon *daemon,
{
size_t i;
if (mhd_DAEMON_STATE_NOT_STARTED != daemon->state)
return MHD_SC_TOO_LATE;
for (i=0;i<options_max_num;i++)
{
const struct MHD_DaemonOptionAndValue *const option = options + i;
+3
View File
@@ -23,6 +23,9 @@ MHD_response_set_options (struct MHD_Response *response,
{
size_t i;
if (response->frozen)
return MHD_SC_TOO_LATE;
for (i=0;i<options_max_num;i++)
{
const struct MHD_ResponseOptionAndValue *const option = options + i;