/[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 865 by stargo, Tue Mar 15 11:25:50 2005 UTC revision 1319 by stargo, Thu Nov 2 20:48:28 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    
# Line 309  rdpdr_send_available(void) Line 312  rdpdr_send_available(void)
312          channel_send(s, rdpdr_channel);          channel_send(s, rdpdr_channel);
313  }  }
314    
315  static void  void
316  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,
317                        uint32 length)                        uint32 length)
318  {  {
# Line 352  rdpdr_process_irp(STREAM s) Line 355  rdpdr_process_irp(STREAM s)
355                  error_mode,                  error_mode,
356                  share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;                  share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
357    
358          char filename[256];          char filename[PATH_MAX];
359          uint8 *buffer, *pst_buf;          uint8 *buffer, *pst_buf;
360          struct stream out;          struct stream out;
361          DEVICE_FNS *fns;          DEVICE_FNS *fns;
# Line 395  rdpdr_process_irp(STREAM s) Line 398  rdpdr_process_irp(STREAM s)
398                          break;                          break;
399    
400                  case DEVICE_TYPE_SCARD:                  case DEVICE_TYPE_SCARD:
401    #ifdef WITH_SCARD
402                            fns = &scard_fns;
403                            rw_blocking = False;
404                            break;
405    #endif
406                  default:                  default:
407    
408                          error("IRP for bad device %ld\n", device);                          error("IRP for bad device %ld\n", device);
# Line 671  rdpdr_process_irp(STREAM s) Line 679  rdpdr_process_irp(STREAM s)
679    
680                          out.data = out.p = buffer;                          out.data = out.p = buffer;
681                          out.size = sizeof(buffer);                          out.size = sizeof(buffer);
682    
683                            DEBUG_SCARD(("[SMART-CARD TRACE]\n"));
684                            DEBUG_SCARD(("device 0x%.8x\n", device));
685                            DEBUG_SCARD(("file   0x%.8x\n", file));
686                            DEBUG_SCARD(("id     0x%.8x\n", id));
687    #ifdef WITH_SCARD
688                            scardSetInfo(device, id, bytes_out + 0x14);
689    #endif
690                          status = fns->device_control(file, request, s, &out);                          status = fns->device_control(file, request, s, &out);
691                          result = buffer_len = out.p - out.data;                          result = buffer_len = out.p - out.data;
692    
693                            DEBUG_SCARD(("[SMART-CARD TRACE] OUT 0x%.8x\n", status));
694    
695                          /* Serial SERIAL_WAIT_ON_MASK */                          /* Serial SERIAL_WAIT_ON_MASK */
696                          if (status == STATUS_PENDING)                          if (status == STATUS_PENDING)
697                          {                          {
# Line 684  rdpdr_process_irp(STREAM s) Line 702  rdpdr_process_irp(STREAM s)
702                                          break;                                          break;
703                                  }                                  }
704                          }                          }
705    #ifdef WITH_SCARD
706                            else if (status == (STATUS_PENDING | 0xC0000000))
707                                    status = STATUS_PENDING;
708    #endif
709                          break;                          break;
710    
711    
# Line 929  rdpdr_remove_iorequest(struct async_iore Line 951  rdpdr_remove_iorequest(struct async_iore
951  }  }
952    
953  /* 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 */
954  void  static void
955  _rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out)  _rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out)
956  {  {
957          NTSTATUS status;          NTSTATUS status;
# Line 959  _rdpdr_check_fds(fd_set * rfds, fd_set * Line 981  _rdpdr_check_fds(fd_set * rfds, fd_set *
981                                  {                                  {
982    
983                                          /* iv_timeout between 2 chars, send partial_len */                                          /* iv_timeout between 2 chars, send partial_len */
984                                          /*printf("RDPDR: IVT total %u bytes read of %u\n", iorq->partial_len, iorq->length);*/                                          /*printf("RDPDR: IVT total %u bytes read of %u\n", iorq->partial_len, iorq->length); */
985                                          rdpdr_send_completion(iorq->device,                                          rdpdr_send_completion(iorq->device,
986                                                                iorq->id, STATUS_SUCCESS,                                                                iorq->id, STATUS_SUCCESS,
987                                                                iorq->partial_len,                                                                iorq->partial_len,

Legend:
Removed from v.865  
changed lines
  Added in v.1319

  ViewVC Help
Powered by ViewVC 1.1.26