81 |
/* Add a new io request to the table containing pending io requests so it won't block rdesktop */ |
/* Add a new io request to the table containing pending io requests so it won't block rdesktop */ |
82 |
BOOL |
BOOL |
83 |
add_async_iorequest(uint32 device, uint32 file, uint32 id, uint32 major, uint32 length, |
add_async_iorequest(uint32 device, uint32 file, uint32 id, uint32 major, uint32 length, |
84 |
DEVICE_FNS * fns, long total_timeout, long interval_timeout, uint8 * buffer) |
DEVICE_FNS * fns, uint32 total_timeout, uint32 interval_timeout, uint8 * buffer) |
85 |
{ |
{ |
86 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
87 |
|
|
687 |
void |
void |
688 |
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) |
689 |
{ |
{ |
690 |
long 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). |
691 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
692 |
|
|
693 |
iorq = g_iorequest; |
iorq = g_iorequest; |
836 |
status = STATUS_SUCCESS; |
status = STATUS_SUCCESS; |
837 |
rdpdr_send_completion(iorq->device, |
rdpdr_send_completion(iorq->device, |
838 |
iorq->id, status, |
iorq->id, status, |
839 |
iorq->partial_len, "", |
iorq->partial_len, |
840 |
1); |
(uint8 *) "", 1); |
841 |
|
|
842 |
xfree(iorq->buffer); |
xfree(iorq->buffer); |
843 |
iorq->fd = 0; |
iorq->fd = 0; |
872 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
873 |
struct async_iorequest *prev; |
struct async_iorequest *prev; |
874 |
|
|
875 |
iorq = &g_iorequest; |
iorq = g_iorequest; |
876 |
prev = NULL; |
prev = NULL; |
877 |
while (iorq != NULL) |
while (iorq != NULL) |
878 |
{ |
{ |
881 |
if ((iorq->fd == fd) && (major == 0 || iorq->major == major)) |
if ((iorq->fd == fd) && (major == 0 || iorq->major == major)) |
882 |
{ |
{ |
883 |
result = 0; |
result = 0; |
884 |
rdpdr_send_completion(iorq->device, iorq->id, status, result, "", 1); |
rdpdr_send_completion(iorq->device, iorq->id, status, result, (uint8 *) "", |
885 |
|
1); |
886 |
xfree(iorq->buffer); |
xfree(iorq->buffer); |
887 |
iorq->fd = 0; |
iorq->fd = 0; |
888 |
if (prev != NULL) |
if (prev != NULL) |