summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2017-09-15 09:15:35 +1200
committerAndrew Bartlett <abartlet@samba.org>2017-10-19 05:33:10 +0200
commit778e9a810ef48262efe250bebce3e88546acc694 (patch)
treeca3391472b87b85e93e7c601848c384ea8123794 /source4/smbd
parente027871b0d96b59d2ec60d5d21e4490f1e2d73cd (diff)
downloadsamba-778e9a810ef48262efe250bebce3e88546acc694.tar.gz
source4/smbd: Fix code formatting after refactoring.
Fix code formatting from the refactoring in the previous commits. Done as a separate patch to make the changes to functionality easier to review. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_standard.c6
-rw-r--r--source4/smbd/service_stream.c43
2 files changed, 27 insertions, 22 deletions
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 6d3432918ba..74b2a05fd01 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -256,8 +256,10 @@ static void standard_accept_connection(
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("standard_accept_connection: accept: %s\n",
nt_errstr(status)));
- /* this looks strange, but is correct. We need to throttle things until
- the system clears enough resources to handle this new socket */
+ /* this looks strange, but is correct. We need to throttle
+ * things until the system clears enough resources to handle
+ * this new socket
+ */
sleep(1);
return;
}
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 3f4a04ccf84..63318c686b0 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -147,15 +147,15 @@ NTSTATUS stream_new_connection_merge(struct tevent_context *ev,
srv_conn = talloc_zero(ev, struct stream_connection);
NT_STATUS_HAVE_NO_MEMORY(srv_conn);
- srv_conn->private_data = private_data;
- srv_conn->model_ops = model_ops;
- srv_conn->socket = NULL;
- srv_conn->server_id = cluster_id(0, 0);
- srv_conn->ops = stream_ops;
- srv_conn->msg_ctx = msg_ctx;
- srv_conn->event.ctx = ev;
- srv_conn->lp_ctx = lp_ctx;
- srv_conn->event.fde = NULL;
+ srv_conn->private_data = private_data;
+ srv_conn->model_ops = model_ops;
+ srv_conn->socket = NULL;
+ srv_conn->server_id = cluster_id(0, 0);
+ srv_conn->ops = stream_ops;
+ srv_conn->msg_ctx = msg_ctx;
+ srv_conn->event.ctx = ev;
+ srv_conn->lp_ctx = lp_ctx;
+ srv_conn->event.fde = NULL;
srv_conn->process_context = process_context;
*_srv_conn = srv_conn;
@@ -184,13 +184,13 @@ static void stream_new_connection(struct tevent_context *ev,
talloc_steal(srv_conn, sock);
- srv_conn->private_data = stream_socket->private_data;
- srv_conn->model_ops = stream_socket->model_ops;
- srv_conn->socket = sock;
- srv_conn->server_id = server_id;
- srv_conn->ops = stream_socket->ops;
- srv_conn->event.ctx = ev;
- srv_conn->lp_ctx = lp_ctx;
+ srv_conn->private_data = stream_socket->private_data;
+ srv_conn->model_ops = stream_socket->model_ops;
+ srv_conn->socket = sock;
+ srv_conn->server_id = server_id;
+ srv_conn->ops = stream_socket->ops;
+ srv_conn->event.ctx = ev;
+ srv_conn->lp_ctx = lp_ctx;
srv_conn->process_context = process_context;
if (!socket_check_access(sock, "smbd", lpcfg_hosts_allow(NULL, lpcfg_default_service(lp_ctx)), lpcfg_hosts_deny(NULL, lpcfg_default_service(lp_ctx)))) {
@@ -263,10 +263,13 @@ static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *f
/* ask the process model to create us a process for this new
connection. When done, it calls stream_new_connection()
with the newly created socket */
- stream_socket->model_ops->accept_connection(ev, stream_socket->lp_ctx,
- stream_socket->sock,
- stream_new_connection, stream_socket,
- stream_socket->process_context);
+ stream_socket->model_ops->accept_connection(
+ ev,
+ stream_socket->lp_ctx,
+ stream_socket->sock,
+ stream_new_connection,
+ stream_socket,
+ stream_socket->process_context);
}
/*