diff options
author | ilsimo <ilsimo> | 2008-02-20 22:02:24 +0000 |
---|---|---|
committer | ilsimo <ilsimo> | 2008-02-20 22:02:24 +0000 |
commit | 4c9d3862e55ab5d6fa734549478bb0a00be9f7ed (patch) | |
tree | 2efde9a8872ed90ea14521702614768aaf0b765b /sesman/config.c | |
parent | 8f0045c19b03d5c9a0baea6b72037ec226db8343 (diff) | |
download | xrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.tar.gz xrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.zip |
updating logging subsystem
Diffstat (limited to 'sesman/config.c')
-rw-r--r-- | sesman/config.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sesman/config.c b/sesman/config.c index fc6b7d51..4be3975c 100644 --- a/sesman/config.c +++ b/sesman/config.c @@ -30,6 +30,8 @@ #include "file.h" #include "sesman.h" +extern struct config_sesman g_cfg; + /******************************************************************************/ /** * @@ -62,8 +64,16 @@ config_read(struct config_sesman* cfg) fd = g_file_open(SESMAN_CFG_FILE); if (-1 == fd) { - log_message(LOG_LEVEL_ALWAYS, "error opening %s in \ -config_read", SESMAN_CFG_FILE); + if (g_cfg.log.fd >= 0) + { + /* logging is already active */ + log_message(&(g_cfg.log), LOG_LEVEL_ALWAYS, "error opening %s in \ + config_read", SESMAN_CFG_FILE); + } + else + { + g_printf("error opening %s in config_read", SESMAN_CFG_FILE); + } return 1; } g_memset(cfg, 0, sizeof(struct config_sesman)); |