From d3cd9cb7e9650ee357f6322d5c2bfee8db21ab86 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Sun, 12 Oct 2014 21:55:04 -0700 Subject: Xorg: remove uds file on exit --- xorg/server/module/rdpInput.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'xorg/server/module') diff --git a/xorg/server/module/rdpInput.c b/xorg/server/module/rdpInput.c index f19b2947..2344f4a1 100644 --- a/xorg/server/module/rdpInput.c +++ b/xorg/server/module/rdpInput.c @@ -53,6 +53,7 @@ static struct input_proc_list g_input_proc[MAX_INPUT_PROC]; int rdpRegisterInputCallback(int type, rdpInputEventProcPtr proc) { + LLOGLN(0, ("rdpRegisterInputCallback: type %d proc %p", type, proc)); if (type == 0) { g_input_proc[0].proc = proc; @@ -73,12 +74,22 @@ int rdpUnregisterInputCallback(rdpInputEventProcPtr proc) { int index; + char text[256]; + LLOGLN(0, ("rdpUnregisterInputCallback: proc %p", proc)); for (index = 0; index < MAX_INPUT_PROC; index++) { if (g_input_proc[index].proc == proc) { - g_input_proc[index].proc = 0; + if (index == 0) + { + /* hack to cleanup + remove when xrdpdevTearDown is working */ + g_sprintf(text, "/tmp/.xrdp/xrdp_display_%s", display); + LLOGLN(0, ("rdpUnregisterInputCallback: deleting file %s", text)); + unlink(text); + } + g_input_proc[index].proc = 0; return 0; } } -- cgit v1.2.1