1 |
#include <unistd.h> |
#include <unistd.h> |
2 |
#include <sys/types.h> |
#include <sys/types.h> |
3 |
|
#include <sys/time.h> |
4 |
#include <time.h> |
#include <time.h> |
5 |
#include "rdesktop.h" |
#include "rdesktop.h" |
6 |
|
|
82 |
/* 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 */ |
83 |
BOOL |
BOOL |
84 |
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, |
85 |
DEVICE_FNS * fns, long total_timeout, long interval_timeout, uint8 * buffer) |
DEVICE_FNS * fns, uint32 total_timeout, uint32 interval_timeout, uint8 * buffer) |
86 |
{ |
{ |
87 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
88 |
|
|
221 |
rdp_out_unistr(s, printerinfo->printer, printerlen - 2); |
rdp_out_unistr(s, printerinfo->printer, printerlen - 2); |
222 |
out_uint8a(s, printerinfo->blob, bloblen); |
out_uint8a(s, printerinfo->blob, bloblen); |
223 |
|
|
224 |
xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */ |
if (printerinfo->blob) |
225 |
|
xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */ |
226 |
break; |
break; |
227 |
default: |
default: |
228 |
out_uint32(s, 0); |
out_uint32(s, 0); |
688 |
void |
void |
689 |
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) |
690 |
{ |
{ |
691 |
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). |
692 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
693 |
|
|
694 |
iorq = g_iorequest; |
iorq = g_iorequest; |
837 |
status = STATUS_SUCCESS; |
status = STATUS_SUCCESS; |
838 |
rdpdr_send_completion(iorq->device, |
rdpdr_send_completion(iorq->device, |
839 |
iorq->id, status, |
iorq->id, status, |
840 |
iorq->partial_len, "", |
iorq->partial_len, |
841 |
1); |
(uint8 *) "", 1); |
842 |
|
|
843 |
xfree(iorq->buffer); |
xfree(iorq->buffer); |
844 |
iorq->fd = 0; |
iorq->fd = 0; |
873 |
struct async_iorequest *iorq; |
struct async_iorequest *iorq; |
874 |
struct async_iorequest *prev; |
struct async_iorequest *prev; |
875 |
|
|
876 |
iorq = &g_iorequest; |
iorq = g_iorequest; |
877 |
prev = NULL; |
prev = NULL; |
878 |
while (iorq != NULL) |
while (iorq != NULL) |
879 |
{ |
{ |
882 |
if ((iorq->fd == fd) && (major == 0 || iorq->major == major)) |
if ((iorq->fd == fd) && (major == 0 || iorq->major == major)) |
883 |
{ |
{ |
884 |
result = 0; |
result = 0; |
885 |
rdpdr_send_completion(iorq->device, iorq->id, status, result, "", 1); |
rdpdr_send_completion(iorq->device, iorq->id, status, result, (uint8 *) "", |
886 |
|
1); |
887 |
xfree(iorq->buffer); |
xfree(iorq->buffer); |
888 |
iorq->fd = 0; |
iorq->fd = 0; |
889 |
if (prev != NULL) |
if (prev != NULL) |