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 = |
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++) |
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 |
} |
} |
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); |
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) |
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 |
{ |
{ |
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 |
{ |
{ |
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 |
|
|
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 |
|
|
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; |
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, |
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; |