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