summaryrefslogtreecommitdiffstats
path: root/sesman/session.c
diff options
context:
space:
mode:
authorilsimo <ilsimo>2007-05-06 21:02:25 +0000
committerilsimo <ilsimo>2007-05-06 21:02:25 +0000
commitf22b5b42a74314af8c4232c86ccce968c6a37ce5 (patch)
tree83da9d21acb9b9c8bb04414228a85153ec972259 /sesman/session.c
parentd0e066ee8b0d428f6876bc32a97ce1e70420a65e (diff)
downloadxrdp-proprietary-f22b5b42a74314af8c4232c86ccce968c6a37ce5.tar.gz
xrdp-proprietary-f22b5b42a74314af8c4232c86ccce968c6a37ce5.zip
making libscp a real library
some fixes in configuration options
Diffstat (limited to 'sesman/session.c')
-rw-r--r--sesman/session.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/sesman/session.c b/sesman/session.c
index 95ab8488..868d82cc 100644
--- a/sesman/session.c
+++ b/sesman/session.c
@@ -217,7 +217,7 @@ for user %s denied", username);
/* we should need no more displays than this */
/* block all the threads running to enable forking */
- lock_fork_request();
+ scp_lock_fork_request();
while (x_server_running(display))
{
display++;
@@ -285,13 +285,18 @@ for user %s denied", username);
/* still a problem starting window manager just start xterm */
g_execlp3("xterm", "xterm", 0);
+
+ /* should not get here */
+ log_message(LOG_LEVEL_ALWAYS,"error starting xterm for user %s - pid %d",
+ username, g_getpid());
+ /* logging parameters */
+ /* no problem calling strerror for thread safety: other threads are blocked */
+ log_message(LOG_LEVEL_DEBUG, "errno: %d, description: %s", errno, g_get_strerror());
+ }
+ else
+ {
+ log_message(LOG_LEVEL_ERROR, "another Xserver is already active on display %d", display);
}
- /* should not get here */
- log_message(LOG_LEVEL_ALWAYS,"error starting xterm for user %s - pid %d",
- username, g_getpid());
- /* logging parameters */
- /* no problem calling strerror for thread safety: other threads are blocked */
- log_message(LOG_LEVEL_DEBUG, "errno: %d, description: %s", errno, g_get_strerror());
log_message(LOG_LEVEL_DEBUG,"aborting connection...");
g_exit(0);
}
@@ -318,9 +323,12 @@ for user %s denied", username);
list_add_item(xserver_params, (long)g_strdup(depth));
list_add_item(xserver_params, (long)g_strdup("-rfbauth"));
list_add_item(xserver_params, (long)g_strdup(passwd_file));
+
/* additional parameters from sesman.ini file */
- config_read_xserver_params(SESMAN_SESSION_TYPE_XVNC,
- xserver_params);
+ //config_read_xserver_params(SESMAN_SESSION_TYPE_XVNC,
+ // xserver_params);
+ list_append_list_strdup(g_cfg.vnc_params, xserver_params, 0);
+
/* make sure it ends with a zero */
list_add_item(xserver_params, 0);
pp1 = (char**)xserver_params->items;
@@ -337,9 +345,12 @@ for user %s denied", username);
list_add_item(xserver_params, (long)g_strdup(geometry));
list_add_item(xserver_params, (long)g_strdup("-depth"));
list_add_item(xserver_params, (long)g_strdup(depth));
+
/* additional parameters from sesman.ini file */
- config_read_xserver_params(SESMAN_SESSION_TYPE_XRDP,
- xserver_params);
+ //config_read_xserver_params(SESMAN_SESSION_TYPE_XRDP,
+ // xserver_params);
+ list_append_list_strdup(g_cfg.rdp_params, xserver_params, 0);
+
/* make sure it ends with a zero */
list_add_item(xserver_params, 0);
pp1 = (char**)xserver_params->items;
@@ -378,7 +389,7 @@ for user %s denied", username);
else /* parent sesman process */
{
/* let the other threads go on */
- lock_fork_release();
+ scp_lock_fork_release();
temp->item->pid = pid;
temp->item->display = display;