summaryrefslogtreecommitdiffstats
path: root/xrdp
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2009-08-05 06:16:05 +0000
committerjsorg71 <jsorg71>2009-08-05 06:16:05 +0000
commiteeac7c938a7602f4e471181aa62b18c206105de8 (patch)
tree8aefb09f38b9215394baf9806841c07203994177 /xrdp
parent3cfea6a9596269cf1a0e308ea6653905fa3702bb (diff)
downloadxrdp-proprietary-eeac7c938a7602f4e471181aa62b18c206105de8.tar.gz
xrdp-proprietary-eeac7c938a7602f4e471181aa62b18c206105de8.zip
add extended log output
Diffstat (limited to 'xrdp')
-rw-r--r--xrdp/xrdp_bitmap.c6
-rw-r--r--xrdp/xrdp_font.c2
-rw-r--r--xrdp/xrdp_login_wnd.c4
-rw-r--r--xrdp/xrdp_mm.c15
-rw-r--r--xrdp/xrdp_wm.c10
5 files changed, 32 insertions, 5 deletions
diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c
index 11a3a402..1aeda6fd 100644
--- a/xrdp/xrdp_bitmap.c
+++ b/xrdp/xrdp_bitmap.c
@@ -448,6 +448,12 @@ xrdp_bitmap_load(struct xrdp_bitmap* self, const char* filename, int* palette)
}
g_file_close(fd);
}
+ else
+ {
+ g_writeln("xrdp_bitmap_load: error loading bitmap from file [%s]",
+ filename);
+ return 1;
+ }
free_stream(s);
return 0;
}
diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c
index 55f928ba..783d8225 100644
--- a/xrdp/xrdp_font.c
+++ b/xrdp/xrdp_font.c
@@ -88,6 +88,8 @@ xrdp_font_create(struct xrdp_wm* wm)
file_size = g_file_get_size(file_path);
if (file_size < 1)
{
+ g_writeln("xrdp_font_create: error reading font from file [%s]",
+ file_path);
return 0;
}
self = (struct xrdp_font*)g_malloc(sizeof(struct xrdp_font), 1);
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c
index 6ac8e11d..989c2667 100644
--- a/xrdp/xrdp_login_wnd.c
+++ b/xrdp/xrdp_login_wnd.c
@@ -401,6 +401,10 @@ xrdp_wm_login_fill_in_combo(struct xrdp_wm* self, struct xrdp_bitmap* b)
section_values->auto_free = 1;
g_snprintf(cfg_file, 255, "%s/xrdp.ini", XRDP_CFG_PATH);
fd = g_file_open(cfg_file); /* xrdp.ini */
+ if (fd < 1)
+ {
+ g_writeln("Could not read xrdp ini file %s", cfg_file);
+ }
file_read_sections(fd, sections);
for (i = 0; i < sections->count; i++)
{
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 7d41a2aa..901b49af 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -309,13 +309,15 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self)
lib[0] = 0;
if (xrdp_mm_get_lib(self, lib, 255) != 0)
{
- g_snprintf(text, 255, "error finding lib");
+ g_snprintf(text, 255, "no library name specified in xrdp.ini, please add "
+ "lib=libxrdp-vnc.so or similar");
xrdp_wm_log_msg(self->wm, text);
return 1;
}
if (lib[0] == 0)
{
- g_snprintf(text, 255, "error finding lib");
+ g_snprintf(text, 255, "empty library name specified in xrdp.ini, please "
+ "add lib=libxrdp-vnc.so or similar");
xrdp_wm_log_msg(self->wm, text);
return 1;
}
@@ -331,7 +333,8 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self)
}
if (func == 0)
{
- g_snprintf(text, 255, "error finding proc mod_init in %s", lib);
+ g_snprintf(text, 255, "error finding proc mod_init in %s, not a valid "
+ "xrdp backend", lib);
xrdp_wm_log_msg(self->wm, text);
}
self->mod_init = (struct xrdp_mod* (*)(void))func;
@@ -342,7 +345,8 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self)
}
if (func == 0)
{
- g_snprintf(text, 255, "error finding proc mod_exit in %s", lib);
+ g_snprintf(text, 255, "error finding proc mod_exit in %s, not a valid "
+ "xrdp backend", lib);
xrdp_wm_log_msg(self->wm, text);
}
self->mod_exit = (int (*)(struct xrdp_mod*))func;
@@ -353,7 +357,8 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self)
}
else
{
- g_snprintf(text, 255, "error loading %s", lib);
+ g_snprintf(text, 255, "error loading %s specified in xrdp.ini, please "
+ "add a valid entry like lib=libxrdp-vnc.so or similar", lib);
xrdp_wm_log_msg(self->wm, text);
}
if (self->mod != 0)
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 4936cc70..1bdc961f 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -197,6 +197,12 @@ xrdp_wm_load_pointer(struct xrdp_wm* self, char* file_name, char* data,
make_stream(fs);
init_stream(fs, 8192);
fd = g_file_open(file_name);
+ if (fd < 1)
+ {
+ g_writeln("xrdp_wm_load_pointer: error loading pointer from file [%s]",
+ file_name);
+ return 1;
+ }
g_file_read(fd, fs->data, 8192);
g_file_close(fd);
in_uint8s(fs, 6);
@@ -440,6 +446,10 @@ xrdp_wm_init(struct xrdp_wm* self)
list_delete(values);
g_file_close(fd);
}
+ else
+ {
+ g_writeln("xrdp_wm_init: Could not read xrdp.ini file %s", cfg_file);
+ }
}
else
{