source4/auth/ntlm: Fix prototypes for all functions.
[ira/wip.git] / source4 / smbd / service_stream.c
index 043720597c9b27a6d6338edd4d196e552be1d299..916393253b877799649c967f0ebc2196a6fcb797 100644 (file)
@@ -173,7 +173,7 @@ static void stream_new_connection(struct tevent_context *ev,
        srv_conn->event.ctx     = ev;
        srv_conn->lp_ctx        = lp_ctx;
 
-       if (!socket_check_access(sock, "smbd", lp_hostsallow(NULL, lp_default_service(lp_ctx)), lp_hostsdeny(NULL, lp_default_service(lp_ctx)))) {
+       if (!socket_check_access(sock, "smbd", lpcfg_hostsallow(NULL, lpcfg_default_service(lp_ctx)), lpcfg_hostsdeny(NULL, lpcfg_default_service(lp_ctx)))) {
                stream_terminate_connection(srv_conn, "denied by access rules");
                return;
        }
@@ -187,10 +187,8 @@ static void stream_new_connection(struct tevent_context *ev,
 
        /* setup to receive internal messages on this connection */
        srv_conn->msg_ctx = messaging_init(srv_conn, 
-                                          lp_messaging_path(srv_conn, lp_ctx),
-                                          srv_conn->server_id, 
-                                          lp_iconv_convenience(lp_ctx),
-                                          ev);
+                                          lpcfg_messaging_path(srv_conn, lp_ctx),
+                                          srv_conn->server_id, ev);
        if (!srv_conn->msg_ctx) {
                stream_terminate_connection(srv_conn, "messaging_init() failed");
                return;
@@ -244,7 +242,7 @@ 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->model_ops->accept_connection(ev, stream_socket->lp_ctx,
                                                    stream_socket->sock, 
                                                    stream_new_connection, stream_socket);
 }
@@ -257,7 +255,8 @@ static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *f
         a string for the port. Should leave allocating a port nr 
          to the socket implementation - JRV20070903
  */
-NTSTATUS stream_setup_socket(struct tevent_context *event_context,
+NTSTATUS stream_setup_socket(TALLOC_CTX *mem_ctx,
+                            struct tevent_context *event_context,
                             struct loadparm_context *lp_ctx,
                             const struct model_ops *model_ops,
                             const struct stream_server_ops *stream_ops,
@@ -273,7 +272,7 @@ NTSTATUS stream_setup_socket(struct tevent_context *event_context,
        struct tevent_fd *fde;
        int i;
 
-       stream_socket = talloc_zero(event_context, struct stream_socket);
+       stream_socket = talloc_zero(mem_ctx, struct stream_socket);
        NT_STATUS_HAVE_NO_MEMORY(stream_socket);
 
        status = socket_create(family, SOCKET_TYPE_STREAM, &stream_socket->sock, 0);