launcher: Actually init the default service override options and make override_urlslash_value more clear
This commit is contained in:
@@ -285,15 +285,16 @@ int main(int argc, const char **argv)
|
|||||||
ea3_ident_to_property(&ea3, ea3_config);
|
ea3_ident_to_property(&ea3, ea3_config);
|
||||||
|
|
||||||
if (options.override_urlslash_enabled) {
|
if (options.override_urlslash_enabled) {
|
||||||
log_info("Overriding url_slash to: %d", options.override_urlslash);
|
log_info(
|
||||||
|
"Overriding url_slash to: %d", options.override_urlslash_value);
|
||||||
|
|
||||||
ea3_ident_replace_property_bool(
|
ea3_ident_replace_property_bool(
|
||||||
ea3_config_root,
|
ea3_config_root,
|
||||||
"/network/url_slash",
|
"/network/url_slash",
|
||||||
options.override_urlslash);
|
options.override_urlslash_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.override_service_enabled) {
|
if (options.override_service != NULL) {
|
||||||
log_info("Overriding service url to: %s", options.override_service);
|
log_info("Overriding service url to: %s", options.override_service);
|
||||||
|
|
||||||
ea3_ident_replace_property_str(
|
ea3_ident_replace_property_str(
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ void options_init(struct options *options)
|
|||||||
options->remote_debugger = false;
|
options->remote_debugger = false;
|
||||||
array_init(&options->hook_dlls);
|
array_init(&options->hook_dlls);
|
||||||
array_init(&options->before_hook_dlls);
|
array_init(&options->before_hook_dlls);
|
||||||
|
|
||||||
|
options->override_service = NULL;
|
||||||
|
options->override_urlslash_enabled = false;
|
||||||
|
options->override_urlslash_value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
||||||
@@ -141,7 +145,6 @@ bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
options->override_service_enabled = true;
|
|
||||||
options->override_service = argv[++i];
|
options->override_service = argv[++i];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -155,12 +158,12 @@ bool options_read_cmdline(struct options *options, int argc, const char **argv)
|
|||||||
|
|
||||||
const char * urlslash_value = argv[++i];
|
const char * urlslash_value = argv[++i];
|
||||||
|
|
||||||
options->override_urlslash = false;
|
options->override_urlslash_value = false;
|
||||||
if (_stricmp(urlslash_value, "1") == 0) {
|
if (_stricmp(urlslash_value, "1") == 0) {
|
||||||
options->override_urlslash = true;
|
options->override_urlslash_value = true;
|
||||||
}
|
}
|
||||||
if (_stricmp(urlslash_value, "true") == 0) {
|
if (_stricmp(urlslash_value, "true") == 0) {
|
||||||
options->override_urlslash = true;
|
options->override_urlslash_value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ struct options {
|
|||||||
struct array hook_dlls;
|
struct array hook_dlls;
|
||||||
struct array before_hook_dlls;
|
struct array before_hook_dlls;
|
||||||
bool remote_debugger;
|
bool remote_debugger;
|
||||||
bool override_service_enabled;
|
|
||||||
const char *override_service;
|
const char *override_service;
|
||||||
bool override_urlslash_enabled;
|
bool override_urlslash_enabled;
|
||||||
bool override_urlslash;
|
bool override_urlslash_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
void options_init(struct options *options);
|
void options_init(struct options *options);
|
||||||
|
|||||||
Reference in New Issue
Block a user