From 778e9a810ef48262efe250bebce3e88546acc694 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Fri, 15 Sep 2017 09:15:35 +1200 Subject: [PATCH] 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 Reviewed-by: Andrew Bartlett Reviewed-by: Garming Sam --- source4/smbd/process_standard.c | 6 +++-- source4/smbd/service_stream.c | 43 ++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 6d3432918ba9..74b2a05fd018 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 3f4a04ccf844..63318c686b05 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); } /* -- 2.34.1