> Mmhmm seems to be performance issues...
> try to run sesman -nodaemon. It will tell you some more informations.
> Maybe you catch some timeouts waiting for Xvnc or something else...
> 
> --
> Nicola

Hi,

I've attached a horrible, hacky patch that seems to barely get the job done.  I 
am just falling back on trying the connect routine multiple times, which seems 
to work.

I hacked in some instrumentation and from what I can tell, the Xvnc server I am 
running has security level set to 2, and so in vnc.c, around line 896, it 
sometimes doesn't receive 4 bytes of data it is looking for during the first 
connect attempt.  The server is Xvnc version XF4VNC-4.4.0.0 apparently from 
http://xf4vnc.sf.net and the server is SLES 10.3.

  if (error == 0 && check_sec_result)
  {
    /* sec result */
    init_stream(s, 8192);
    error = lib_recv(v, s->data, 4);  // <---- I think it fails right here, but 
why only the 1st time?  s->data is blank or perhaps a newline.
    if (error == 0)
    {
      in_uint32_be(s, i);
      if (i != 0)
      {
        v->server_msg(v, "password failed", 0);
        error = 2;
      }
      else
      {
        v->server_msg(v, "password ok", 0);
      }
    }
  }


--- xrdp.orig/vnc/vnc.c 2010-08-17 10:44:31.000000000 -0500
+++ xrdp/vnc/vnc.c      2010-08-17 13:58:08.000000000 -0500
@@ -1188,13 +1188,25 @@
 mod_init(void)
 {
   struct vnc* v;
+  int i;
+  int MAXTRIES = 3;
+  int SLEEPTIME = 3;
 
   v = (struct vnc*)g_malloc(sizeof(struct vnc), 1);
   /* set client functions */
   v->size = sizeof(struct vnc);
   v->version = CURRENT_MOD_VER;
   v->handle = (long)v;
-  v->mod_connect = lib_mod_connect;
+
+  // hack hack hack try a few times since one try never seems to be enough
+  for (i=0; i<MAXTRIES; i++) {
+    v->mod_connect = lib_mod_connect;
+    if(v->mod_connect == 0) {  // Is this the correct status to look for?
+      break;
+    }
+    sleep(SLEEPTIME);
+  }
+
   v->mod_start = lib_mod_start;
   v->mod_event = lib_mod_event;
   v->mod_signal = lib_mod_signal;

Thank you.

Regards,
Rich

 
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
xrdp-devel mailing list
xrdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xrdp-devel

Reply via email to