summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-02 08:41:28 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-02 13:08:36 +0100
commit29cc638c2cfe4ab785d52c3cc61e81dfaf387b29 (patch)
tree5cc7e66c125676f4159a339bc3474fe188a93be3
parent5bf95a71ddfeb6d2a77d7b4f488a4f5cf57f00f0 (diff)
downloadsamba-29cc638c2cfe4ab785d52c3cc61e81dfaf387b29.tar.gz
samba-29cc638c2cfe4ab785d52c3cc61e81dfaf387b29.tar.bz2
samba-29cc638c2cfe4ab785d52c3cc61e81dfaf387b29.zip
s4:smbd: s/private/private_data
metze
-rw-r--r--source4/smbd/process_prefork.c12
-rw-r--r--source4/smbd/process_single.c10
-rw-r--r--source4/smbd/process_standard.c14
-rw-r--r--source4/smbd/process_thread.c16
-rw-r--r--source4/smbd/server.c8
-rw-r--r--source4/smbd/service_named_pipe.c2
-rw-r--r--source4/smbd/service_stream.c24
-rw-r--r--source4/smbd/service_task.c4
8 files changed, 45 insertions, 45 deletions
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index ad8172d3a7..979a65482e 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -74,7 +74,7 @@ static void prefork_accept_connection(struct tevent_context *ev,
void (*new_conn)(struct tevent_context *,
struct loadparm_context *, struct socket_context *,
struct server_id , void *),
- void *private)
+ void *private_data)
{
NTSTATUS status;
struct socket_context *connected_socket;
@@ -86,9 +86,9 @@ static void prefork_accept_connection(struct tevent_context *ev,
return;
}
- talloc_steal(private, connected_socket);
+ talloc_steal(private_data, connected_socket);
- new_conn(ev, lp_ctx, connected_socket, cluster_id(pid, socket_get_fd(connected_socket)), private);
+ new_conn(ev, lp_ctx, connected_socket, cluster_id(pid, socket_get_fd(connected_socket)), private_data);
}
/*
@@ -98,7 +98,7 @@ static void prefork_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
void (*new_task_fn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
- void *private)
+ void *private_data)
{
pid_t pid;
int i, num_children;
@@ -120,7 +120,7 @@ static void prefork_new_task(struct tevent_context *ev,
/* the service has given us a private pointer that
encapsulates the context it needs for this new connection -
everything else will be freed */
- talloc_steal(ev2, private);
+ talloc_steal(ev2, private_data);
/* this will free all the listening sockets and all state that
is not associated with this new connection */
@@ -131,7 +131,7 @@ static void prefork_new_task(struct tevent_context *ev,
prefork_reload_after_fork();
/* setup this new connection: process will bind to it's sockets etc */
- new_task_fn(ev2, lp_ctx, cluster_id(pid, 0), private);
+ new_task_fn(ev2, lp_ctx, cluster_id(pid, 0), private_data);
num_children = lp_parm_int(lp_ctx, NULL, "prefork children", service_name, 0);
if (num_children == 0) {
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index bb82c384d6..738ace95c7 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -43,7 +43,7 @@ static void single_accept_connection(struct tevent_context *ev,
struct loadparm_context *,
struct socket_context *,
struct server_id , void *),
- void *private)
+ void *private_data)
{
NTSTATUS status;
struct socket_context *connected_socket;
@@ -67,12 +67,12 @@ static void single_accept_connection(struct tevent_context *ev,
return;
}
- talloc_steal(private, connected_socket);
+ talloc_steal(private_data, connected_socket);
/* The cluster_id(0, fd) cannot collide with the incrementing
* task below, as the first component is 0, not 1 */
new_conn(ev, lp_ctx, connected_socket,
- cluster_id(0, socket_get_fd(connected_socket)), private);
+ cluster_id(0, socket_get_fd(connected_socket)), private_data);
}
/*
@@ -82,7 +82,7 @@ static void single_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
void (*new_task)(struct tevent_context *, struct loadparm_context *, struct server_id, void *),
- void *private)
+ void *private_data)
{
static uint32_t taskid = 0;
@@ -90,7 +90,7 @@ static void single_new_task(struct tevent_context *ev,
* in the accept connection above, and unlikly to collide with
* PIDs from process modal standard (don't run samba as
* init) */
- new_task(ev, lp_ctx, cluster_id(1, taskid++), private);
+ new_task(ev, lp_ctx, cluster_id(1, taskid++), private_data);
}
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index b20adbfd16..137e0a7ce0 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -61,7 +61,7 @@ static void standard_accept_connection(struct tevent_context *ev,
void (*new_conn)(struct tevent_context *,
struct loadparm_context *, struct socket_context *,
struct server_id , void *),
- void *private)
+ void *private_data)
{
NTSTATUS status;
struct socket_context *sock2;
@@ -97,8 +97,8 @@ static void standard_accept_connection(struct tevent_context *ev,
/* the service has given us a private pointer that
encapsulates the context it needs for this new connection -
everything else will be freed */
- talloc_steal(ev2, private);
- talloc_steal(private, sock2);
+ talloc_steal(ev2, private_data);
+ talloc_steal(private_data, sock2);
/* this will free all the listening sockets and all state that
is not associated with this new connection */
@@ -128,7 +128,7 @@ static void standard_accept_connection(struct tevent_context *ev,
talloc_free(s);
/* setup this new connection. Cluster ID is PID based for this process modal */
- new_conn(ev2, lp_ctx, sock2, cluster_id(pid, 0), private);
+ new_conn(ev2, lp_ctx, sock2, cluster_id(pid, 0), private_data);
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
@@ -146,7 +146,7 @@ static void standard_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
void (*new_task)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
- void *private)
+ void *private_data)
{
pid_t pid;
struct tevent_context *ev2;
@@ -166,7 +166,7 @@ static void standard_new_task(struct tevent_context *ev,
/* the service has given us a private pointer that
encapsulates the context it needs for this new connection -
everything else will be freed */
- talloc_steal(ev2, private);
+ talloc_steal(ev2, private_data);
/* this will free all the listening sockets and all state that
is not associated with this new connection */
@@ -183,7 +183,7 @@ static void standard_new_task(struct tevent_context *ev,
setproctitle("task %s server_id[%d]", service_name, pid);
/* setup this new task. Cluster ID is PID based for this process modal */
- new_task(ev2, lp_ctx, cluster_id(pid, 0), private);
+ new_task(ev2, lp_ctx, cluster_id(pid, 0), private_data);
/* we can't return to the top level here, as that event context is gone,
so we now process events in the new event context until there are no
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index 3c3b6b287f..5be6374c14 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -41,14 +41,14 @@ struct new_conn_state {
struct socket_context *sock;
struct loadparm_context *lp_ctx;
void (*new_conn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct socket_context *, uint32_t , void *);
- void *private;
+ void *private_data;
};
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->lp_ctx, 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_data);
/* run this connection from here */
event_loop_wait(new_conn->ev);
@@ -68,7 +68,7 @@ static void thread_accept_connection(struct tevent_context *ev,
struct loadparm_context *,
struct socket_context *,
uint32_t , void *),
- void *private)
+ void *private_data)
{
NTSTATUS status;
int rc;
@@ -87,7 +87,7 @@ static void thread_accept_connection(struct tevent_context *ev,
}
state->new_conn = new_conn;
- state->private = private;
+ state->private_data = private_data;
state->lp_ctx = lp_ctx;
state->ev = ev2;
@@ -125,7 +125,7 @@ struct new_task_state {
struct loadparm_context *lp_ctx;
void (*new_task)(struct tevent_context *, struct loadparm_context *,
uint32_t , void *);
- void *private;
+ void *private_data;
};
static void *thread_task_fn(void *thread_parm)
@@ -133,7 +133,7 @@ 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, new_task->lp_ctx, pthread_self(),
- new_task->private);
+ new_task->private_data);
/* run this connection from here */
event_loop_wait(new_task->ev);
@@ -152,7 +152,7 @@ static void thread_new_task(struct tevent_context *ev,
void (*new_task)(struct tevent_context *,
struct loadparm_context *,
uint32_t , void *),
- void *private)
+ void *private_data)
{
int rc;
pthread_t thread_id;
@@ -171,7 +171,7 @@ static void thread_new_task(struct tevent_context *ev,
state->new_task = new_task;
state->lp_ctx = lp_ctx;
- state->private = private;
+ state->private_data = private_data;
state->ev = ev2;
pthread_attr_init(&thread_attr);
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index df970661f1..247a10f60f 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -149,9 +149,9 @@ static void setup_signals(void)
handle io on stdin
*/
static void server_stdin_handler(struct tevent_context *event_ctx, struct tevent_fd *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- const char *binary_name = (const char *)private;
+ const char *binary_name = (const char *)private_data;
uint8_t c;
if (read(0, &c, 1) == 0) {
DEBUG(0,("%s: EOF on stdin - terminating\n", binary_name));
@@ -169,9 +169,9 @@ static void server_stdin_handler(struct tevent_context *event_ctx, struct tevent
*/
_NORETURN_ static void max_runtime_handler(struct tevent_context *ev,
struct tevent_timer *te,
- struct timeval t, void *private)
+ struct timeval t, void *private_data)
{
- const char *binary_name = (const char *)private;
+ const char *binary_name = (const char *)private_data;
DEBUG(0,("%s: maximum runtime exceeded - terminating\n", binary_name));
exit(0);
}
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index e3c0908a15..ffa4072392 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -238,7 +238,7 @@ static void named_pipe_recv_error(void *private_data, NTSTATUS status)
stream_terminate_connection(pipe_conn->connection, nt_errstr(status));
}
-static NTSTATUS named_pipe_full_request(void *private, DATA_BLOB blob, size_t *size)
+static NTSTATUS named_pipe_full_request(void *private_data, DATA_BLOB blob, size_t *size)
{
if (blob.length < 8) {
return STATUS_MORE_ENTRIES;
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 6dff01f4f3..fe07dc5a38 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -47,7 +47,7 @@ struct stream_socket {
struct tevent_context *event_ctx;
const struct model_ops *model_ops;
struct socket_context *sock;
- void *private;
+ void *private_data;
};
@@ -101,16 +101,16 @@ static void stream_io_handler(struct stream_connection *conn, uint16_t flags)
}
static void stream_io_handler_fde(struct tevent_context *ev, struct tevent_fd *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- struct stream_connection *conn = talloc_get_type(private,
+ struct stream_connection *conn = talloc_get_type(private_data,
struct stream_connection);
stream_io_handler(conn, flags);
}
-void stream_io_handler_callback(void *private, uint16_t flags)
+void stream_io_handler_callback(void *private_data, uint16_t flags)
{
- struct stream_connection *conn = talloc_get_type(private,
+ struct stream_connection *conn = talloc_get_type(private_data,
struct stream_connection);
stream_io_handler(conn, flags);
}
@@ -163,9 +163,9 @@ NTSTATUS stream_new_connection_merge(struct tevent_context *ev,
static void stream_new_connection(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct socket_context *sock,
- struct server_id server_id, void *private)
+ struct server_id server_id, void *private_data)
{
- struct stream_socket *stream_socket = talloc_get_type(private, struct stream_socket);
+ struct stream_socket *stream_socket = talloc_get_type(private_data, struct stream_socket);
struct stream_connection *srv_conn;
struct socket_address *c, *s;
@@ -177,7 +177,7 @@ static void stream_new_connection(struct tevent_context *ev,
talloc_steal(srv_conn, sock);
- srv_conn->private = stream_socket->private;
+ srv_conn->private = stream_socket->private_data;
srv_conn->model_ops = stream_socket->model_ops;
srv_conn->socket = sock;
srv_conn->server_id = server_id;
@@ -235,9 +235,9 @@ static void stream_new_connection(struct tevent_context *ev,
called when someone opens a connection to one of our listening ports
*/
static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *fde,
- uint16_t flags, void *private)
+ uint16_t flags, void *private_data)
{
- struct stream_socket *stream_socket = talloc_get_type(private, struct stream_socket);
+ struct stream_socket *stream_socket = talloc_get_type(private_data, struct stream_socket);
/* ask the process model to create us a process for this new
connection. When done, it calls stream_new_connection()
@@ -263,7 +263,7 @@ NTSTATUS stream_setup_socket(struct tevent_context *event_context,
const char *sock_addr,
uint16_t *port,
const char *socket_options,
- void *private)
+ void *private_data)
{
NTSTATUS status;
struct stream_socket *stream_socket;
@@ -352,7 +352,7 @@ NTSTATUS stream_setup_socket(struct tevent_context *event_context,
tevent_fd_set_close_fn(fde, socket_tevent_fd_close_fn);
socket_set_flags(stream_socket->sock, SOCKET_FLAG_NOCLOSE);
- stream_socket->private = talloc_reference(stream_socket, private);
+ stream_socket->private_data = talloc_reference(stream_socket, private_data);
stream_socket->ops = stream_ops;
stream_socket->event_ctx = event_context;
stream_socket->model_ops = model_ops;
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c
index d3951a4a9a..c4fd3d4e98 100644
--- a/source4/smbd/service_task.c
+++ b/source4/smbd/service_task.c
@@ -53,9 +53,9 @@ struct task_state {
*/
static void task_server_callback(struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
- struct server_id server_id, void *private)
+ struct server_id server_id, void *private_data)
{
- struct task_state *state = talloc_get_type(private, struct task_state);
+ struct task_state *state = talloc_get_type(private_data, struct task_state);
struct task_server *task;
task = talloc(event_ctx, struct task_server);