|
|
|
@ -107,6 +107,7 @@ config_read_globals(int file, struct config_sesman* cf, struct list* param_n,
|
|
|
|
|
list_clear(param_n);
|
|
|
|
|
|
|
|
|
|
/* resetting the struct */
|
|
|
|
|
cf->listen_address[0] = '\0';
|
|
|
|
|
cf->listen_port[0] = '\0';
|
|
|
|
|
cf->enable_user_wm = 0;
|
|
|
|
|
cf->user_wm[0] = '\0';
|
|
|
|
@ -132,9 +133,17 @@ config_read_globals(int file, struct config_sesman* cf, struct list* param_n,
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(cf->listen_port, (char*)list_get_item(param_v, i), 15);
|
|
|
|
|
}
|
|
|
|
|
else if (0 == g_strcasecmp(buf, SESMAN_CFG_ADDRESS))
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(cf->listen_address, (char*)list_get_item(param_v, i), 31);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* checking for missing required parameters */
|
|
|
|
|
if ('\0' == cf->listen_address[0])
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(cf->listen_address, "0.0.0.0", 8);
|
|
|
|
|
}
|
|
|
|
|
if ('\0' == cf->listen_port[0])
|
|
|
|
|
{
|
|
|
|
|
g_strncpy(cf->listen_port, "3350", 5);
|
|
|
|
@ -150,6 +159,7 @@ config_read_globals(int file, struct config_sesman* cf, struct list* param_n,
|
|
|
|
|
|
|
|
|
|
/* showing read config */
|
|
|
|
|
g_printf("sesman config:\r\n");
|
|
|
|
|
g_printf("\tListenAddress: %s\r\n", cf->listen_address);
|
|
|
|
|
g_printf("\tListenPort: %s\r\n", cf->listen_port);
|
|
|
|
|
g_printf("\tEnableUserWindowManager: %i\r\n", cf->enable_user_wm);
|
|
|
|
|
g_printf("\tUserWindowManager: %s\r\n", cf->user_wm);
|
|
|
|
|