mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
@@ -1146,7 +1146,7 @@ static int rdg_bio_gets(BIO* bio, char* str, int size)
|
||||
|
||||
static long rdg_bio_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
{
|
||||
int status = 0;
|
||||
int status = -1;
|
||||
rdpRdg* rdg = (rdpRdg*) BIO_get_data(bio);
|
||||
rdpTls* tlsOut = rdg->tlsOut;
|
||||
rdpTls* tlsIn = rdg->tlsIn;
|
||||
@@ -1157,14 +1157,6 @@ static long rdg_bio_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
(void)BIO_flush(tlsIn->bio);
|
||||
status = 1;
|
||||
}
|
||||
else if (cmd == BIO_C_GET_EVENT)
|
||||
{
|
||||
if (arg2)
|
||||
{
|
||||
BIO_get_event(rdg->tlsOut->bio, arg2);
|
||||
status = 1;
|
||||
}
|
||||
}
|
||||
else if (cmd == BIO_C_SET_NONBLOCK)
|
||||
{
|
||||
status = 1;
|
||||
@@ -1203,6 +1195,18 @@ static long rdg_bio_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
else
|
||||
status = 1;
|
||||
}
|
||||
else if (cmd == BIO_C_GET_EVENT || cmd == BIO_C_GET_FD)
|
||||
{
|
||||
/*
|
||||
* A note about BIO_C_GET_FD:
|
||||
* Even if two FDs are part of RDG, only one FD can be returned here.
|
||||
*
|
||||
* In FreeRDP, BIO FDs are only used for polling, so it is safe to use the outgoing FD only
|
||||
*
|
||||
* See issue #3602
|
||||
*/
|
||||
status = BIO_ctrl(tlsOut->bio, cmd, arg1, arg2);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1920,7 +1920,7 @@ static int transport_bio_tsg_gets(BIO* bio, char* str, int size)
|
||||
|
||||
static long transport_bio_tsg_ctrl(BIO* bio, int cmd, long arg1, void* arg2)
|
||||
{
|
||||
int status = 0;
|
||||
int status = -1;
|
||||
rdpTsg* tsg = (rdpTsg*) BIO_get_data(bio);
|
||||
RpcVirtualConnection* connection = tsg->rpc->VirtualConnection;
|
||||
RpcInChannel* inChannel = connection->DefaultInChannel;
|
||||
|
||||
@@ -737,7 +737,7 @@ static int tls_do_handshake(rdpTls* tls, BOOL clientMode)
|
||||
|
||||
do
|
||||
{
|
||||
status = poll(&pollfds, 1, 10 * 1000);
|
||||
status = poll(&pollfds, 1, 10);
|
||||
}
|
||||
while ((status < 0) && (errno == EINTR));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user