diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-09-30 03:20:46 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-09-30 03:20:46 +0200 |
commit | 2ba4a79210f35df526a72c740ada5de34d6f45f4 (patch) | |
tree | 7c10b66621b5a6fa5fff49cab8134a760b1ade71 /source4/smbd | |
parent | 235b729309a17fa44fecf743db5fe6552f67f577 (diff) | |
download | samba-2ba4a79210f35df526a72c740ada5de34d6f45f4.tar.gz |
Eliminate another global_loadparm.
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/process_model.h | 3 | ||||
-rw-r--r-- | source4/smbd/process_prefork.c | 2 | ||||
-rw-r--r-- | source4/smbd/process_single.c | 2 | ||||
-rw-r--r-- | source4/smbd/process_standard.c | 5 | ||||
-rw-r--r-- | source4/smbd/process_thread.c | 2 | ||||
-rw-r--r-- | source4/smbd/service_stream.c | 2 | ||||
-rw-r--r-- | source4/smbd/service_task.c | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h index a9b33a47250..6afb66ff202 100644 --- a/source4/smbd/process_model.h +++ b/source4/smbd/process_model.h @@ -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); diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c index 0d17e5301d4..1b369613ffd 100644 --- a/source4/smbd/process_prefork.c +++ b/source4/smbd/process_prefork.c @@ -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)); } diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index a7a27ef9e0a..26afff99301 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -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)); } diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index c8f90209b66..0a864dabb2a 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -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); diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c index 540d9564200..597cf587f13 100644 --- a/source4/smbd/process_thread.c +++ b/source4/smbd/process_thread.c @@ -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)); diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c index 48eda46dc74..1240382944e 100644 --- a/source4/smbd/service_stream.c +++ b/source4/smbd/service_stream.c @@ -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); } /** diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c index 22746850590..9a2903e281e 100644 --- a/source4/smbd/service_task.c +++ b/source4/smbd/service_task.c @@ -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); |