From a45f993bfe74aed27245454f1ae32302b0528d9f Mon Sep 17 00:00:00 2001 From: norrarvid Date: Tue, 29 May 2012 12:46:56 +0200 Subject: [PATCH 1/4] added comments, added define, removed unused inparameter --- common/os_calls.c | 47 +++++++++++++++++++++++++--------------- common/trans.c | 2 +- common/trans.h | 2 +- sesman/chansrv/chansrv.c | 6 ++--- xrdp/xrdp.c | 41 ++++++++++++++++++++++++++++------- xrdp/xrdp.h | 2 +- xrdp/xrdp_listen.c | 31 ++++++++++++++++---------- xrdp/xrdp_mm.c | 8 ++++--- xrdp/xrdp_process.c | 2 +- xrdp/xrdpwin.c | 2 +- 10 files changed, 94 insertions(+), 49 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index 692dc015..eb5bdea5 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1055,28 +1055,39 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount, ptime = &time; } FD_ZERO(&rfds); - FD_ZERO(&wfds); - for (i = 0; i < rcount; i++) - { - sck = (int)(read_objs[i]); - if (sck > 0) { - FD_SET(sck, &rfds); - if (sck > max) - { - max = sck; + FD_ZERO(&wfds); + /*Find the highest descriptor number in read_obj */ + if(read_objs!=NULL){ + for (i = 0; i < rcount; i++) + { + sck = (int)(read_objs[i]); + if (sck > 0) { + FD_SET(sck, &rfds); + if (sck > max) + { + max = sck; /*max holds the highest socket/descriptor number */ + } } } + }else if(rcount>0){ + g_writeln("Programming error read_objs is null"); + return 1; /*error*/ } - for (i = 0; i < wcount; i++) - { - sck = (int)(write_objs[i]); - if (sck > 0) { - FD_SET(sck, &wfds); - if (sck > max) - { - max = sck; + if(write_objs!=NULL){ + for (i = 0; i < wcount; i++) + { + sck = (int)(write_objs[i]); + if (sck > 0) { + FD_SET(sck, &wfds); + if (sck > max) + { + max = sck; /*max holds the highest socket/descriptor number */ + } } } + }else if(wcount>0){ + g_writeln("Programming error write_objs is null"); + return 1; /*error*/ } res = select(max + 1, &rfds, &wfds, 0, ptime); if (res < 0) @@ -1089,7 +1100,7 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount, { return 0; } - return 1; + return 1; /*error*/ } return 0; #endif diff --git a/common/trans.c b/common/trans.c index 377b90ba..6b762d00 100644 --- a/common/trans.c +++ b/common/trans.c @@ -69,7 +69,7 @@ trans_delete(struct trans* self) /*****************************************************************************/ int APP_CC -trans_get_wait_objs(struct trans* self, tbus* objs, int* count, int* timeout) +trans_get_wait_objs(struct trans* self, tbus* objs, int* count) { if (self == 0) { diff --git a/common/trans.h b/common/trans.h index bb0f42c0..8e8d942a 100644 --- a/common/trans.h +++ b/common/trans.h @@ -64,7 +64,7 @@ trans_create(int mode, int in_size, int out_size); void APP_CC trans_delete(struct trans* self); int APP_CC -trans_get_wait_objs(struct trans* self, tbus* objs, int* count, int* timeout); +trans_get_wait_objs(struct trans* self, tbus* objs, int* count); int APP_CC trans_check_wait_objs(struct trans* self); int APP_CC diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c index f2ca961d..e9d596cf 100644 --- a/sesman/chansrv/chansrv.c +++ b/sesman/chansrv/chansrv.c @@ -447,7 +447,7 @@ channel_thread_loop(void* in_val) num_objs = 0; objs[num_objs] = g_term_event; num_objs++; - trans_get_wait_objs(g_lis_trans, objs, &num_objs, &timeout); + trans_get_wait_objs(g_lis_trans, objs, &num_objs); while (g_obj_wait(objs, num_objs, 0, 0, timeout) == 0) { if (g_is_wait_obj_set(g_term_event)) @@ -492,8 +492,8 @@ channel_thread_loop(void* in_val) num_objs = 0; objs[num_objs] = g_term_event; num_objs++; - trans_get_wait_objs(g_lis_trans, objs, &num_objs, &timeout); - trans_get_wait_objs(g_con_trans, objs, &num_objs, &timeout); + trans_get_wait_objs(g_lis_trans, objs, &num_objs); + trans_get_wait_objs(g_con_trans, objs, &num_objs); clipboard_get_wait_objs(objs, &num_objs, &timeout); sound_get_wait_objs(objs, &num_objs, &timeout); dev_redir_get_wait_objs(objs, &num_objs, &timeout); diff --git a/xrdp/xrdp.c b/xrdp/xrdp.c index fb8dfbc0..9fc10df6 100644 --- a/xrdp/xrdp.c +++ b/xrdp/xrdp.c @@ -22,6 +22,8 @@ #include "xrdp.h" +#define THREAD_WAITING 100 + static struct xrdp_listen* g_listen = 0; static long g_threadid = 0; /* main threadid */ @@ -37,6 +39,9 @@ static long g_sync_param2 = 0; static long (*g_sync_func)(long param1, long param2); /*****************************************************************************/ +/* This function is used to run a function from the main thread. + Sync_func is the function pointer that will run from main thread + The function can have two long in parameters and must return long */ long APP_CC g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_param2) @@ -44,31 +49,45 @@ g_xrdp_sync(long (*sync_func)(long param1, long param2), long sync_param1, long sync_result; int sync_command; + /* If the function is called from the main thread, the function can + * be called directly. g_threadid= main thread ID*/ if (tc_threadid_equal(tc_get_threadid(), g_threadid)) { /* this is the main thread, call the function directly */ sync_result = sync_func(sync_param1, sync_param2); + /*g_writeln("g_xrdp_sync processed IN main thread -> continue");*/ } else { + /* All threads have to wait here until the main thread + * process the function. g_process_waiting_function() is called + * from the listening thread. g_process_waiting_function() process the function*/ tc_mutex_lock(g_sync1_mutex); tc_mutex_lock(g_sync_mutex); g_sync_param1 = sync_param1; g_sync_param2 = sync_param2; g_sync_func = sync_func; - g_sync_command = 100; + /* set a value THREAD_WAITING so the g_process_waiting_function function + * know if any function must be processed */ + g_sync_command = THREAD_WAITING; tc_mutex_unlock(g_sync_mutex); - g_set_wait_obj(g_sync_event); + /* set this event so that the main thread know if + * g_process_waiting_function() must be called */ + g_set_wait_obj(g_sync_event); do { g_sleep(100); tc_mutex_lock(g_sync_mutex); - sync_command = g_sync_command; + /* load new value from global to see if the g_process_waiting_function() + * function has processed the function */ + sync_command = g_sync_command; sync_result = g_sync_result; tc_mutex_unlock(g_sync_mutex); } - while (sync_command != 0); + while (sync_command != 0); /* loop until g_process_waiting_function() + * has processed the request*/ tc_mutex_unlock(g_sync1_mutex); + /*g_writeln("g_xrdp_sync processed BY main thread -> continue");*/ } return sync_result; } @@ -132,15 +151,17 @@ pipe_sig(int sig_num) } /*****************************************************************************/ +/*Some function must be called from the main thread. + if g_sync_command==THREAD_WAITING a function is waiting to be processed*/ void APP_CC -g_loop(void) +g_process_waiting_function(void) { tc_mutex_lock(g_sync_mutex); if (g_sync_command != 0) { if (g_sync_func != 0) { - if (g_sync_command == 100) + if (g_sync_command == THREAD_WAITING) { g_sync_result = g_sync_func(g_sync_param1, g_sync_param2); } @@ -426,12 +447,16 @@ main(int argc, char** argv) pid = g_getpid(); g_snprintf(text, 255, "xrdp_%8.8x_main_term", pid); g_term_event = g_create_wait_obj(text); - g_snprintf(text, 255, "xrdp_%8.8x_main_sync", pid); - g_sync_event = g_create_wait_obj(text); if (g_term_event == 0) { g_writeln("error creating g_term_event"); } + g_snprintf(text, 255, "xrdp_%8.8x_main_sync", pid); + g_sync_event = g_create_wait_obj(text); + if (g_sync_event == 0) + { + g_writeln("error creating g_sync_event"); + } xrdp_listen_main_loop(g_listen, startup_params); xrdp_listen_delete(g_listen); tc_mutex_delete(g_sync_mutex); diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index 9b280bfc..6c15ed8d 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -52,7 +52,7 @@ g_get_term_event(void); tbus APP_CC g_get_sync_event(void); void APP_CC -g_loop(void); +g_process_waiting_function(void); /* xrdp_cache.c */ struct xrdp_cache* APP_CC diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c index 23f532a8..18aed34f 100644 --- a/xrdp/xrdp_listen.c +++ b/xrdp/xrdp_listen.c @@ -39,6 +39,10 @@ xrdp_listen_create(void) self = (struct xrdp_listen*)g_malloc(sizeof(struct xrdp_listen), 1); g_snprintf(text, 255, "xrdp_%8.8x_listen_pro_done_event", pid); self->pro_done_event = g_create_wait_obj(text); + if(self->pro_done_event == 0) + { + g_writeln("Failure creating pro_done_event"); + } self->process_list = list_create(); if (g_process_sem == 0) { @@ -237,7 +241,7 @@ xrdp_listen_main_loop(struct xrdp_listen* self, { self->listen_trans->trans_conn_in = xrdp_listen_conn_in; self->listen_trans->callback_data = self; - term_obj = g_get_term_event(); + term_obj = g_get_term_event(); /*Global termination event */ sync_obj = g_get_sync_event(); done_obj = self->pro_done_event; cont = 1; @@ -249,31 +253,33 @@ xrdp_listen_main_loop(struct xrdp_listen* self, robjs[robjs_count++] = sync_obj; robjs[robjs_count++] = done_obj; timeout = -1; - if (trans_get_wait_objs(self->listen_trans, robjs, &robjs_count, - &timeout) != 0) + if (trans_get_wait_objs(self->listen_trans, robjs, &robjs_count) != 0) { + g_writeln("Listening socket is in wrong state we terminate listener") ; break; } - /* wait */ + /* wait - timeout -1 means wait indefinitely*/ if (g_obj_wait(robjs, robjs_count, 0, 0, timeout) != 0) { /* error, should not get here */ g_sleep(100); } - if (g_is_wait_obj_set(term_obj)) /* term */ + if (g_is_wait_obj_set(term_obj)) /* termination called */ { break; } - if (g_is_wait_obj_set(sync_obj)) /* sync */ + if (g_is_wait_obj_set(sync_obj)) /* some function must be processed by this thread */ { g_reset_wait_obj(sync_obj); - g_loop(); + g_process_waiting_function(); /* run the function */ } if (g_is_wait_obj_set(done_obj)) /* pro_done_event */ { - g_reset_wait_obj(done_obj); + g_reset_wait_obj(done_obj); + /* a process has died remove it from lists*/ xrdp_listen_delete_done_pro(self); } + /* Run the callback when accept() returns a new socket*/ if (trans_check_wait_objs(self->listen_trans) != 0) { break; @@ -290,20 +296,21 @@ xrdp_listen_main_loop(struct xrdp_listen* self, { break; } + timeout = -1; /* build the wait obj list */ robjs_count = 0; robjs[robjs_count++] = sync_obj; robjs[robjs_count++] = done_obj; - /* wait */ - if (g_obj_wait(robjs, robjs_count, 0, 0, -1) != 0) + /* wait - timeout -1 means wait indefinitely*/ + if (g_obj_wait(robjs, robjs_count, 0, 0, timeout) != 0) { /* error, should not get here */ g_sleep(100); } - if (g_is_wait_obj_set(sync_obj)) /* sync */ + if (g_is_wait_obj_set(sync_obj)) /* some function must be processed by this thread */ { g_reset_wait_obj(sync_obj); - g_loop(); + g_process_waiting_function(); /* run the function that is waiting*/ } if (g_is_wait_obj_set(done_obj)) /* pro_done_event */ { diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 223b128b..2d14351f 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -62,6 +62,7 @@ xrdp_mm_sync_load(long param1, long param2) static void APP_CC xrdp_mm_module_cleanup(struct xrdp_mm* self) { + g_writeln("xrdp_mm_module_cleanup"); if (self->mod != 0) { if (self->mod_exit != 0) @@ -72,7 +73,7 @@ xrdp_mm_module_cleanup(struct xrdp_mm* self) } if (self->mod_handle != 0) { - /* main thread unload */ + /* Let the main thread unload the module.*/ g_xrdp_sync(xrdp_mm_sync_unload, self->mod_handle, 0); } trans_delete(self->chan_trans); @@ -280,6 +281,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) } if (self->mod_handle == 0) { + /* Let the main thread load the lib,*/ self->mod_handle = g_xrdp_sync(xrdp_mm_sync_load, (long)lib, 0); if (self->mod_handle != 0) { @@ -1084,11 +1086,11 @@ xrdp_mm_get_wait_objs(struct xrdp_mm* self, rv = 0; if ((self->sesman_trans != 0) && self->sesman_trans_up) { - trans_get_wait_objs(self->sesman_trans, read_objs, rcount, timeout); + trans_get_wait_objs(self->sesman_trans, read_objs, rcount); } if ((self->chan_trans != 0) && self->chan_trans_up) { - trans_get_wait_objs(self->chan_trans, read_objs, rcount, timeout); + trans_get_wait_objs(self->chan_trans, read_objs, rcount); } if (self->mod != 0) { diff --git a/xrdp/xrdp_process.c b/xrdp/xrdp_process.c index 905db928..869cfd34 100644 --- a/xrdp/xrdp_process.c +++ b/xrdp/xrdp_process.c @@ -161,7 +161,7 @@ xrdp_process_main_loop(struct xrdp_process* self) robjs[robjs_count++] = self->self_term_event; xrdp_wm_get_wait_objs(self->wm, robjs, &robjs_count, wobjs, &wobjs_count, &timeout); - trans_get_wait_objs(self->server_trans, robjs, &robjs_count, &timeout); + trans_get_wait_objs(self->server_trans, robjs, &robjs_count); /* wait */ if (g_obj_wait(robjs, robjs_count, wobjs, wobjs_count, timeout) != 0) { diff --git a/xrdp/xrdpwin.c b/xrdp/xrdpwin.c index d2c2d0f3..849f7112 100644 --- a/xrdp/xrdpwin.c +++ b/xrdp/xrdpwin.c @@ -140,7 +140,7 @@ pipe_sig(int sig_num) /*****************************************************************************/ void APP_CC -g_loop(void) +g_process_waiting_function(void) { tc_mutex_lock(g_sync_mutex); if (g_sync_command != 0) From 02f3fe1e2a2f971246d7775468425636a05e6246 Mon Sep 17 00:00:00 2001 From: norrarvid Date: Wed, 30 May 2012 07:40:06 +0200 Subject: [PATCH 2/4] Improved error handling for module load and init, fixed bug in logwindow --- common/os_calls.c | 25 +++++++++++++++++++++++++ common/os_calls.h | 2 ++ xrdp/xrdp_mm.c | 11 ++++++++++- xrdp/xrdp_types.h | 2 ++ xrdp/xrdp_wm.c | 17 ++++++++++++++++- 5 files changed, 55 insertions(+), 2 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index 80e5bad3..ae48fc94 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1579,7 +1579,32 @@ g_strdup(const char* in) } return p; } +/*****************************************************************************/ +/* if in = 0, return 0 else return newly alloced copy of input string + * if the input string is larger than maxlen the returned string will be + * truncated. All strings returned will include null termination*/ +char* APP_CC +g_strndup(const char* in, const unsigned int maxlen) +{ + int len; + char* p; + if (in == 0) + { + return 0; + } + len = g_strlen(in); + if(len>maxlen) + { + len = maxlen-1 ; + } + p = (char*)g_malloc(len + 2, 0); + if (p != NULL) + { + g_strncpy(p, in,len+1); + } + return p; +} /*****************************************************************************/ int APP_CC g_strcmp(const char* c1, const char* c2) diff --git a/common/os_calls.h b/common/os_calls.h index ddcb59d8..7be659d6 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -178,6 +178,8 @@ char* APP_CC g_strcat(char* dest, const char* src); char* APP_CC g_strdup(const char* in); +char* APP_CC +g_strndup(const char* in, const unsigned int maxlen); int APP_CC g_strcmp(const char* c1, const char* c2); int APP_CC diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 2d14351f..5c8d325f 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -305,7 +305,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) if (func == 0) { g_snprintf(text, 255, "error finding proc mod_exit in %s, not a valid " - "xrdp backend", lib); + "xrdp backend", lib); xrdp_wm_log_msg(self->wm, text); } self->mod_exit = (int (*)(struct xrdp_mod*))func; @@ -317,6 +317,8 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) g_writeln("loaded module '%s' ok, interface size %d, version %d", lib, self->mod->size, self->mod->version); } + }else{ + g_writeln("no mod_init or mod_exit address found") ; } } else @@ -324,6 +326,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) 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); + return 1 ; } if (self->mod != 0) { @@ -1043,20 +1046,25 @@ xrdp_mm_connect(struct xrdp_mm* self) if (xrdp_mm_setup_mod2(self) == 0) { xrdp_wm_set_login_mode(self->wm, 10); + rv = 0 ; /*sucess*/ } else { /* connect error */ g_snprintf(errstr, 255, "Failure to connect to: %s port: %s", ip, port); + g_writeln(errstr); xrdp_wm_log_msg(self->wm, errstr); rv = 1 ; /* failure */ } + }else{ + g_writeln("Failure setting up module"); } if (self->wm->login_mode != 10) { xrdp_wm_set_login_mode(self->wm, 11); xrdp_mm_module_cleanup(self); + rv = 1 ; /* failure */ } } self->sesman_controlled = use_sesman; @@ -1067,6 +1075,7 @@ xrdp_mm_connect(struct xrdp_mm* self) /* if sesman controlled, this will connect later */ xrdp_mm_connect_chansrv(self, "", chansrvport); } + g_writeln("returnvalue from xrdp_mm_connect %d",rv); return rv; } diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 0366fd83..1e833d16 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -19,6 +19,8 @@ types */ +#define DEFAULT_STRING_LEN 255 +#define LOG_WINDOW_CHAR_PER_LINE 60 /* lib */ struct xrdp_mod diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 3f9d3c6e..14af31ed 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1556,6 +1556,21 @@ xrdp_wm_log_wnd_notify(struct xrdp_bitmap* wnd, return 0; } + void add_string_to_logwindow(char *msg,struct list* log) + { + + char *new_part_message; + char *current_pointer = msg ; + int processedlen ; + do{ + new_part_message = g_strndup(current_pointer,LOG_WINDOW_CHAR_PER_LINE) ; + g_writeln(new_part_message); + list_add_item(log, (long)new_part_message); + processedlen = processedlen + g_strlen(new_part_message); + current_pointer = current_pointer + g_strlen(new_part_message) ; + }while((processedlenlog, (long)g_strdup(msg)); + add_string_to_logwindow(msg,self->log); if (self->log_wnd == 0) { w = DEFAULT_WND_LOG_W; From 048154ccefa549e94292473b4b7e8ea0a29fcefa Mon Sep 17 00:00:00 2001 From: norrarvid Date: Mon, 4 Jun 2012 14:06:09 +0200 Subject: [PATCH 3/4] missing init of variable added --- xrdp/xrdp_wm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 14af31ed..c486f67b 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1561,7 +1561,7 @@ xrdp_wm_log_wnd_notify(struct xrdp_bitmap* wnd, char *new_part_message; char *current_pointer = msg ; - int processedlen ; + int processedlen = 0; do{ new_part_message = g_strndup(current_pointer,LOG_WINDOW_CHAR_PER_LINE) ; g_writeln(new_part_message); From 31a5dd33ddfa86e195469dff776e7ca1cf4d7b06 Mon Sep 17 00:00:00 2001 From: norrarvid Date: Mon, 18 Jun 2012 08:11:26 +0200 Subject: [PATCH 4/4] minor layout fixes --- common/os_calls.c | 18 +++++++++++------- xrdp/xrdp_listen.c | 2 +- xrdp/xrdp_mm.c | 6 +++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/common/os_calls.c b/common/os_calls.c index ae48fc94..2a97fc69 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -1079,13 +1079,15 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount, FD_SET(sck, &rfds); if (sck > max) { - max = sck; /*max holds the highest socket/descriptor number */ + max = sck; /*max holds the highest socket/descriptor number */ } } } - }else if(rcount>0){ - g_writeln("Programming error read_objs is null"); - return 1; /*error*/ + } + else if(rcount>0) + { + g_writeln("Programming error read_objs is null"); + return 1; /*error*/ } if(write_objs!=NULL){ for (i = 0; i < wcount; i++) @@ -1099,9 +1101,11 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount, } } } - }else if(wcount>0){ - g_writeln("Programming error write_objs is null"); - return 1; /*error*/ + } + else if(wcount>0) + { + g_writeln("Programming error write_objs is null"); + return 1; /*error*/ } res = select(max + 1, &rfds, &wfds, 0, ptime); if (res < 0) diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c index b79ce1c2..0270d337 100644 --- a/xrdp/xrdp_listen.c +++ b/xrdp/xrdp_listen.c @@ -334,7 +334,7 @@ xrdp_listen_main_loop(struct xrdp_listen* self) if (g_is_wait_obj_set(done_obj)) /* pro_done_event */ { g_reset_wait_obj(done_obj); - /* a process has died remove it from lists*/ + /* a process has died remove it from lists*/ xrdp_listen_delete_done_pro(self); } /* Run the callback when accept() returns a new socket*/ diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 5c8d325f..84a4a851 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -305,7 +305,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) if (func == 0) { g_snprintf(text, 255, "error finding proc mod_exit in %s, not a valid " - "xrdp backend", lib); + "xrdp backend", lib); xrdp_wm_log_msg(self->wm, text); } self->mod_exit = (int (*)(struct xrdp_mod*))func; @@ -318,7 +318,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm* self) self->mod->size, self->mod->version); } }else{ - g_writeln("no mod_init or mod_exit address found") ; + g_writeln("no mod_init or mod_exit address found"); } } else @@ -1058,7 +1058,7 @@ xrdp_mm_connect(struct xrdp_mm* self) rv = 1 ; /* failure */ } }else{ - g_writeln("Failure setting up module"); + g_writeln("Failure setting up module"); } if (self->wm->login_mode != 10) {