diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-05-09 16:02:19 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-05-09 16:02:19 -0700 |
commit | 49fcc23673323a850b7aaf9ae1025cfd14d0adba (patch) | |
tree | f0c74b982c2d80715434f5624d57b8f02df63e00 /sesman/config.c | |
parent | 3819fa5e72e7735d95fe7992368e242aabc75232 (diff) | |
download | xrdp-proprietary-49fcc23673323a850b7aaf9ae1025cfd14d0adba.tar.gz xrdp-proprietary-49fcc23673323a850b7aaf9ae1025cfd14d0adba.zip |
sesman: added SessionVariables to sesman.ini and some indent cleanup
Diffstat (limited to 'sesman/config.c')
-rw-r--r-- | sesman/config.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sesman/config.c b/sesman/config.c index 8fa6e86a..5a904fc3 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -88,6 +88,8 @@ config_read(struct config_sesman *cfg) /* read session config */ config_read_sessions(fd, &(cfg->sess), param_n, param_v); + config_read_session_variables(fd, cfg, param_n, param_v); + /* cleanup */ list_delete(sec); list_delete(param_v); @@ -507,3 +509,39 @@ config_read_vnc_params(int file, struct config_sesman *cs, struct list *param_n, return 0; } + +/******************************************************************************/ +int DEFAULT_CC +config_read_session_variables(int file, struct config_sesman *cs, + struct list *param_n, struct list *param_v) +{ + int i; + + list_clear(param_v); + list_clear(param_n); + + cs->session_variables1 = list_create(); + cs->session_variables2 = list_create(); + + file_read_section(file, SESMAN_CFG_SESSION_VARIABLES, param_n, param_v); + + for (i = 0; i < param_n->count; i++) + { + list_add_item(cs->session_variables1, + (tintptr) g_strdup((char *) list_get_item(param_n, i))); + list_add_item(cs->session_variables2, + (tintptr) g_strdup((char *) list_get_item(param_v, i))); + } + + /* printing security config */ + g_writeln("%s parameters:", SESMAN_CFG_SESSION_VARIABLES); + + for (i = 0; i < cs->session_variables1->count; i++) + { + g_writeln(" Parameter %02d %s=%s", i, + (char *) list_get_item(cs->session_variables1, i), + (char *) list_get_item(cs->session_variables2, i)); + } + + return 0; +} |