Eliminate another global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 01:20:46 +0000 (03:20 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 30 Sep 2008 01:20:46 +0000 (03:20 +0200)
source4/smbd/process_model.h
source4/smbd/process_prefork.c
source4/smbd/process_single.c
source4/smbd/process_standard.c
source4/smbd/process_thread.c
source4/smbd/service_stream.c
source4/smbd/service_task.c

index a9b33a4725017fdbc36588677108c08312e8070b..6afb66ff20284c8e92734ed841e99c89e63e6999 100644 (file)
@@ -63,7 +63,8 @@ struct model_ops {
                         void *);
 
        /* function to terminate a connection or task */
-       void (*terminate)(struct event_context *, const char *reason);
+       void (*terminate)(struct event_context *, struct loadparm_context *lp_ctx, 
+                         const char *reason);
 
        /* function to set a title for the connection or task */
        void (*set_title)(struct event_context *, const char *title);
index 0d17e5301d44e6a7444cfaa5785bf9f6177424aa..1b369613ffd71eb23a4b4e07f082aaac296cdece 100644 (file)
@@ -189,7 +189,7 @@ static void prefork_new_task(struct event_context *ev,
 
 
 /* called when a task goes down */
-_NORETURN_ static void prefork_terminate(struct event_context *ev, const char *reason) 
+_NORETURN_ static void prefork_terminate(struct event_context *ev, struct loadparm_context *lp_ctx, const char *reason) 
 {
        DEBUG(2,("prefork_terminate: reason[%s]\n",reason));
 }
index a7a27ef9e0a5f34b713c7aab1a331bf80e0c6497..26afff99301549c6e3ef29dd8fac7b2b35652b6a 100644 (file)
@@ -95,7 +95,7 @@ static void single_new_task(struct event_context *ev,
 
 
 /* called when a task goes down */
-static void single_terminate(struct event_context *ev, const char *reason) 
+static void single_terminate(struct event_context *ev, struct loadparm_context *lp_ctx, const char *reason) 
 {
        DEBUG(2,("single_terminate: reason[%s]\n",reason));
 }
index c8f90209b66022bcfd69161ce01ac3b7d149ed2f..0a864dabb2a27d88684e6ca5f4fb56b24021cfc4 100644 (file)
@@ -196,13 +196,14 @@ static void standard_new_task(struct event_context *ev,
 
 
 /* called when a task goes down */
-_NORETURN_ static void standard_terminate(struct event_context *ev, const char *reason) 
+_NORETURN_ static void standard_terminate(struct event_context *ev, struct loadparm_context *lp_ctx, 
+                                         const char *reason) 
 {
        DEBUG(2,("standard_terminate: reason[%s]\n",reason));
 
        /* this reload_charcnv() has the effect of freeing the iconv context memory,
           which makes leak checking easier */
-       reload_charcnv(global_loadparm);
+       reload_charcnv(lp_ctx);
 
        talloc_free(ev);
 
index 540d956420045771be1bf83e30a1689d0f1df4b9..597cf587f13f7406980dc80b07e91a3e5b8a9cc4 100644 (file)
@@ -188,7 +188,7 @@ static void thread_new_task(struct event_context *ev,
 }
 
 /* called when a task goes down */
-static void thread_terminate(struct event_context *event_ctx, const char *reason) 
+static void thread_terminate(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const char *reason) 
 {
        DEBUG(10,("thread_terminate: reason[%s]\n",reason));
 
index 48eda46dc74b055a39033e4311590a2c389e7643..1240382944edcc57540e354b4608c47ed5dbf7ea 100644 (file)
@@ -79,7 +79,7 @@ void stream_terminate_connection(struct stream_connection *srv_conn, const char
        talloc_free(srv_conn->event.fde);
        srv_conn->event.fde = NULL;
        talloc_free(srv_conn);
-       model_ops->terminate(event_ctx, reason);
+       model_ops->terminate(event_ctx, srv_conn->lp_ctx, reason);
 }
 
 /**
index 22746850590af7125de16f5506274551d0000246..9a2903e281ee2ee71dbf252c2de2c24c3a21d281 100644 (file)
@@ -35,7 +35,7 @@ void task_server_terminate(struct task_server *task, const char *reason)
        struct event_context *event_ctx = task->event_ctx;
        const struct model_ops *model_ops = task->model_ops;
        DEBUG(0,("task_server_terminate: [%s]\n", reason));
-       model_ops->terminate(event_ctx, reason);
+       model_ops->terminate(event_ctx, task->lp_ctx, reason);
        
        /* don't free this above, it might contain the 'reason' being printed */
        talloc_free(task);