65 |
static VCHANNEL *rdpdr_channel; |
static VCHANNEL *rdpdr_channel; |
66 |
|
|
67 |
/* 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 */ |
68 |
HANDLE g_min_timeout_fd; |
NTHANDLE g_min_timeout_fd; |
69 |
uint32 g_num_devices; |
uint32 g_num_devices; |
70 |
|
|
71 |
/* Table with information about rdpdr devices */ |
/* Table with information about rdpdr devices */ |
90 |
|
|
91 |
/* Return device_id for a given handle */ |
/* Return device_id for a given handle */ |
92 |
int |
int |
93 |
get_device_index(HANDLE handle) |
get_device_index(NTHANDLE handle) |
94 |
{ |
{ |
95 |
int i; |
int i; |
96 |
for (i = 0; i < RDPDR_MAX_DEVICES; i++) |
for (i = 0; i < RDPDR_MAX_DEVICES; i++) |
940 |
/* only delete link if all data has been transfered */ |
/* only delete link if all data has been transfered */ |
941 |
/* or if result was 0 and status success - EOF */ |
/* or if result was 0 and status success - EOF */ |
942 |
if ((iorq->partial_len == iorq->length) || |
if ((iorq->partial_len == iorq->length) || |
943 |
(result == 0)) |
(g_rdpdr_device[iorq->device].device_type == |
944 |
|
DEVICE_TYPE_SERIAL) || (result == 0)) |
945 |
{ |
{ |
946 |
#if WITH_DEBUG_RDP5 |
#if WITH_DEBUG_RDP5 |
947 |
DEBUG(("RDPDR: AIO total %u bytes read of %u\n", iorq->partial_len, iorq->length)); |
DEBUG(("RDPDR: AIO total %u bytes read of %u\n", iorq->partial_len, iorq->length)); |