CVS: rdesktop rdp.c,1.94,1.95

Matt Chapman <[email protected]> Wed, 14 Jun 2006 01:59:05 -0700
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31366

Modified Files:
	rdp.c 
Log Message:
Windows Vista Beta 2 sends a disconnect PDU with reason 0 when reconnecting
to a disconnected session (I do not know if this is a bug or a feature).
Previously we would drop the connection.

I suspect that in general we shouldn't be dropping the connection in
response to the disconnect PDU; we should treat it as informative like the
logon PDU and just save the status.


Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** rdp.c	7 Apr 2006 14:41:34 -0000	1.94
--- rdp.c	14 Jun 2006 08:59:03 -0000	1.95
***************
*** 1294,1298 ****
  		case RDP_DATA_PDU_DISCONNECT:
  			process_disconnect_pdu(s, ext_disc_reason);
! 			return True;
  
  		default:
--- 1294,1304 ----
  		case RDP_DATA_PDU_DISCONNECT:
  			process_disconnect_pdu(s, ext_disc_reason);
! 
! 			/* We used to return true and disconnect immediately here, but
! 			 * Windows Vista sends a disconnect PDU with reason 0 when
! 			 * reconnecting to a disconnected session, and MSTSC doesn't
! 			 * drop the connection.  I think we should just save the status.
! 			 */
! 			break;
  
  		default: