mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
rpcd: Do blocking connects to local pipes
We don't have real async callers yet, and this is the simplest way to fix our missing light-weight deterministic async fallback mechanism. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15310 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
f23eb1b3b7
commit
0ab7b84ccb
@ -101,7 +101,7 @@ static struct tevent_req *np_sock_connect_send(
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
|
||||
ret = set_blocking(state->sock, false);
|
||||
ret = set_blocking(state->sock, true);
|
||||
if (ret == -1) {
|
||||
tevent_req_error(req, errno);
|
||||
return tevent_req_post(req, ev);
|
||||
@ -174,6 +174,18 @@ static void np_sock_connect_connected(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* As a quick workaround for bug 15310 we have done the
|
||||
* connect in blocking mode (see np_sock_connect_send()). The
|
||||
* rest of our code expects a nonblocking socket, activate
|
||||
* this after the connect succeeded.
|
||||
*/
|
||||
ret = set_blocking(state->sock, false);
|
||||
if (ret == -1) {
|
||||
tevent_req_error(req, errno);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = tstream_bsd_existing_socket(
|
||||
state, state->sock, &state->transport);
|
||||
if (ret == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user