--- sourceforge.net/trunk/rdesktop/rdpdr.c 2004/02/03 14:02:59 595 +++ sourceforge.net/trunk/rdesktop/rdpdr.c 2004/02/15 21:19:28 608 @@ -81,7 +81,7 @@ /* Add a new io request to the table containing pending io requests so it won't block rdesktop */ BOOL add_async_iorequest(uint32 device, uint32 file, uint32 id, uint32 major, uint32 length, - DEVICE_FNS * fns, long total_timeout, long interval_timeout, uint8 * buffer) + DEVICE_FNS * fns, uint32 total_timeout, uint32 interval_timeout, uint8 * buffer) { struct async_iorequest *iorq; @@ -220,7 +220,8 @@ rdp_out_unistr(s, printerinfo->printer, printerlen - 2); out_uint8a(s, printerinfo->blob, bloblen); - xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */ + if (printerinfo->blob) + xfree(printerinfo->blob); /* Blob is sent twice if reconnecting */ break; default: out_uint32(s, 0); @@ -686,7 +687,7 @@ void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout) { - 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). struct async_iorequest *iorq; iorq = g_iorequest; @@ -835,8 +836,8 @@ status = STATUS_SUCCESS; rdpdr_send_completion(iorq->device, iorq->id, status, - iorq->partial_len, "", - 1); + iorq->partial_len, + (uint8 *) "", 1); xfree(iorq->buffer); iorq->fd = 0; @@ -871,7 +872,7 @@ struct async_iorequest *iorq; struct async_iorequest *prev; - iorq = &g_iorequest; + iorq = g_iorequest; prev = NULL; while (iorq != NULL) { @@ -880,7 +881,8 @@ if ((iorq->fd == fd) && (major == 0 || iorq->major == major)) { result = 0; - rdpdr_send_completion(iorq->device, iorq->id, status, result, "", 1); + rdpdr_send_completion(iorq->device, iorq->id, status, result, (uint8 *) "", + 1); xfree(iorq->buffer); iorq->fd = 0; if (prev != NULL)