mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
lib/async_req: s/result/req/ in async_connect_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
ccd038e152
commit
be8c2ff103
@ -70,13 +70,12 @@ struct tevent_req *async_connect_send(
|
|||||||
void (*after_connect)(void *private_data),
|
void (*after_connect)(void *private_data),
|
||||||
void *private_data)
|
void *private_data)
|
||||||
{
|
{
|
||||||
struct tevent_req *result;
|
struct tevent_req *req;
|
||||||
struct async_connect_state *state;
|
struct async_connect_state *state;
|
||||||
struct tevent_fd *fde;
|
struct tevent_fd *fde;
|
||||||
|
|
||||||
result = tevent_req_create(
|
req = tevent_req_create(mem_ctx, &state, struct async_connect_state);
|
||||||
mem_ctx, &state, struct async_connect_state);
|
if (req == NULL) {
|
||||||
if (result == NULL) {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ struct tevent_req *async_connect_send(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state->result == 0) {
|
if (state->result == 0) {
|
||||||
tevent_req_done(result);
|
tevent_req_done(req);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,18 +136,18 @@ struct tevent_req *async_connect_send(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fde = tevent_add_fd(ev, state, fd, TEVENT_FD_READ | TEVENT_FD_WRITE,
|
fde = tevent_add_fd(ev, state, fd, TEVENT_FD_READ | TEVENT_FD_WRITE,
|
||||||
async_connect_connected, result);
|
async_connect_connected, req);
|
||||||
if (fde == NULL) {
|
if (fde == NULL) {
|
||||||
state->sys_errno = ENOMEM;
|
state->sys_errno = ENOMEM;
|
||||||
goto post_errno;
|
goto post_errno;
|
||||||
}
|
}
|
||||||
return result;
|
return req;
|
||||||
|
|
||||||
post_errno:
|
post_errno:
|
||||||
tevent_req_error(result, state->sys_errno);
|
tevent_req_error(req, state->sys_errno);
|
||||||
done:
|
done:
|
||||||
fcntl(fd, F_SETFL, state->old_sockflags);
|
fcntl(fd, F_SETFL, state->old_sockflags);
|
||||||
return tevent_req_post(result, ev);
|
return tevent_req_post(req, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user