/[rdesktop]/sourceforge.net/trunk/rdesktop/rdpdr.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/rdpdr.c

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

revision 879 by astrand, Sun Apr 3 18:08:05 2005 UTC revision 1327 by stargo, Fri Nov 3 19:56:42 2006 UTC
# Line 60  extern DEVICE_FNS serial_fns; Line 60  extern DEVICE_FNS serial_fns;
60  extern DEVICE_FNS printer_fns;  extern DEVICE_FNS printer_fns;
61  extern DEVICE_FNS parallel_fns;  extern DEVICE_FNS parallel_fns;
62  extern DEVICE_FNS disk_fns;  extern DEVICE_FNS disk_fns;
63    #ifdef WITH_SCARD
64    extern DEVICE_FNS scard_fns;
65    #endif
66  extern FILEINFO g_fileinfo[];  extern FILEINFO g_fileinfo[];
67  extern BOOL g_notify_stamp;  extern BOOL g_notify_stamp;
68    
69    #ifdef WITH_SCARD
70    VCHANNEL *rdpdr_channel;
71    #else
72  static VCHANNEL *rdpdr_channel;  static VCHANNEL *rdpdr_channel;
73    #endif
74    
75  /* If select() times out, the request for the device with handle g_min_timeout_fd is aborted */  /* If select() times out, the request for the device with handle g_min_timeout_fd is aborted */
76  NTHANDLE g_min_timeout_fd;  NTHANDLE g_min_timeout_fd;
# Line 309  rdpdr_send_available(void) Line 316  rdpdr_send_available(void)
316          channel_send(s, rdpdr_channel);          channel_send(s, rdpdr_channel);
317  }  }
318    
319  static void  void
320  rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer,  rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer,
321                        uint32 length)                        uint32 length)
322  {  {
# Line 352  rdpdr_process_irp(STREAM s) Line 359  rdpdr_process_irp(STREAM s)
359                  error_mode,                  error_mode,
360                  share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;                  share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
361    
362          char filename[256];          char filename[PATH_MAX];
363          uint8 *buffer, *pst_buf;          uint8 *buffer, *pst_buf;
364          struct stream out;          struct stream out;
365          DEVICE_FNS *fns;          DEVICE_FNS *fns;
# Line 395  rdpdr_process_irp(STREAM s) Line 402  rdpdr_process_irp(STREAM s)
402                          break;                          break;
403    
404                  case DEVICE_TYPE_SCARD:                  case DEVICE_TYPE_SCARD:
405    #ifdef WITH_SCARD
406                            fns = &scard_fns;
407                            rw_blocking = False;
408                            break;
409    #endif
410                  default:                  default:
411    
412                          error("IRP for bad device %ld\n", device);                          error("IRP for bad device %ld\n", device);
# Line 671  rdpdr_process_irp(STREAM s) Line 683  rdpdr_process_irp(STREAM s)
683    
684                          out.data = out.p = buffer;                          out.data = out.p = buffer;
685                          out.size = sizeof(buffer);                          out.size = sizeof(buffer);
686    
687                            DEBUG_SCARD(("[SMART-CARD TRACE]\n"));
688                            DEBUG_SCARD(("device 0x%.8x\n", device));
689                            DEBUG_SCARD(("file   0x%.8x\n", file));
690                            DEBUG_SCARD(("id     0x%.8x\n", id));
691    #ifdef WITH_SCARD
692                            scardSetInfo(device, id, bytes_out + 0x14);
693    #endif
694                          status = fns->device_control(file, request, s, &out);                          status = fns->device_control(file, request, s, &out);
695                          result = buffer_len = out.p - out.data;                          result = buffer_len = out.p - out.data;
696    
697                            DEBUG_SCARD(("[SMART-CARD TRACE] OUT 0x%.8x\n", status));
698    
699                          /* Serial SERIAL_WAIT_ON_MASK */                          /* Serial SERIAL_WAIT_ON_MASK */
700                          if (status == STATUS_PENDING)                          if (status == STATUS_PENDING)
701                          {                          {
# Line 684  rdpdr_process_irp(STREAM s) Line 706  rdpdr_process_irp(STREAM s)
706                                          break;                                          break;
707                                  }                                  }
708                          }                          }
709    #ifdef WITH_SCARD
710                            else if (status == (STATUS_PENDING | 0xC0000000))
711                                    status = STATUS_PENDING;
712    #endif
713                          break;                          break;
714    
715    
# Line 929  rdpdr_remove_iorequest(struct async_iore Line 955  rdpdr_remove_iorequest(struct async_iore
955  }  }
956    
957  /* Check if select() returned with one of the rdpdr file descriptors, and complete io if it did */  /* Check if select() returned with one of the rdpdr file descriptors, and complete io if it did */
958  void  static void
959  _rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out)  _rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out)
960  {  {
961          NTSTATUS status;          NTSTATUS status;

Legend:
Removed from v.879  
changed lines
  Added in v.1327

  ViewVC Help
Powered by ViewVC 1.1.26