55 |
#define IRP_MN_QUERY_DIRECTORY 0x01 |
#define IRP_MN_QUERY_DIRECTORY 0x01 |
56 |
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02 |
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY 0x02 |
57 |
|
|
58 |
extern char hostname[16]; |
extern char g_hostname[16]; |
59 |
extern DEVICE_FNS serial_fns; |
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; |
205 |
|
|
206 |
if (NULL == g_rdpdr_clientname) |
if (NULL == g_rdpdr_clientname) |
207 |
{ |
{ |
208 |
g_rdpdr_clientname = hostname; |
g_rdpdr_clientname = g_hostname; |
209 |
} |
} |
210 |
hostlen = (strlen(g_rdpdr_clientname) + 1) * 2; |
hostlen = (strlen(g_rdpdr_clientname) + 1) * 2; |
211 |
|
|
266 |
{ |
{ |
267 |
out_uint32_le(s, g_rdpdr_device[i].device_type); |
out_uint32_le(s, g_rdpdr_device[i].device_type); |
268 |
out_uint32_le(s, i); /* RDP Device ID */ |
out_uint32_le(s, i); /* RDP Device ID */ |
269 |
|
/* Is it possible to use share names longer than 8 chars? |
270 |
|
/astrand */ |
271 |
out_uint8p(s, g_rdpdr_device[i].name, 8); |
out_uint8p(s, g_rdpdr_device[i].name, 8); |
272 |
|
|
273 |
switch (g_rdpdr_device[i].device_type) |
switch (g_rdpdr_device[i].device_type) |
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)); |