s3-prefork: Pass the child a child_id
authorSimo Sorce <idra@samba.org>
Fri, 5 Aug 2011 14:34:05 +0000 (10:34 -0400)
committerAndreas Schneider <asn@samba.org>
Wed, 10 Aug 2011 16:14:05 +0000 (18:14 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
source3/lib/server_prefork.c
source3/lib/server_prefork.h
source3/printing/spoolssd.c

index 47020b274064ff14bba913b1063dd9027cff6ff7..54a0dbc17142effbc4b9217ca2b578704b2b2e36 100644 (file)
@@ -121,7 +121,7 @@ bool prefork_create_pool(TALLOC_CTX *mem_ctx,
 
                        pfp->pool[i].status = PF_WORKER_IDLE;
                        ret = pfp->main_fn(ev_ctx, msg_ctx,
-                                          &pfp->pool[i],
+                                          &pfp->pool[i], i,
                                           pfp->listen_fd_size,
                                           pfp->listen_fds,
                                           pfp->lock_fd,
@@ -206,7 +206,7 @@ int prefork_add_children(struct tevent_context *ev_ctx,
 
                        pfp->pool[i].status = PF_WORKER_IDLE;
                        ret = pfp->main_fn(ev_ctx, msg_ctx,
-                                          &pfp->pool[i],
+                                          &pfp->pool[i], i,
                                           pfp->listen_fd_size,
                                           pfp->listen_fds,
                                           pfp->lock_fd,
index d3ba919950fa7028351bd10a1ba875c34a32087a..31ebe213bb62467205dfdffe72e0e2661ac8806e 100644 (file)
@@ -76,6 +76,7 @@ struct pf_worker_data {
 typedef int (prefork_main_fn_t)(struct tevent_context *ev,
                                struct messaging_context *msg_ctx,
                                struct pf_worker_data *pf,
+                               int child_id,
                                int listen_fd_size,
                                int *listen_fds,
                                int lock_fd,
index 1297b581293382a3177ad1ab37e407d6f851a753..2e68a97e32130f0849f3c80ec84efc1c47ca02b9 100644 (file)
@@ -359,6 +359,7 @@ static void spoolss_next_client(void *pvt);
 static int spoolss_children_main(struct tevent_context *ev_ctx,
                                 struct messaging_context *msg_ctx,
                                 struct pf_worker_data *pf,
+                                int child_id,
                                 int listen_fd_size,
                                 int *listen_fds,
                                 int lock_fd,