1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

Eliminate another global_loadparm.

This commit is contained in:
Jelmer Vernooij 2008-09-30 03:20:46 +02:00
parent 235b729309
commit 2ba4a79210
7 changed files with 10 additions and 8 deletions

View 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);

View 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));
}

View 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));
}

View 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);

View 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));

View 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);
}
/**

View 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);