int rdp_check_fds(rdpRdp* rdp) { int status; status = transport_check_fds(rdp->transport); if (status == 1) { status = rdp_client_redirect(rdp); /* session redirection */ } return status; }
int transport_write(rdpTransport* transport, STREAM* s) { int status = -1; int length; int sent = 0; length = stream_get_length(s); stream_set_pos(s, 0); #ifdef WITH_DEBUG_TRANSPORT if (length > 0) { printf("Client > Server\n"); freerdp_hexdump(s->data, length); } #endif while (sent < length) { if (transport->layer == TRANSPORT_LAYER_TLS) status = tls_write(transport->tls, stream_get_tail(s), length); else if (transport->layer == TRANSPORT_LAYER_TCP) status = tcp_write(transport->tcp, stream_get_tail(s), length); if (status < 0) break; /* error occurred */ if (status == 0) { /* blocking while sending */ nanosleep(&transport->ts, NULL); /* when sending is blocked in nonblocking mode, the receiving buffer should be checked */ if (!transport->blocking) transport_read_nonblocking(transport); } sent += status; stream_seek(s, status); } if (!transport->blocking) transport_check_fds(transport); return status; }
int rdp_check_fds(rdpRdp* rdp) { return transport_check_fds(&(rdp->transport)); }
int rdp_check_fds(rdpRdp* rdp) { LLOGLN(10, ("rdp_check_fds:")); return transport_check_fds(rdp->transport); }
int rdp_check_fds(rdpRdp* rdp) { int status; status = transport_check_fds(rdp->transport); return status; }