/[pcsclite]/trunk/Drivers/ccid/src/ccid_serial.c
ViewVC logotype

Diff of /trunk/Drivers/ccid/src/ccid_serial.c

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

revision 1458 by rousseau, Wed Apr 27 12:09:26 2005 UTC revision 1472 by rousseau, Wed Apr 27 13:35:19 2005 UTC
# Line 32  Line 32 
32  #include <errno.h>  #include <errno.h>
33  #include <sys/time.h>  #include <sys/time.h>
34  #include <sys/types.h>  #include <sys/types.h>
35    #include <sys/ioctl.h>
36  #include <PCSC/ifdhandler.h>  #include <PCSC/ifdhandler.h>
37    
38  #include "defs.h"  #include "defs.h"
# Line 548  status_t OpenSerialByName(unsigned int r Line 549  status_t OpenSerialByName(unsigned int r
549                  return STATUS_UNSUCCESSFUL;                  return STATUS_UNSUCCESSFUL;
550          }          }
551    
552            /* Set RTS signal to low to prevent the smart card reader
553             * from sending its plug and play string. */
554            {
555                    int flags;
556    
557                    if (ioctl(serialDevice[reader].fd, TIOCMGET, &flags) < 0)
558                    {
559                            DEBUG_CRITICAL2("Get RS232 signals state failed: %s",
560                                    strerror(errno));
561                    }
562                    else
563                    {
564                            flags &= ~TIOCM_RTS;
565                            if (ioctl(serialDevice[reader].fd, TIOCMSET, &flags) < 0)
566                            {
567                                    DEBUG_CRITICAL2("Set RTS to low failed: %s", strerror(errno));
568                            }
569                            else
570                            {
571                                    DEBUG_COMM("Plug-n-Play inhibition successful");
572                            }
573                    }
574            }
575    
576          /* set channel used */          /* set channel used */
577          serialDevice[reader].device = strdup(dev_name);          serialDevice[reader].device = strdup(dev_name);
578    

Legend:
Removed from v.1458  
changed lines
  Added in v.1472

  ViewVC Help
Powered by ViewVC 1.1.5