Rework service init functions to pass down service name. This is
[ira/wip.git] / source / smb_server / smb_server.c
index bc17d100c5511c96383c11e3aedf1533b0c8952c..866ae26fa46f44bde2ebd3a71e9b0af136d69916 100644 (file)
@@ -157,7 +157,7 @@ static void smbsrv_accept(struct stream_connection *conn)
        smbsrv_management_init(smb_conn);
 
        if (!NT_STATUS_IS_OK(share_get_context_by_name(smb_conn, lp_share_backend(smb_conn->lp_ctx), 
-                                                      &(smb_conn->share_context)))) {
+                                                      smb_conn->lp_ctx, &(smb_conn->share_context)))) {
                smbsrv_terminate_connection(smb_conn, "share_init failed!");
                return;
        }
@@ -185,7 +185,8 @@ _PUBLIC_ NTSTATUS smbsrv_add_socket(struct event_context *event_context,
        for (i=0;ports[i];i++) {
                uint16_t port = atoi(ports[i]);
                if (port == 0) continue;
-               status = stream_setup_socket(event_context, model_ops, &smb_stream_ops, 
+               status = stream_setup_socket(event_context, lp_ctx, 
+                                            model_ops, &smb_stream_ops, 
                                             "ipv4", address, &port, 
                                             lp_socket_options(lp_ctx), 
                                             NULL);
@@ -257,7 +258,8 @@ static NTSTATUS smbsrv_init(struct event_context *event_context,
                            struct loadparm_context *lp_ctx,
                            const struct model_ops *model_ops)
 {      
-       return task_server_startup(event_context, model_ops, smbsrv_task_init);
+       return task_server_startup(event_context, lp_ctx, "smb",
+                                  model_ops, smbsrv_task_init);
 }
 
 /* called at smbd startup - register ourselves as a server service */