Commit f085e68b authored by Sergey Lyubka's avatar Sergey Lyubka

Added check for the duplicate option

parent b78110b9
...@@ -4181,6 +4181,9 @@ struct mg_context *mg_start(mg_callback_t user_callback, void *user_data, ...@@ -4181,6 +4181,9 @@ struct mg_context *mg_start(mg_callback_t user_callback, void *user_data,
free_context(ctx); free_context(ctx);
return NULL; return NULL;
} }
if (ctx->config[i] != NULL) {
cry(fc(ctx), "%s: duplicate option", name);
}
ctx->config[i] = mg_strdup(value); ctx->config[i] = mg_strdup(value);
DEBUG_TRACE(("[%s] -> [%s]", name, value)); DEBUG_TRACE(("[%s] -> [%s]", name, value));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment