2010/6/10 Nicola Ruggero <nic...@nxnt.org>:
> this patches are very light and they work very well but sometimes the
> session hangs during reconnection in this way:
> 1. I can see login windows
> 2. connecting to sesman ok
> 3. connecting (xup)
> 4. connected ok
> 5. it freezes a little bit here and then the connection closes itself :(
>
[CUT]
>
> What can I do? I thought to patch chansrv.c in this way:
>
[CUT]
>
> i'm still testing but not sure it will fix this strange behaviour... any idea?
>
> thanks,
> Nicola
>

This patch seems to solve my problem (again r280 of
svn://server1.xrdp.org/srv/svn/repos/main/x11rdp_xorg71):

--- trunk/prjVari/x11rdp_xorg71/xorg-server-X11R7.1-1.1.0/hw/rdp/rdpup.c        
2010/01/08
09:17:13        1825
+++ trunk/prjVari/x11rdp_xorg71/xorg-server-X11R7.1-1.1.0/hw/rdp/rdpup.c        
2010/06/14
10:18:53        2691
@@ -417,9 +417,29 @@
     }
     else
     {
-      rdpLog("rejecting connection, already got a connection\n");
+      rdpLog("resetting connection, already got a connection\n");
       g_sleep(10);
-      g_tcp_close(g_tcp_accept(g_listen_sck));
+      RemoveEnabledDevice(g_sck);
+      g_connected = 0;
+      g_tcp_close(g_sck);
+      g_sck = 0;
+      g_sck_closed = 1;
+
+      /* Retry connections */
+      g_sck = g_tcp_accept(g_listen_sck);
+      if (g_sck == -1)
+      {
+        g_sck = 0;
+      }
+      else
+      {
+        g_tcp_set_non_blocking(g_sck);
+        g_tcp_set_no_delay(g_sck);
+        g_connected = 1;
+        g_sck_closed = 0;
+        AddEnabledDevice(g_sck);
+      }
+
     }
   }
   if (sel & 2

Regards,
Nicola

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
xrdp-devel mailing list
xrdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xrdp-devel

Reply via email to