Windows-compatible sentinel socket type and value
This commit is contained in:

committed by
Jeffrey Altman

parent
d497d7e4a7
commit
8740528b24
@@ -943,7 +943,7 @@ struct wait_ctx {
|
|||||||
krb5_sendto_ctx ctx;
|
krb5_sendto_ctx ctx;
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
fd_set wfds;
|
fd_set wfds;
|
||||||
int max_fd;
|
rk_socket_t max_fd;
|
||||||
int got_reply;
|
int got_reply;
|
||||||
time_t timenow;
|
time_t timenow;
|
||||||
};
|
};
|
||||||
@@ -1047,7 +1047,7 @@ wait_response(krb5_context context, int *action, krb5_sendto_ctx ctx)
|
|||||||
wait_ctx.ctx = ctx;
|
wait_ctx.ctx = ctx;
|
||||||
FD_ZERO(&wait_ctx.rfds);
|
FD_ZERO(&wait_ctx.rfds);
|
||||||
FD_ZERO(&wait_ctx.wfds);
|
FD_ZERO(&wait_ctx.wfds);
|
||||||
wait_ctx.max_fd = -1;
|
wait_ctx.max_fd = rk_INVALID_SOCKET;
|
||||||
|
|
||||||
/* oh, we have a reply, it must be a plugin that got it for us */
|
/* oh, we have a reply, it must be a plugin that got it for us */
|
||||||
if (ctx->response.length) {
|
if (ctx->response.length) {
|
||||||
@@ -1073,7 +1073,7 @@ wait_response(krb5_context context, int *action, krb5_sendto_ctx ctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wait_ctx.max_fd == -1) {
|
if (wait_ctx.max_fd == rk_INVALID_SOCKET) {
|
||||||
/*
|
/*
|
||||||
* If we don't find a host which can make progress, then
|
* If we don't find a host which can make progress, then
|
||||||
* we accelerate the process by moving all of the contestants
|
* we accelerate the process by moving all of the contestants
|
||||||
|
Reference in New Issue
Block a user