diff options
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/chansrv/chansrv.c | 3 | ||||
-rw-r--r-- | sesman/chansrv/clipboard.c | 5 | ||||
-rw-r--r-- | sesman/chansrv/sound.c | 12 |
3 files changed, 20 insertions, 0 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index 7b4bf0b5..35913a8c 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -222,6 +222,7 @@ g_is_term(void) { return g_is_wait_obj_set(g_term_event); } +// #define ENABLE_CHANSERV_DEBUG_LOGGING #if 0 #include <stdio.h> @@ -229,6 +230,7 @@ g_is_term(void) #include <stdarg.h> void dprint(const char *fmt, ...) { +#ifdef ENABLE_CHANSERV_DEBUG_LOGGING va_list argp; va_start(argp, fmt); char debug[1024]; @@ -240,6 +242,7 @@ void dprint(const char *fmt, ...) fclose(fp); } va_end(argp); +#endif } #undef LOG #define LOG(_a, _params) \ diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 5f01f241..3556933a 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -371,6 +371,11 @@ clipboard_init(void) { return 0; } + if (!g_display) + { + // prevent crash in XInternAtom + return 3; + } xfuse_init(); xcommon_init(); diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index e2b6f53b..4bab49aa 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -30,6 +30,8 @@ #include "file_loc.h" #include "chansrv_common.h" +#include "libraptorsmiface.h" + #if defined(XRDP_OPUS) #include <opus/opus.h> static OpusEncoder *g_opus_encoder = 0; @@ -215,6 +217,16 @@ static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans); static int APP_CC sound_start_source_listener(); static int APP_CC sound_start_sink_listener(); +//#if 0 +void dprint(const char *fmt, ...); +#undef LOG +#define LOG(_a, _params) \ +{ \ + dprint _params; \ + dprint("\n"); \ +} +//#endif + /*****************************************************************************/ static int APP_CC sound_send_server_output_formats(void) |