summaryrefslogtreecommitdiff
path: root/source4/smbd/process_thread.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-05 19:03:43 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-05 13:06:03 -0600
commitdf408d056ec03f2abe08ce0ea487e1875b90e7bf (patch)
tree68cb7b83f12d50d8536acef9c1fed74d22ad9f54 /source4/smbd/process_thread.c
parent01c79091924602bb5c3f1c0c823b2577c4708f6a (diff)
downloadsamba-df408d056ec03f2abe08ce0ea487e1875b90e7bf.tar.gz
samba-df408d056ec03f2abe08ce0ea487e1875b90e7bf.tar.bz2
samba-df408d056ec03f2abe08ce0ea487e1875b90e7bf.zip
r26672: Janitorial: Remove uses of global_loadparm.
(This used to be commit 18cd08623eaad7d2cd63b82ea5275d4dfd21cf00)
Diffstat (limited to 'source4/smbd/process_thread.c')
-rw-r--r--source4/smbd/process_thread.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index 349ed44bc9..6c5f4816c0 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -39,7 +39,8 @@ static pthread_key_t title_key;
struct new_conn_state {
struct event_context *ev;
struct socket_context *sock;
- void (*new_conn)(struct event_context *, struct socket_context *, uint32_t , void *);
+ struct loadparm_context *lp_ctx;
+ void (*new_conn)(struct event_context *, struct loadparm_context *lp_ctx, struct socket_context *, uint32_t , void *);
void *private;
};
@@ -47,7 +48,7 @@ static void *thread_connection_fn(void *thread_parm)
{
struct new_conn_state *new_conn = talloc_get_type(thread_parm, struct new_conn_state);
- new_conn->new_conn(new_conn->ev, new_conn->sock, pthread_self(), new_conn->private);
+ new_conn->new_conn(new_conn->ev, new_conn->lp_ctx, new_conn->sock, pthread_self(), new_conn->private);
/* run this connection from here */
event_loop_wait(new_conn->ev);
@@ -61,8 +62,11 @@ static void *thread_connection_fn(void *thread_parm)
called when a listening socket becomes readable
*/
static void thread_accept_connection(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
struct socket_context *sock,
- void (*new_conn)(struct event_context *, struct socket_context *,
+ void (*new_conn)(struct event_context *,
+ struct loadparm_context *,
+ struct socket_context *,
uint32_t , void *),
void *private)
{
@@ -84,6 +88,7 @@ static void thread_accept_connection(struct event_context *ev,
state->new_conn = new_conn;
state->private = private;
+ state->lp_ctx = lp_ctx;
state->ev = ev2;
/* accept an incoming connection. */
@@ -117,7 +122,9 @@ static void thread_accept_connection(struct event_context *ev,
struct new_task_state {
struct event_context *ev;
- void (*new_task)(struct event_context *, uint32_t , void *);
+ struct loadparm_context *lp_ctx;
+ void (*new_task)(struct event_context *, struct loadparm_context *,
+ uint32_t , void *);
void *private;
};
@@ -125,7 +132,8 @@ static void *thread_task_fn(void *thread_parm)
{
struct new_task_state *new_task = talloc_get_type(thread_parm, struct new_task_state);
- new_task->new_task(new_task->ev, pthread_self(), new_task->private);
+ new_task->new_task(new_task->ev, new_task->lp_ctx, pthread_self(),
+ new_task->private);
/* run this connection from here */
event_loop_wait(new_task->ev);
@@ -139,7 +147,10 @@ static void *thread_task_fn(void *thread_parm)
called when a new task is needed
*/
static void thread_new_task(struct event_context *ev,
- void (*new_task)(struct event_context *, uint32_t , void *),
+ struct loadparm_context *lp_ctx,
+ void (*new_task)(struct event_context *,
+ struct loadparm_context *,
+ uint32_t , void *),
void *private)
{
int rc;
@@ -158,6 +169,7 @@ static void thread_new_task(struct event_context *ev,
}
state->new_task = new_task;
+ state->lp_ctx = lp_ctx;
state->private = private;
state->ev = ev2;