source4/smbd: Fix code formatting after refactoring.
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 14 Sep 2017 21:15:35 +0000 (09:15 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Oct 2017 03:33:10 +0000 (05:33 +0200)
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>
source4/smbd/process_standard.c
source4/smbd/service_stream.c

index 6d3432918ba96dbc5e001dd4b3679fc1f65595d5..74b2a05fd018af86cf4700f8ed9a291521bd51a8 100644 (file)
@@ -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;
        }
index 3f4a04ccf8445cb35c8b1bcb0cd32bfd3a1f5354..63318c686b0534dcb973021e3df9fc996aa36d15 100644 (file)
@@ -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);
 }
 
 /*