summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/rpc_server/dcerpc_tcp.c4
-rw-r--r--source4/smb_server/smb_server.c5
-rw-r--r--source4/smbd/process_single.c3
-rw-r--r--source4/smbd/process_standard.c3
-rw-r--r--source4/smbd/process_thread.c3
5 files changed, 10 insertions, 8 deletions
diff --git a/source4/rpc_server/dcerpc_tcp.c b/source4/rpc_server/dcerpc_tcp.c
index c506cf16cf..c6a85377e0 100644
--- a/source4/rpc_server/dcerpc_tcp.c
+++ b/source4/rpc_server/dcerpc_tcp.c
@@ -217,10 +217,6 @@ void dcesrv_tcp_close(struct server_connection *conn, const char *reason)
DEBUG(5,("dcesrv_tcp_close: %s\n",reason));
- close(conn->event.fde->fd);
- event_remove_fd_all(conn->event.ctx, conn->socket->fde->fd);
- event_remove_timed(conn->event.ctx, conn->event.idle);
-
talloc_destroy(dce_conn->mem_ctx);
return;
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index 7d793bdf02..fd9e35074d 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -782,13 +782,10 @@ static void smbsrv_close(struct server_connection *conn, const char *reason)
DEBUG(5,("smbsrv_close: %s\n",reason));
- close(conn->event.fde->fd);
- event_remove_fd_all(conn->event.ctx, conn->socket->fde->fd);
- event_remove_timed(conn->event.ctx, conn->event.idle);
-
conn_close_all(smb_conn);
talloc_destroy(smb_conn->mem_ctx);
+
return;
}
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index b65418cd01..1cba3faee3 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -122,6 +122,9 @@ static void single_terminate_connection(struct server_connection *conn, const ch
{
DEBUG(0,("single_terminate_connection: reason[%s]\n",reason));
conn->service->ops->close_connection(conn,reason);
+ close(conn->event.fde->fd);
+ event_remove_fd(conn->event.ctx, conn->event.fde);
+ event_remove_timed(conn->event.ctx, conn->event.idle);
}
static int single_get_id(struct smbsrv_request *req)
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 5c2a0a3410..424d0b417a 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -146,6 +146,9 @@ static void standard_terminate_connection(struct server_connection *conn, const
{
DEBUG(0,("single_terminate_connection: reason[%s]\n",reason));
conn->service->ops->close_connection(conn,reason);
+ close(conn->event.fde->fd);
+ event_remove_fd(conn->event.ctx, conn->event.fde);
+ event_remove_timed(conn->event.ctx, conn->event.idle);
/* terminate this process */
exit(0);
}
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index 553e67feeb..2ba9905f1f 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -162,6 +162,9 @@ static void thread_terminate_connection(struct server_connection *conn, const ch
{
DEBUG(0,("thread_terminate_connection: reason[%s]\n",reason));
conn->service->ops->close_connection(conn,reason);
+ close(conn->event.fde->fd);
+ event_remove_fd(conn->event.ctx, conn->event.fde);
+ event_remove_timed(conn->event.ctx, conn->event.idle);
/* terminate this thread */
pthread_exit(NULL); /* thread cleanup routine will do actual cleanup */
}