From edf5971cefc98695503dca3fee2d47cd849e56c3 Mon Sep 17 00:00:00 2001 From: Laxmikant Rashinkar Date: Fri, 9 Nov 2012 19:55:21 -0800 Subject: o in login dialog set sesman-X11rdp as the default module o added support for video redirection without using TSMF --- xrdpapi/simple.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'xrdpapi/simple.c') diff --git a/xrdpapi/simple.c b/xrdpapi/simple.c index e6f5bd16..afe1a22c 100644 --- a/xrdpapi/simple.c +++ b/xrdpapi/simple.c @@ -101,6 +101,7 @@ run_echo_test() /* open a virtual channel named ECHO */ channel = WTSVirtualChannelOpenEx(WTS_CURRENT_SESSION, "ECHO", WTS_CHANNEL_OPTION_DYNAMIC_PRI_LOW); + if (channel == NULL) { printf("### WTSVirtualChannelOpenEx() failed!\n"); @@ -117,6 +118,7 @@ run_echo_test() /* write data to virtual channel */ count = (bytes_left > 1700) ? 1700 : bytes_left; rv = WTSVirtualChannelWrite(channel, wr_ptr, count, &bytes_written); + if ((rv == 0) || (bytes_written == 0)) { printf("### WTSVirtualChannelWrite() failed\n"); @@ -129,6 +131,7 @@ run_echo_test() { /* read back the echo */ rv = WTSVirtualChannelRead(channel, 5000, in_buf, count, &bytes_read); + if ((rv == 0) || (bytes_read == 0)) { printf("### WTSVirtualChannelRead() failed\n"); @@ -145,6 +148,7 @@ run_echo_test() return -1; } } + count -= bytes_read; } @@ -153,26 +157,27 @@ run_echo_test() printf("### pkt %d passed echo test\n", pkt_count++); } - WTSVirtualChannelClose(channel); - return 0; + WTSVirtualChannelClose(channel); + return 0; } int run_tsmf_test() { - void *channel; + void *channel; printf("this test not yet implemented!\n"); return 1; /* open virtual channel */ channel = WTSVirtualChannelOpenEx(WTS_CURRENT_SESSION, "TSMF", WTS_CHANNEL_OPTION_DYNAMIC_PRI_LOW); + if (channel == NULL) { printf("### WTSVirtualChannelOpenEx() failed!\n"); return 1; } - WTSVirtualChannelClose(channel); - return 0; + WTSVirtualChannelClose(channel); + return 0; } -- cgit v1.2.1