Bug#573258: Acknowledgement (xrdp does not reuse existing connections)

2010-03-11 Thread Vincent Bernat
OoO En  cette fin  de matinée  radieuse du mercredi  10 mars  2010, vers
11:28, Danny Baumann dannybaum...@web.de disait :

 I think I found the bug. When comparing the type of the new session to
 previous ones, different enum namespaces are used:

 - The type parameter of session_get_bydata is a SCP_SESSION_TYPE enum
 value
 - The type item of a single session list item is a SESMAN_SESSION_TYPE
 enum value (filled via calls to session_start)

 Attached is a patch for that bug which solves the problem for me. Might
 also be worth sending upstream, but the upstream bug tracker seems
 abandoned.

I have forwarded  your patch to upstream mailing list. I  did not get an
answer yet. I am uploading a new version to Debian.
-- 
printk(KERN_WARNING Warning: defective CD-ROM (volume sequence
number). Enabling \cruft\ mount option.\n);
2.2.16 /usr/src/linux/fs/isofs/inode.c


pgpgPZidAnOhR.pgp
Description: PGP signature


Bug#573258: Acknowledgement (xrdp does not reuse existing connections)

2010-03-10 Thread Danny Baumann
Hi,

I think I found the bug. When comparing the type of the new session to
previous ones, different enum namespaces are used:

- The type parameter of session_get_bydata is a SCP_SESSION_TYPE enum
value
- The type item of a single session list item is a SESMAN_SESSION_TYPE
enum value (filled via calls to session_start)

Attached is a patch for that bug which solves the problem for me. Might
also be worth sending upstream, but the upstream bug tracker seems
abandoned.

Regards,

Danny
Index: sesman/session.c
===
RCS file: /cvsroot/xrdp/xrdp/sesman/session.c,v
retrieving revision 1.38
diff -u -r1.38 session.c
--- sesman/session.c	26 Dec 2009 23:02:56 -	1.38
+++ sesman/session.c	10 Mar 2010 10:22:05 -
@@ -55,6 +55,19 @@
 {
   struct session_chain* tmp;
 
+  /* convert from SCP_SESSION_TYPE namespace to SESMAN_SESSION_TYPE namespace */
+  switch (type)
+  {
+case SCP_SESSION_TYPE_XVNC:
+  type = SESMAN_SESSION_TYPE_XVNC;
+  break;
+case SCP_SESSION_TYPE_XRDP:
+  type = SESMAN_SESSION_TYPE_XRDP;
+  break;
+default:
+  return 0;
+  }
+
   /*THREAD-FIX require chain lock */
   lock_chain_acquire();