diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 336aa69c..51a03720 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -5,6 +5,7 @@ Release Notes v1.6 (Under Development) Changes ------- +- Allow to specify title and tray icon for the Windows standalone server (bel) - Fix minor memory leaks (bel) - Redirect all memory allocation/deallocation through mg functions which may be overwritten (bel) - Support Cross-Origin Resource Sharing (CORS) for static files and scripts (bel) diff --git a/src/main.c b/src/main.c index 429dc6c7..00f2dd83 100644 --- a/src/main.c +++ b/src/main.c @@ -80,6 +80,7 @@ extern char *_getcwd(char *buf, size_t size); static int exit_flag; static char server_base_name[40]; /* Set by init_server_name() */ static char *server_name; /* Set by init_server_name() */ +static char *icon_name; /* Set by init_server_name() */ static char config_file[PATH_MAX] = ""; /* Set by process_command_line_arguments() */ static struct mg_context *ctx; /* Set by start_civetweb() */ @@ -222,7 +223,7 @@ static int set_option(char **options, const char *name, const char *value) const struct mg_option *default_options = mg_get_valid_options(); for (i = 0; main_config_options[i].name != 0; i++) { - if (0==strcmp(name, main_config_options[OPTION_TITLE].name)) { + if (0==strcmp(name, main_config_options[i].name)) { /* This option is evaluated by main.c, not civetweb.c - just skip it and return OK */ return 1; } @@ -401,6 +402,12 @@ static void init_server_name(int argc, const char *argv[]) server_name = (char*)(argv[i+1]); } } + icon_name = 0; + for (i=0; i