/[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 828 by stargo, Sun Mar 6 21:11:18 2005 UTC revision 865 by stargo, Tue Mar 15 11:25:50 2005 UTC
# Line 155  add_async_iorequest(uint32 device, uint3 Line 155  add_async_iorequest(uint32 device, uint3
155    
156          while (iorq->fd != 0)          while (iorq->fd != 0)
157          {          {
158                  // create new element if needed                  /* create new element if needed */
159                  if (iorq->next == NULL)                  if (iorq->next == NULL)
160                  {                  {
161                          iorq->next =                          iorq->next =
# Line 228  announcedata_size() Line 228  announcedata_size()
228          int size, i;          int size, i;
229          PRINTER *printerinfo;          PRINTER *printerinfo;
230    
231          size = 8;               //static announce size          size = 8;               /* static announce size */
232          size += g_num_devices * 0x14;          size += g_num_devices * 0x14;
233    
234          for (i = 0; i < g_num_devices; i++)          for (i = 0; i < g_num_devices; i++)
# Line 327  rdpdr_send_completion(uint32 device, uin Line 327  rdpdr_send_completion(uint32 device, uin
327          /* JIF */          /* JIF */
328  #ifdef WITH_DEBUG_RDP5  #ifdef WITH_DEBUG_RDP5
329          printf("--> rdpdr_send_completion\n");          printf("--> rdpdr_send_completion\n");
330          //hexdump(s->channel_hdr + 8, s->end - s->channel_hdr - 8);          /* hexdump(s->channel_hdr + 8, s->end - s->channel_hdr - 8); */
331  #endif  #endif
332          channel_send(s, rdpdr_channel);          channel_send(s, rdpdr_channel);
333  }  }
# Line 406  rdpdr_process_irp(STREAM s) Line 406  rdpdr_process_irp(STREAM s)
406                  case IRP_MJ_CREATE:                  case IRP_MJ_CREATE:
407    
408                          in_uint32_be(s, desired_access);                          in_uint32_be(s, desired_access);
409                          in_uint8s(s, 0x08);     // unknown                          in_uint8s(s, 0x08);     /* unknown */
410                          in_uint32_le(s, error_mode);                          in_uint32_le(s, error_mode);
411                          in_uint32_le(s, share_mode);                          in_uint32_le(s, share_mode);
412                          in_uint32_le(s, disposition);                          in_uint32_le(s, disposition);
# Line 463  rdpdr_process_irp(STREAM s) Line 463  rdpdr_process_irp(STREAM s)
463                                  break;                                  break;
464                          }                          }
465    
466                          if (rw_blocking)        // Complete read immediately                          if (rw_blocking)        /* Complete read immediately */
467                          {                          {
468                                  buffer = (uint8 *) xrealloc((void *) buffer, length);                                  buffer = (uint8 *) xrealloc((void *) buffer, length);
469                                  if (!buffer)                                  if (!buffer)
# Line 476  rdpdr_process_irp(STREAM s) Line 476  rdpdr_process_irp(STREAM s)
476                                  break;                                  break;
477                          }                          }
478    
479                          // Add request to table                          /* Add request to table */
480                          pst_buf = (uint8 *) xmalloc(length);                          pst_buf = (uint8 *) xmalloc(length);
481                          if (!pst_buf)                          if (!pst_buf)
482                          {                          {
# Line 516  rdpdr_process_irp(STREAM s) Line 516  rdpdr_process_irp(STREAM s)
516                                  break;                                  break;
517                          }                          }
518    
519                          if (rw_blocking)        // Complete immediately                          if (rw_blocking)        /* Complete immediately */
520                          {                          {
521                                  status = fns->write(file, s->p, length, offset, &result);                                  status = fns->write(file, s->p, length, offset, &result);
522                                  break;                                  break;
523                          }                          }
524    
525                          // Add to table                          /* Add to table */
526                          pst_buf = (uint8 *) xmalloc(length);                          pst_buf = (uint8 *) xmalloc(length);
527                          if (!pst_buf)                          if (!pst_buf)
528                          {                          {
# Line 629  rdpdr_process_irp(STREAM s) Line 629  rdpdr_process_irp(STREAM s)
629                                          /* JIF                                          /* JIF
630                                             unimpl("IRP major=0x%x minor=0x%x: IRP_MN_NOTIFY_CHANGE_DIRECTORY\n", major, minor);  */                                             unimpl("IRP major=0x%x minor=0x%x: IRP_MN_NOTIFY_CHANGE_DIRECTORY\n", major, minor);  */
631    
632                                          in_uint32_le(s, info_level);    // notify mask                                          in_uint32_le(s, info_level);    /* notify mask */
633    
634                                          g_notify_stamp = True;                                          g_notify_stamp = True;
635    
# Line 835  rdpdr_init() Line 835  rdpdr_init()
835  void  void
836  rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout)  rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout)
837  {  {
838          uint32 select_timeout = 0;      // Timeout value to be used for select() (in millisecons).          uint32 select_timeout = 0;      /* Timeout value to be used for select() (in millisecons). */
839          struct async_iorequest *iorq;          struct async_iorequest *iorq;
840          char c;          char c;
841    
# Line 920  rdpdr_remove_iorequest(struct async_iore Line 920  rdpdr_remove_iorequest(struct async_iore
920          }          }
921          else          else
922          {          {
923                  // Even if NULL                  /* Even if NULL */
924                  g_iorequest = iorq->next;                  g_iorequest = iorq->next;
925                  xfree(iorq);                  xfree(iorq);
926                  iorq = NULL;                  iorq = NULL;
# Line 959  _rdpdr_check_fds(fd_set * rfds, fd_set * Line 959  _rdpdr_check_fds(fd_set * rfds, fd_set *
959                                  {                                  {
960    
961                                          /* iv_timeout between 2 chars, send partial_len */                                          /* iv_timeout between 2 chars, send partial_len */
962                                          //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);*/
963                                          rdpdr_send_completion(iorq->device,                                          rdpdr_send_completion(iorq->device,
964                                                                iorq->id, STATUS_SUCCESS,                                                                iorq->id, STATUS_SUCCESS,
965                                                                iorq->partial_len,                                                                iorq->partial_len,
# Line 1180  rdpdr_abort_io(uint32 fd, uint32 major, Line 1180  rdpdr_abort_io(uint32 fd, uint32 major,
1180          prev = NULL;          prev = NULL;
1181          while (iorq != NULL)          while (iorq != NULL)
1182          {          {
1183                  // Only remove from table when major is not set, or when correct major is supplied.                  /* Only remove from table when major is not set, or when correct major is supplied.
1184                  // Abort read should not abort a write io request.                     Abort read should not abort a write io request. */
1185                  if ((iorq->fd == fd) && (major == 0 || iorq->major == major))                  if ((iorq->fd == fd) && (major == 0 || iorq->major == major))
1186                  {                  {
1187                          result = 0;                          result = 0;

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

  ViewVC Help
Powered by ViewVC 1.1.26