CVS: rdesktop rdpdr.c,1.35,1.36 serial.c,1.15,1.16

Michael Gernoth <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29279

Modified Files:
	rdpdr.c serial.c 
Log Message:
Applied serial-fixes from Huang Yushuo <[email protected]>
Tested connection with ZOC and HyperTerm on Windows


Index: rdpdr.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdpdr.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** rdpdr.c	9 Aug 2004 13:50:40 -0000	1.35
--- rdpdr.c	24 Aug 2004 21:37:24 -0000	1.36
***************
*** 941,945 ****
  						/* or if result was 0 and status success - EOF      */
  						if ((iorq->partial_len == iorq->length) ||
! 						    (result == 0))
  						{
  #if WITH_DEBUG_RDP5
--- 941,946 ----
  						/* or if result was 0 and status success - EOF      */
  						if ((iorq->partial_len == iorq->length) ||
! 						    (g_rdpdr_device[iorq->device].device_type ==
! 						     DEVICE_TYPE_SERIAL) || (result == 0))
  						{
  #if WITH_DEBUG_RDP5

Index: serial.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/serial.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** serial.c	29 Apr 2004 19:41:49 -0000	1.15
--- serial.c	24 Aug 2004 21:37:25 -0000	1.16
***************
*** 375,379 ****
--- 375,381 ----
  		pser_inf = (SERIAL_DEVICE *) xmalloc(sizeof(SERIAL_DEVICE));
  		pser_inf->ptermios = (struct termios *) xmalloc(sizeof(struct termios));
+ 		memset(pser_inf->ptermios, 0, sizeof(struct termios));
  		pser_inf->pold_termios = (struct termios *) xmalloc(sizeof(struct termios));
+ 		memset(pser_inf->pold_termios, 0, sizeof(struct termios));
  
  		pos2 = next_arg(optarg, '=');
***************
*** 407,411 ****
  	pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;
  	ptermios = pser_inf->ptermios;
! 	serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY);
  
  	if (serial_fd == -1)
--- 409,413 ----
  	pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;
  	ptermios = pser_inf->ptermios;
! 	serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
  
  	if (serial_fd == -1)
***************
*** 438,441 ****
--- 440,444 ----
  */
  
+ 	cfmakeraw(pser_inf->ptermios);
  	*handle = serial_fd;
  



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.