/[rdesktop]/sourceforge.net/trunk/rdesktop/serial.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/serial.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 686 by stargo, Thu Apr 29 19:41:49 2004 UTC revision 755 by stargo, Tue Aug 24 21:37:25 2004 UTC
# Line 374  serial_enum_devices(uint32 * id, char *o Line 374  serial_enum_devices(uint32 * id, char *o
374                  // Init data structures for device                  // Init data structures for device
375                  pser_inf = (SERIAL_DEVICE *) xmalloc(sizeof(SERIAL_DEVICE));                  pser_inf = (SERIAL_DEVICE *) xmalloc(sizeof(SERIAL_DEVICE));
376                  pser_inf->ptermios = (struct termios *) xmalloc(sizeof(struct termios));                  pser_inf->ptermios = (struct termios *) xmalloc(sizeof(struct termios));
377                    memset(pser_inf->ptermios, 0, sizeof(struct termios));
378                  pser_inf->pold_termios = (struct termios *) xmalloc(sizeof(struct termios));                  pser_inf->pold_termios = (struct termios *) xmalloc(sizeof(struct termios));
379                    memset(pser_inf->pold_termios, 0, sizeof(struct termios));
380    
381                  pos2 = next_arg(optarg, '=');                  pos2 = next_arg(optarg, '=');
382                  strcpy(g_rdpdr_device[*id].name, optarg);                  strcpy(g_rdpdr_device[*id].name, optarg);
# Line 406  serial_create(uint32 device_id, uint32 a Line 408  serial_create(uint32 device_id, uint32 a
408    
409          pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;          pser_inf = (SERIAL_DEVICE *) g_rdpdr_device[device_id].pdevice_data;
410          ptermios = pser_inf->ptermios;          ptermios = pser_inf->ptermios;
411          serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY);          serial_fd = open(g_rdpdr_device[device_id].local_path, O_RDWR | O_NOCTTY | O_NONBLOCK);
412    
413          if (serial_fd == -1)          if (serial_fd == -1)
414          {          {
# Line 437  serial_create(uint32 device_id, uint32 a Line 439  serial_create(uint32 device_id, uint32 a
439          tcsetattr(serial_fd, TCSANOW, ptermios);          tcsetattr(serial_fd, TCSANOW, ptermios);
440  */  */
441    
442            cfmakeraw(pser_inf->ptermios);
443          *handle = serial_fd;          *handle = serial_fd;
444    
445          /* all read and writes should be non blocking */          /* all read and writes should be non blocking */

Legend:
Removed from v.686  
changed lines
  Added in v.755

  ViewVC Help
Powered by ViewVC 1.1.26