diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-06-04 01:11:16 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-06-04 01:11:16 -0700 |
commit | 5cd7e29a9fa69c8b1b6c3a3ca8ebf8a9966a2492 (patch) | |
tree | a47661f16bcd913652a2a6d671e71884a79046f8 /sesman/config.c | |
parent | af1b96b3d2dd4c7fb3d15b278e2fbbb6bcc9065e (diff) | |
parent | 4d4ebbf3632bed609b41a9d36969c08d36791417 (diff) | |
download | xrdp-proprietary-5cd7e29a9fa69c8b1b6c3a3ca8ebf8a9966a2492.tar.gz xrdp-proprietary-5cd7e29a9fa69c8b1b6c3a3ca8ebf8a9966a2492.zip |
Merge remote branch 'syslog3/syslog3'
Diffstat (limited to 'sesman/config.c')
-rw-r--r-- | sesman/config.c | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/sesman/config.c b/sesman/config.c index d81f7968..a4342676 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -29,28 +29,11 @@ #include "list.h" #include "file.h" #include "sesman.h" +#include "log.h" extern struct config_sesman* g_cfg; /* in sesman.c */ -/******************************************************************************/ -/** - * - * @brief Reads sesman configuration - * @param s translates the strings "1", "true" and "yes" in 1 (true) and other strings in 0 - * @return 0 on success, 1 on failure - * - */ -static int APP_CC -text2bool(char* s) -{ - if (0 == g_strcasecmp(s, "1") || - 0 == g_strcasecmp(s, "true") || - 0 == g_strcasecmp(s, "yes")) - { - return 1; - } - return 0; -} + /******************************************************************************/ int DEFAULT_CC @@ -66,16 +49,16 @@ config_read(struct config_sesman* cfg) fd = g_file_open(cfg_file); if (-1 == fd) { - if (g_cfg->log.fd >= 0) - { + //if (g_cfg->log.fd >= 0) + //{ /* logging is already active */ - log_message(&(g_cfg->log), LOG_LEVEL_ALWAYS, "error opening %s in \ + log_message(LOG_LEVEL_ALWAYS, "error opening %s in \ config_read", cfg_file); - } - else - { + //} + //else + //{ g_printf("error opening %s in config_read", cfg_file); - } + //} return 1; } g_memset(cfg, 0, sizeof(struct config_sesman)); @@ -95,7 +78,7 @@ config_read(struct config_sesman* cfg) config_read_rdp_params(fd, cfg, param_n, param_v); /* read logging config */ - config_read_logging(fd, &(cfg->log), param_n, param_v); + // config_read_logging(fd, &(cfg->log), param_n, param_v); /* read security config */ config_read_security(fd, &(cfg->sec), param_n, param_v); @@ -190,7 +173,7 @@ config_read_globals(int file, struct config_sesman* cf, struct list* param_n, return 0; } -/******************************************************************************/ +/****************************************************************************** int DEFAULT_CC config_read_logging(int file, struct log_config* lc, struct list* param_n, struct list* param_v) @@ -201,7 +184,7 @@ config_read_logging(int file, struct log_config* lc, struct list* param_n, list_clear(param_v); list_clear(param_n); - /* setting defaults */ + // setting defaults lc->program_name = g_strdup("sesman"); lc->log_file = 0; lc->fd = 0; @@ -244,7 +227,7 @@ config_read_logging(int file, struct log_config* lc, struct list* param_n, return 0; } - +*/ /******************************************************************************/ int DEFAULT_CC config_read_security(int file, struct config_security* sc, |