summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-25 20:31:59 +0200
committerVolker Lendecke <vl@samba.org>2009-06-14 11:25:48 +0200
commitc4a97b2b414477043ce373a07722da305a03a52a (patch)
tree43024bdee74d3d7e8a691181f29bfad7c4ae615a /source3/winbindd
parenteaaaea01e061927d16eca1c7472de108bf0edce3 (diff)
downloadsamba-c4a97b2b414477043ce373a07722da305a03a52a.tar.gz
samba-c4a97b2b414477043ce373a07722da305a03a52a.tar.bz2
samba-c4a97b2b414477043ce373a07722da305a03a52a.zip
Do not store the listening fde
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index cc2a7cb2a7..65c52e4292 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -827,7 +827,6 @@ static bool remove_idle_client(void)
struct winbindd_listen_state {
bool privileged;
int fd;
- struct tevent_fd *fde;
};
static void winbindd_listen_fde_handler(struct tevent_context *ev,
@@ -859,6 +858,7 @@ static bool winbindd_setup_listeners(void)
{
struct winbindd_listen_state *pub_state = NULL;
struct winbindd_listen_state *priv_state = NULL;
+ struct tevent_fd *fde;
pub_state = talloc(winbind_event_context(),
struct winbindd_listen_state);
@@ -872,16 +872,14 @@ static bool winbindd_setup_listeners(void)
goto failed;
}
- pub_state->fde = tevent_add_fd(winbind_event_context(),
- pub_state, pub_state->fd,
- TEVENT_FD_READ,
- winbindd_listen_fde_handler,
- pub_state);
- if (!pub_state->fde) {
+ fde = tevent_add_fd(winbind_event_context(), pub_state, pub_state->fd,
+ TEVENT_FD_READ, winbindd_listen_fde_handler,
+ pub_state);
+ if (fde == NULL) {
close(pub_state->fd);
goto failed;
}
- tevent_fd_set_auto_close(pub_state->fde);
+ tevent_fd_set_auto_close(fde);
priv_state = talloc(winbind_event_context(),
struct winbindd_listen_state);
@@ -895,16 +893,14 @@ static bool winbindd_setup_listeners(void)
goto failed;
}
- priv_state->fde = tevent_add_fd(winbind_event_context(),
- priv_state, priv_state->fd,
- TEVENT_FD_READ,
- winbindd_listen_fde_handler,
- priv_state);
- if (!priv_state->fde) {
+ fde = tevent_add_fd(winbind_event_context(), priv_state,
+ priv_state->fd, TEVENT_FD_READ,
+ winbindd_listen_fde_handler, priv_state);
+ if (fde == NULL) {
close(priv_state->fd);
goto failed;
}
- tevent_fd_set_auto_close(priv_state->fde);
+ tevent_fd_set_auto_close(fde);
return true;
failed: