From 4b802ae8dd102ee8bab5b3af77438060c4525ef9 Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Sun, 14 Jan 2007 05:04:00 +0000 Subject: [PATCH] setup is_term callback function --- xrdp/xrdp_process.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xrdp/xrdp_process.c b/xrdp/xrdp_process.c index ef63f3cd..dd217faf 100644 --- a/xrdp/xrdp_process.c +++ b/xrdp/xrdp_process.c @@ -66,6 +66,15 @@ xrdp_process_loop(struct xrdp_process* self) return rv; } +/*****************************************************************************/ +/* returns boolean */ +/* this is so libxrdp.so can known when to quit looping */ +static int DEFAULT_CC +xrdp_is_term(void) +{ + return g_is_term(); +} + /*****************************************************************************/ int APP_CC xrdp_process_main_loop(struct xrdp_process* self) @@ -74,7 +83,10 @@ xrdp_process_main_loop(struct xrdp_process* self) self->status = 1; self->session = libxrdp_init((long)self, self->sck); + /* this callback function is in xrdp_wm.c */ self->session->callback = callback; + /* this function is just above */ + self->session->is_term = xrdp_is_term; g_tcp_set_non_blocking(self->sck); g_tcp_set_no_delay(self->sck); if (libxrdp_process_incomming(self->session) == 0)