summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freerdp1/Makefile.am10
-rw-r--r--freerdp1/xrdp-freerdp.c7
-rw-r--r--libxrdp/libxrdp.c2
-rw-r--r--libxrdp/xrdp_mcs.c2
-rw-r--r--libxrdp/xrdp_rdp.c2
-rw-r--r--rdp/Makefile.am10
-rw-r--r--xrdp/xrdp.c6
7 files changed, 34 insertions, 5 deletions
diff --git a/freerdp1/Makefile.am b/freerdp1/Makefile.am
index 494e5c04..d1d49440 100644
--- a/freerdp1/Makefile.am
+++ b/freerdp1/Makefile.am
@@ -1,10 +1,18 @@
EXTRA_DIST = xrdp-freerdp.h
+EXTRA_DEFINES =
+
+if XRDP_DEBUG
+EXTRA_DEFINES += -DXRDP_DEBUG
+else
+EXTRA_DEFINES += -DXRDP_NODEBUG
+endif
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
- -DXRDP_PID_PATH=\"${localstatedir}/run\"
+ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
+ $(EXTRA_DEFINES)
INCLUDES = \
-I$(top_srcdir)/common \
diff --git a/freerdp1/xrdp-freerdp.c b/freerdp1/xrdp-freerdp.c
index a44ca627..f50e22fa 100644
--- a/freerdp1/xrdp-freerdp.c
+++ b/freerdp1/xrdp-freerdp.c
@@ -21,7 +21,12 @@
#include "xrdp-color.h"
#include "xrdp_rail.h"
-#define LOG_LEVEL 1
+#ifdef XRDP_DEBUG
+#define LOG_LEVEL 99
+#else
+#define LOG_LEVEL 0
+#endif
+
#define LLOG(_level, _args) \
do { if (_level < LOG_LEVEL) { g_write _args ; } } while (0)
#define LLOGLN(_level, _args) \
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c
index a391b93b..d4c9d372 100644
--- a/libxrdp/libxrdp.c
+++ b/libxrdp/libxrdp.c
@@ -744,6 +744,7 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
if (index < 0 || index >= count)
{
+ DEBUG(("libxrdp_query_channel - Channel out of range %d", index));
return 1;
}
@@ -760,6 +761,7 @@ libxrdp_query_channel(struct xrdp_session *session, int index,
if (channel_name != 0)
{
g_strncpy(channel_name, channel_item->name, 8);
+ DEBUG(("libxrdp_query_channel - Channel %d name %s", index, channel_name));
}
if (channel_flags != 0)
diff --git a/libxrdp/xrdp_mcs.c b/libxrdp/xrdp_mcs.c
index a2793960..77c0d10d 100644
--- a/libxrdp/xrdp_mcs.c
+++ b/libxrdp/xrdp_mcs.c
@@ -144,9 +144,9 @@ xrdp_mcs_recv(struct xrdp_mcs *self, struct stream *s, int *chan)
/* this is channels getting added from the client */
if (appid == MCS_CJRQ)
{
- g_writeln("channel join request received");
in_uint16_be(s, userid);
in_uint16_be(s, chanid);
+ g_writeln("channel join request received %d:%d", userid, chanid);
DEBUG(("xrdp_mcs_recv adding channel %4.4x", chanid));
if (xrdp_mcs_send_cjcf(self, userid, chanid) != 0)
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index defc7624..44a7ac57 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -454,7 +454,7 @@ xrdp_rdp_send_data(struct xrdp_rdp *self, struct stream *s,
}
else
{
- g_writeln("mppc_encode not ok");
+ g_writeln("mppc_encode not ok: type %d flags %d", mppc_enc->protocol_type, mppc_enc->flags);
}
}
diff --git a/rdp/Makefile.am b/rdp/Makefile.am
index 6f698d29..9b519d7c 100644
--- a/rdp/Makefile.am
+++ b/rdp/Makefile.am
@@ -1,10 +1,18 @@
EXTRA_DIST = rdp.h
+EXTRA_DEFINES =
+
+if XRDP_DEBUG
+EXTRA_DEFINES += -DXRDP_DEBUG
+else
+EXTRA_DEFINES += -DXRDP_NODEBUG
+endif
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
-DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \
- -DXRDP_PID_PATH=\"${localstatedir}/run\"
+ -DXRDP_PID_PATH=\"${localstatedir}/run\" \
+ $(EXTRA_DEFINES)
INCLUDES = \
-I$(top_srcdir)/common
diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c
index 0da7a101..fb6fd5dd 100644
--- a/xrdp/xrdp.c
+++ b/xrdp/xrdp.c
@@ -305,6 +305,12 @@ main(int argc, char **argv)
g_init("xrdp");
ssl_init();
+
+ for (test=0;test<argc; test++)
+ {
+ DEBUG(("Argument %i - %s",test,argv[test]));
+ }
+
/* check compiled endian with actual endian */
test = 1;
host_be = !((int)(*(unsigned char *)(&test)));