summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-07-15 10:16:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:39 -0500
commit526d687cbbdf323dc883bb1298dfd2dc952fecc6 (patch)
treea676e724516998b425b7249ed208978c91124e4b /source4/smbd
parente3e5fb088942b07a402a2ca267bb9bc39e8addbe (diff)
downloadsamba-526d687cbbdf323dc883bb1298dfd2dc952fecc6.tar.gz
samba-526d687cbbdf323dc883bb1298dfd2dc952fecc6.tar.bz2
samba-526d687cbbdf323dc883bb1298dfd2dc952fecc6.zip
r1520: only call write handler or read handler, not both. This copes with the
connection being removed between calls. (This used to be commit 446306f054b27e903c50e1d96d23041e3a8e5705)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/service.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index c90792e452..270eeb4f22 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -249,7 +249,9 @@ void server_destroy_connection(struct server_connection *srv_conn)
close(srv_conn->event.fde->fd);
event_remove_fd(srv_conn->event.ctx, srv_conn->event.fde);
+ srv_conn->event.fde = NULL;
event_remove_timed(srv_conn->event.ctx, srv_conn->event.idle);
+ srv_conn->event.idle = NULL;
talloc_destroy(srv_conn->mem_ctx);
}
@@ -262,6 +264,7 @@ void server_io_handler(struct event_context *ev, struct fd_event *fde, time_t t,
if (flags & EVENT_FD_WRITE) {
conn->service->ops->send_handler(conn, t, flags);
+ return;
}
if (flags & EVENT_FD_READ) {