diff options
| author | norrarvid <norrarvid@gmail.com> | 2012-06-05 08:08:04 +0200 |
|---|---|---|
| committer | norrarvid <norrarvid@gmail.com> | 2012-06-05 08:08:04 +0200 |
| commit | eef475e025b62aaebc24b1eaa603cb3a92ffd07a (patch) | |
| tree | 03b136fea5bbc428008be16c20af079490741da3 /xrdp/xrdp.c | |
| parent | a555dc5a4282514b9d4eae2a26a5d57665176f1a (diff) | |
| parent | dbd2cbca8e5ad361706b0ac013b62607bae4b5d3 (diff) | |
| download | xrdp-proprietary-eef475e025b62aaebc24b1eaa603cb3a92ffd07a.tar.gz xrdp-proprietary-eef475e025b62aaebc24b1eaa603cb3a92ffd07a.zip | |
timeout added for the reply to come from sesman
Diffstat (limited to 'xrdp/xrdp.c')
| -rw-r--r-- | xrdp/xrdp.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index 95936cef..83d2f0a2 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -21,6 +21,7 @@ */ #include "xrdp.h" +#include "log.h" static struct xrdp_listen* g_listen = 0; static long g_threadid = 0; /* main threadid */ @@ -261,6 +262,8 @@ main(int argc, char** argv) { int test; int host_be; + char cfg_file[256]; + enum logReturns error; struct xrdp_startup_params* startup_params; int pid; int fd; @@ -304,6 +307,25 @@ main(int argc, char** argv) g_writeln("unusable tui64 size, must be 8"); return 0; } + g_snprintf(cfg_file, 255, "%s/xrdp.ini", XRDP_CFG_PATH); + + /* starting logging subsystem */ + error = log_start(cfg_file,"XRDP"); + + if (error != LOG_STARTUP_OK) + { + char buf[256] ; + switch (error) + { + case LOG_ERROR_MALLOC: + g_printf("error on malloc. cannot start logging. quitting.\n"); + break; + case LOG_ERROR_FILE_OPEN: + g_printf("error opening log file [%s]. quitting.\n", getLogFile(buf,255)); + break; + } + g_exit(1); + } startup_params = (struct xrdp_startup_params*) g_malloc(sizeof(struct xrdp_startup_params), 1); |
