summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-02-04 12:29:42 +0100
committerStefan Metzmacher <metze@samba.org>2011-02-04 15:04:57 +0100
commit902fbd91a19c414b61bc18ef24d7d84b30d37b1b (patch)
tree92cf2c2fd38b736315ae5683aa2ac99d725cb231 /source3/winbindd
parent17c01a5e900d77d622f3c33a440de739e64940e4 (diff)
downloadsamba-902fbd91a19c414b61bc18ef24d7d84b30d37b1b.tar.gz
samba-902fbd91a19c414b61bc18ef24d7d84b30d37b1b.tar.bz2
samba-902fbd91a19c414b61bc18ef24d7d84b30d37b1b.zip
s3:winbindd: fix segfaults on addrchange errors and make DEBUG() statements more usefull
metze
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 701f7a098b..3a762316d2 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1142,8 +1142,9 @@ static void winbindd_init_addrchange(TALLOC_CTX *mem_ctx,
}
req = addrchange_send(state, ev, state->ctx);
if (req == NULL) {
- DEBUG(10, ("addrchange_send failed\n"));
+ DEBUG(0, ("addrchange_send failed\n"));
TALLOC_FREE(state);
+ return;
}
tevent_req_set_callback(req, winbindd_addr_changed, state);
}
@@ -1162,6 +1163,7 @@ static void winbindd_addr_changed(struct tevent_req *req)
DEBUG(10, ("addrchange_recv failed: %s, stop listening\n",
nt_errstr(status)));
TALLOC_FREE(state);
+ return;
}
if (type == ADDRCHANGE_DEL) {
char addrstr[INET6_ADDRSTRLEN];
@@ -1178,14 +1180,15 @@ static void winbindd_addr_changed(struct tevent_req *req)
messaging_server_id(state->msg_ctx),
MSG_WINBIND_IP_DROPPED, &blob);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("messaging_send failed: %s\n",
+ DEBUG(10, ("messaging_send failed: %s - ignoring\n",
nt_errstr(status)));
}
}
req = addrchange_send(state, state->ev, state->ctx);
if (req == NULL) {
- DEBUG(10, ("addrchange_send failed\n"));
+ DEBUG(0, ("addrchange_send failed\n"));
TALLOC_FREE(state);
+ return;
}
tevent_req_set_callback(req, winbindd_addr_changed, state);
}