fix: Correct configuration parsing for port and max_threads

This commit is contained in:
2025-12-17 20:52:42 +01:00
parent 519f5e13c8
commit f6662e2f59

View File

@@ -171,7 +171,7 @@ int load_config(const char* filename, ServerConfig* config)
switch (get_config_key(key))
{
case CONFIG_PORT:
config->port = strcoll(value, value);
config->port = (int)strtol(value, NULL, 10);
printf("load_config: port = %d\n", config->port);
break;
@@ -187,7 +187,7 @@ int load_config(const char* filename, ServerConfig* config)
break;
case CONFIG_MAX_THREADS:
config->max_threads = strcoll(value, value);
config->max_threads = (int)strtol(value, NULL, 10);
printf("load_config: max_threads = %d\n", config->max_threads);
break;