mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
GENERATED: check the state before using the options
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user