summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-29 20:24:57 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-29 20:46:40 +0100
commit183c379fe58ca60f5ef2d1f2033d035d4117ac8f (patch)
treed68d3895f1e79b96c3af2c80cac6a403a1a180d4 /source4/smbd
parentaf29b82536ef678e6a1817aa11be8c363253b305 (diff)
downloadsamba-183c379fe58ca60f5ef2d1f2033d035d4117ac8f.tar.gz
samba-183c379fe58ca60f5ef2d1f2033d035d4117ac8f.tar.bz2
samba-183c379fe58ca60f5ef2d1f2033d035d4117ac8f.zip
s4:lib/tevent: rename structs
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_model.c2
-rw-r--r--source4/smbd/process_model.h16
-rw-r--r--source4/smbd/process_prefork.c16
-rw-r--r--source4/smbd/process_single.c14
-rw-r--r--source4/smbd/process_standard.c18
-rw-r--r--source4/smbd/process_thread.c26
-rw-r--r--source4/smbd/server.c8
-rw-r--r--source4/smbd/service.c4
-rw-r--r--source4/smbd/service_named_pipe.c2
-rw-r--r--source4/smbd/service_stream.c14
-rw-r--r--source4/smbd/service_stream.h4
-rw-r--r--source4/smbd/service_task.c6
-rw-r--r--source4/smbd/service_task.h2
13 files changed, 66 insertions, 66 deletions
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index d6346a06f9..0ae544e037 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -28,7 +28,7 @@ static const struct model_ops *process_model_byname(const char *name);
/*
setup the events for the chosen process model
*/
-_PUBLIC_ const struct model_ops *process_model_startup(struct event_context *ev, const char *model)
+_PUBLIC_ const struct model_ops *process_model_startup(struct tevent_context *ev, const char *model)
{
const struct model_ops *ops;
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h
index 6afb66ff20..29f57d9df6 100644
--- a/source4/smbd/process_model.h
+++ b/source4/smbd/process_model.h
@@ -41,33 +41,33 @@ struct model_ops {
const char *name;
/* called at startup when the model is selected */
- void (*model_init)(struct event_context *);
+ void (*model_init)(struct tevent_context *);
/* function to accept new connection */
- void (*accept_connection)(struct event_context *,
+ void (*accept_connection)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
- void (*)(struct event_context *,
+ void (*)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
struct server_id , void *),
void *);
/* function to create a task */
- void (*new_task)(struct event_context *,
+ void (*new_task)(struct tevent_context *,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*)(struct event_context *,
+ void (*)(struct tevent_context *,
struct loadparm_context *, struct server_id,
void *),
void *);
/* function to terminate a connection or task */
- void (*terminate)(struct event_context *, struct loadparm_context *lp_ctx,
+ void (*terminate)(struct tevent_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);
+ void (*set_title)(struct tevent_context *, const char *title);
};
/* this structure is used by modules to determine the size of some critical types */
@@ -78,7 +78,7 @@ struct process_model_critical_sizes {
extern const struct model_ops single_ops;
-const struct model_ops *process_model_startup(struct event_context *ev, const char *model);
+const struct model_ops *process_model_startup(struct tevent_context *ev, const char *model);
NTSTATUS register_process_model(const void *_ops);
NTSTATUS process_model_init(struct loadparm_context *lp_ctx);
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index 1b369613ff..ad8172d3a7 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -49,7 +49,7 @@ static int none_setproctitle(const char *fmt, ...)
/*
called when the process model is selected
*/
-static void prefork_model_init(struct event_context *ev)
+static void prefork_model_init(struct tevent_context *ev)
{
signal(SIGCHLD, SIG_IGN);
}
@@ -68,10 +68,10 @@ static void prefork_reload_after_fork(void)
/*
called when a listening socket becomes readable.
*/
-static void prefork_accept_connection(struct event_context *ev,
+static void prefork_accept_connection(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct socket_context *listen_socket,
- void (*new_conn)(struct event_context *,
+ void (*new_conn)(struct tevent_context *,
struct loadparm_context *, struct socket_context *,
struct server_id , void *),
void *private)
@@ -94,16 +94,16 @@ static void prefork_accept_connection(struct event_context *ev,
/*
called to create a new server task
*/
-static void prefork_new_task(struct event_context *ev,
+static void prefork_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task_fn)(struct event_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
+ void (*new_task_fn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
void *private)
{
pid_t pid;
int i, num_children;
- struct event_context *ev2, *ev_parent;
+ struct tevent_context *ev2, *ev_parent;
pid = fork();
@@ -189,13 +189,13 @@ static void prefork_new_task(struct event_context *ev,
/* called when a task goes down */
-_NORETURN_ static void prefork_terminate(struct event_context *ev, struct loadparm_context *lp_ctx, const char *reason)
+_NORETURN_ static void prefork_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason)
{
DEBUG(2,("prefork_terminate: reason[%s]\n",reason));
}
/* called to set a title of a task or connection */
-static void prefork_set_title(struct event_context *ev, const char *title)
+static void prefork_set_title(struct tevent_context *ev, const char *title)
{
if (title) {
setproctitle("%s", title);
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c
index 26afff9930..bb82c384d6 100644
--- a/source4/smbd/process_single.c
+++ b/source4/smbd/process_single.c
@@ -29,17 +29,17 @@
/*
called when the process model is selected
*/
-static void single_model_init(struct event_context *ev)
+static void single_model_init(struct tevent_context *ev)
{
}
/*
called when a listening socket becomes readable.
*/
-static void single_accept_connection(struct event_context *ev,
+static void single_accept_connection(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct socket_context *listen_socket,
- void (*new_conn)(struct event_context *,
+ void (*new_conn)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
struct server_id , void *),
@@ -78,10 +78,10 @@ static void single_accept_connection(struct event_context *ev,
/*
called to startup a new task
*/
-static void single_new_task(struct event_context *ev,
+static void single_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task)(struct event_context *, struct loadparm_context *, struct server_id, void *),
+ void (*new_task)(struct tevent_context *, struct loadparm_context *, struct server_id, void *),
void *private)
{
static uint32_t taskid = 0;
@@ -95,13 +95,13 @@ static void single_new_task(struct event_context *ev,
/* called when a task goes down */
-static void single_terminate(struct event_context *ev, struct loadparm_context *lp_ctx, const char *reason)
+static void single_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *reason)
{
DEBUG(2,("single_terminate: reason[%s]\n",reason));
}
/* called to set a title of a task or connection */
-static void single_set_title(struct event_context *ev, const char *title)
+static void single_set_title(struct tevent_context *ev, const char *title)
{
}
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 0a864dabb2..b20adbfd16 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -47,7 +47,7 @@ static int none_setproctitle(const char *fmt, ...)
/*
called when the process model is selected
*/
-static void standard_model_init(struct event_context *ev)
+static void standard_model_init(struct tevent_context *ev)
{
signal(SIGCHLD, SIG_IGN);
}
@@ -55,10 +55,10 @@ static void standard_model_init(struct event_context *ev)
/*
called when a listening socket becomes readable.
*/
-static void standard_accept_connection(struct event_context *ev,
+static void standard_accept_connection(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct socket_context *sock,
- void (*new_conn)(struct event_context *,
+ void (*new_conn)(struct tevent_context *,
struct loadparm_context *, struct socket_context *,
struct server_id , void *),
void *private)
@@ -66,7 +66,7 @@ static void standard_accept_connection(struct event_context *ev,
NTSTATUS status;
struct socket_context *sock2;
pid_t pid;
- struct event_context *ev2;
+ struct tevent_context *ev2;
struct socket_address *c, *s;
/* accept an incoming connection. */
@@ -142,14 +142,14 @@ static void standard_accept_connection(struct event_context *ev,
/*
called to create a new server task
*/
-static void standard_new_task(struct event_context *ev,
+static void standard_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task)(struct event_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
+ void (*new_task)(struct tevent_context *, struct loadparm_context *lp_ctx, struct server_id , void *),
void *private)
{
pid_t pid;
- struct event_context *ev2;
+ struct tevent_context *ev2;
pid = fork();
@@ -196,7 +196,7 @@ static void standard_new_task(struct event_context *ev,
/* called when a task goes down */
-_NORETURN_ static void standard_terminate(struct event_context *ev, struct loadparm_context *lp_ctx,
+_NORETURN_ static void standard_terminate(struct tevent_context *ev, struct loadparm_context *lp_ctx,
const char *reason)
{
DEBUG(2,("standard_terminate: reason[%s]\n",reason));
@@ -212,7 +212,7 @@ _NORETURN_ static void standard_terminate(struct event_context *ev, struct loadp
}
/* called to set a title of a task or connection */
-static void standard_set_title(struct event_context *ev, const char *title)
+static void standard_set_title(struct tevent_context *ev, const char *title)
{
if (title) {
setproctitle("%s", title);
diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c
index 597cf587f1..3c3b6b287f 100644
--- a/source4/smbd/process_thread.c
+++ b/source4/smbd/process_thread.c
@@ -37,10 +37,10 @@
static pthread_key_t title_key;
struct new_conn_state {
- struct event_context *ev;
+ struct tevent_context *ev;
struct socket_context *sock;
struct loadparm_context *lp_ctx;
- void (*new_conn)(struct event_context *, struct loadparm_context *lp_ctx, struct socket_context *, uint32_t , void *);
+ void (*new_conn)(struct tevent_context *, struct loadparm_context *lp_ctx, struct socket_context *, uint32_t , void *);
void *private;
};
@@ -61,10 +61,10 @@ static void *thread_connection_fn(void *thread_parm)
/*
called when a listening socket becomes readable
*/
-static void thread_accept_connection(struct event_context *ev,
+static void thread_accept_connection(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
struct socket_context *sock,
- void (*new_conn)(struct event_context *,
+ void (*new_conn)(struct tevent_context *,
struct loadparm_context *,
struct socket_context *,
uint32_t , void *),
@@ -75,7 +75,7 @@ static void thread_accept_connection(struct event_context *ev,
pthread_t thread_id;
pthread_attr_t thread_attr;
struct new_conn_state *state;
- struct event_context *ev2;
+ struct tevent_context *ev2;
ev2 = s4_event_context_init(ev);
if (ev2 == NULL) return;
@@ -121,9 +121,9 @@ static void thread_accept_connection(struct event_context *ev,
struct new_task_state {
- struct event_context *ev;
+ struct tevent_context *ev;
struct loadparm_context *lp_ctx;
- void (*new_task)(struct event_context *, struct loadparm_context *,
+ void (*new_task)(struct tevent_context *, struct loadparm_context *,
uint32_t , void *);
void *private;
};
@@ -146,10 +146,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,
+static void thread_new_task(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const char *service_name,
- void (*new_task)(struct event_context *,
+ void (*new_task)(struct tevent_context *,
struct loadparm_context *,
uint32_t , void *),
void *private)
@@ -158,7 +158,7 @@ static void thread_new_task(struct event_context *ev,
pthread_t thread_id;
pthread_attr_t thread_attr;
struct new_task_state *state;
- struct event_context *ev2;
+ struct tevent_context *ev2;
ev2 = s4_event_context_init(ev);
if (ev2 == NULL) return;
@@ -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, struct loadparm_context *lp_ctx, const char *reason)
+static void thread_terminate(struct tevent_context *event_ctx, struct loadparm_context *lp_ctx, const char *reason)
{
DEBUG(10,("thread_terminate: reason[%s]\n",reason));
@@ -199,7 +199,7 @@ static void thread_terminate(struct event_context *event_ctx, struct loadparm_co
}
/* called to set a title of a task or connection */
-static void thread_set_title(struct event_context *ev, const char *title)
+static void thread_set_title(struct tevent_context *ev, const char *title)
{
char *old_title;
char *new_title;
@@ -509,7 +509,7 @@ static void thread_fault_handler(int sig)
/*
called when the process model is selected
*/
-static void thread_model_init(struct event_context *event_context)
+static void thread_model_init(struct tevent_context *event_context)
{
struct mutex_ops m_ops;
struct debug_ops d_ops;
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 394df0bb82..c1683a48dc 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -148,7 +148,7 @@ static void setup_signals(void)
/*
handle io on stdin
*/
-static void server_stdin_handler(struct event_context *event_ctx, struct fd_event *fde,
+static void server_stdin_handler(struct tevent_context *event_ctx, struct tevent_fd *fde,
uint16_t flags, void *private)
{
const char *binary_name = (const char *)private;
@@ -167,8 +167,8 @@ static void server_stdin_handler(struct event_context *event_ctx, struct fd_even
/*
die if the user selected maximum runtime is exceeded
*/
-_NORETURN_ static void max_runtime_handler(struct event_context *ev,
- struct timed_event *te,
+_NORETURN_ static void max_runtime_handler(struct tevent_context *ev,
+ struct tevent_timer *te,
struct timeval t, void *private)
{
const char *binary_name = (const char *)private;
@@ -201,7 +201,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
extern NTSTATUS server_service_samba3_smb_init(void);
init_module_fn static_init[] = { STATIC_service_MODULES };
init_module_fn *shared_init;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
uint16_t stdin_event_flags;
NTSTATUS status;
const char *model = "standard";
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index 52db2801e9..7b53e9fa4e 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -53,7 +53,7 @@ NTSTATUS register_server_service(const char *name,
initialise a server service
*/
static NTSTATUS server_service_init(const char *name,
- struct event_context *event_context,
+ struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops)
{
@@ -71,7 +71,7 @@ static NTSTATUS server_service_init(const char *name,
/*
startup all of our server services
*/
-NTSTATUS server_service_startup(struct event_context *event_ctx,
+NTSTATUS server_service_startup(struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *model, const char **server_services)
{
diff --git a/source4/smbd/service_named_pipe.c b/source4/smbd/service_named_pipe.c
index ad7ba76b0d..94fd501ffe 100644
--- a/source4/smbd/service_named_pipe.c
+++ b/source4/smbd/service_named_pipe.c
@@ -300,7 +300,7 @@ static const struct stream_server_ops named_pipe_stream_ops = {
.send_handler = named_pipe_send,
};
-NTSTATUS stream_setup_named_pipe(struct event_context *event_context,
+NTSTATUS stream_setup_named_pipe(struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index ce5b6519a1..ef98919f93 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -44,7 +44,7 @@
struct stream_socket {
const struct stream_server_ops *ops;
struct loadparm_context *lp_ctx;
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
const struct model_ops *model_ops;
struct socket_context *sock;
void *private;
@@ -56,7 +56,7 @@ struct stream_socket {
*/
void stream_terminate_connection(struct stream_connection *srv_conn, const char *reason)
{
- struct event_context *event_ctx = srv_conn->event.ctx;
+ struct tevent_context *event_ctx = srv_conn->event.ctx;
const struct model_ops *model_ops = srv_conn->model_ops;
if (!reason) reason = "unknown reason";
@@ -100,7 +100,7 @@ static void stream_io_handler(struct stream_connection *conn, uint16_t flags)
}
}
-static void stream_io_handler_fde(struct event_context *ev, struct fd_event *fde,
+static void stream_io_handler_fde(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct stream_connection *conn = talloc_get_type(private,
@@ -120,7 +120,7 @@ void stream_io_handler_callback(void *private, uint16_t flags)
used for protocols, where a client connection needs to switched into
a server connection
*/
-NTSTATUS stream_new_connection_merge(struct event_context *ev,
+NTSTATUS stream_new_connection_merge(struct tevent_context *ev,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
struct socket_context *sock,
@@ -155,7 +155,7 @@ NTSTATUS stream_new_connection_merge(struct event_context *ev,
called when a new socket connection has been established. This is called in the process
context of the new process (if appropriate)
*/
-static void stream_new_connection(struct event_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)
@@ -224,7 +224,7 @@ static void stream_new_connection(struct event_context *ev,
/*
called when someone opens a connection to one of our listening ports
*/
-static void stream_accept_handler(struct event_context *ev, struct fd_event *fde,
+static void stream_accept_handler(struct tevent_context *ev, struct tevent_fd *fde,
uint16_t flags, void *private)
{
struct stream_socket *stream_socket = talloc_get_type(private, struct stream_socket);
@@ -245,7 +245,7 @@ static void stream_accept_handler(struct event_context *ev, struct fd_event *fde
a string for the port. Should leave allocating a port nr
to the socket implementation - JRV20070903
*/
-NTSTATUS stream_setup_socket(struct event_context *event_context,
+NTSTATUS stream_setup_socket(struct tevent_context *event_context,
struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
const struct stream_server_ops *stream_ops,
diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h
index 805c140a83..078887bf14 100644
--- a/source4/smbd/service_stream.h
+++ b/source4/smbd/service_stream.h
@@ -42,8 +42,8 @@ struct stream_connection {
void *private;
struct {
- struct event_context *ctx;
- struct fd_event *fde;
+ struct tevent_context *ctx;
+ struct tevent_fd *fde;
} event;
struct socket_context *socket;
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c
index 9a2903e281..34ce755b93 100644
--- a/source4/smbd/service_task.c
+++ b/source4/smbd/service_task.c
@@ -32,7 +32,7 @@
*/
void task_server_terminate(struct task_server *task, const char *reason)
{
- struct event_context *event_ctx = task->event_ctx;
+ struct tevent_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, task->lp_ctx, reason);
@@ -52,7 +52,7 @@ struct task_state {
called by the process model code when the new task starts up. This then calls
the server specific startup code
*/
-static void task_server_callback(struct event_context *event_ctx,
+static void task_server_callback(struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
struct server_id server_id, void *private)
{
@@ -83,7 +83,7 @@ static void task_server_callback(struct event_context *event_ctx,
/*
startup a task based server
*/
-NTSTATUS task_server_startup(struct event_context *event_ctx,
+NTSTATUS task_server_startup(struct tevent_context *event_ctx,
struct loadparm_context *lp_ctx,
const char *service_name,
const struct model_ops *model_ops,
diff --git a/source4/smbd/service_task.h b/source4/smbd/service_task.h
index c49962f05f..f5788da021 100644
--- a/source4/smbd/service_task.h
+++ b/source4/smbd/service_task.h
@@ -25,7 +25,7 @@
#include "librpc/gen_ndr/server_id.h"
struct task_server {
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
const struct model_ops *model_ops;
struct messaging_context *msg_ctx;
struct loadparm_context *lp_ctx;