diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-29 20:24:57 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-12-29 20:46:40 +0100 |
commit | 183c379fe58ca60f5ef2d1f2033d035d4117ac8f (patch) | |
tree | d68d3895f1e79b96c3af2c80cac6a403a1a180d4 /source4/lib | |
parent | af29b82536ef678e6a1817aa11be8c363253b305 (diff) | |
download | samba-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/lib')
36 files changed, 112 insertions, 112 deletions
diff --git a/source4/lib/com/com.h b/source4/lib/com/com.h index 5d594ad41b..82d10daf4f 100644 --- a/source4/lib/com/com.h +++ b/source4/lib/com/com.h @@ -23,12 +23,12 @@ #include "librpc/gen_ndr/misc.h" struct com_context; -struct event_context; +struct tevent_context; struct com_context { struct dcom_client_context *dcom; - struct event_context *event_ctx; + struct tevent_context *event_ctx; struct com_extension { uint32_t id; void *data; @@ -42,7 +42,7 @@ NTSTATUS com_register_running_class(struct GUID *clsid, const char *progid, stru struct dcom_interface_p *dcom_get_local_iface_p(struct GUID *ipid); -WERROR com_init_ctx(struct com_context **ctx, struct event_context *event_ctx); +WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx); WERROR com_create_object(struct com_context *ctx, struct GUID *clsid, int num_ifaces, struct GUID *iid, struct IUnknown **ip, WERROR *results); WERROR com_get_class_object(struct com_context *ctx, struct GUID *clsid, struct GUID *iid, struct IUnknown **ip); NTSTATUS com_init(void); diff --git a/source4/lib/com/main.c b/source4/lib/com/main.c index daed8c11e5..062d1360ac 100644 --- a/source4/lib/com/main.c +++ b/source4/lib/com/main.c @@ -24,7 +24,7 @@ #include "lib/events/events.h" #include "librpc/gen_ndr/com_dcom.h" -WERROR com_init_ctx(struct com_context **ctx, struct event_context *event_ctx) +WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx) { *ctx = talloc(NULL, struct com_context); if (event_ctx == NULL) { diff --git a/source4/lib/events/events.h b/source4/lib/events/events.h index 803cba8456..698ff2919b 100644 --- a/source4/lib/events/events.h +++ b/source4/lib/events/events.h @@ -2,6 +2,6 @@ #define __LIB_EVENTS_H__ #define TEVENT_COMPAT_DEFINES 1 #include <../lib/tevent/tevent.h> -struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx); -struct event_context *event_context_find(TALLOC_CTX *mem_ctx); +struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx); +struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx); #endif /* __LIB_EVENTS_H__ */ diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c index 22e0525263..b3de7e667a 100644 --- a/source4/lib/events/tevent_s4.c +++ b/source4/lib/events/tevent_s4.c @@ -59,9 +59,9 @@ static void ev_wrap_debug(void *context, enum ev_debug_level level, This samba4 specific call sets the samba4 debug handler. */ -struct event_context *s4_event_context_init(TALLOC_CTX *mem_ctx) +struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx) { - struct event_context *ev; + struct tevent_context *ev; ev = event_context_init_byname(mem_ctx, NULL); if (ev) { diff --git a/source4/lib/ldb/common/ldb.c b/source4/lib/ldb/common/ldb.c index c013565da0..4443362448 100644 --- a/source4/lib/ldb/common/ldb.c +++ b/source4/lib/ldb/common/ldb.c @@ -39,7 +39,7 @@ The mem_ctx is required The event_ctx is required */ -struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx) +struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx) { struct ldb_context *ldb; int ret; @@ -393,7 +393,7 @@ static int ldb_autotransaction_request(struct ldb_context *ldb, int ldb_wait(struct ldb_handle *handle, enum ldb_wait_type type) { - struct event_context *ev; + struct tevent_context *ev; if (!handle) { return LDB_ERR_UNAVAILABLE; @@ -474,12 +474,12 @@ void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms) ldb->create_perms = perms; } -void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev) +void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev) { ldb->ev_ctx = ev; } -struct event_context * ldb_get_event_context(struct ldb_context *ldb) +struct tevent_context * ldb_get_event_context(struct ldb_context *ldb) { return ldb->ev_ctx; } diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index e2ec869872..28c54f5a3c 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -181,7 +181,7 @@ enum ldb_scope {LDB_SCOPE_DEFAULT=-1, LDB_SCOPE_SUBTREE=2}; struct ldb_context; -struct event_context; +struct tevent_context; /* debugging uses one of the following levels */ enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR, @@ -795,9 +795,9 @@ int ldb_set_timeout(struct ldb_context *ldb, struct ldb_request *req, int timeou int ldb_set_timeout_from_prev_req(struct ldb_context *ldb, struct ldb_request *oldreq, struct ldb_request *newreq); void ldb_set_create_perms(struct ldb_context *ldb, unsigned int perms); void ldb_set_modules_dir(struct ldb_context *ldb, const char *path); -struct event_context; -void ldb_set_event_context(struct ldb_context *ldb, struct event_context *ev); -struct event_context * ldb_get_event_context(struct ldb_context *ldb); +struct tevent_context; +void ldb_set_event_context(struct ldb_context *ldb, struct tevent_context *ev); +struct tevent_context * ldb_get_event_context(struct ldb_context *ldb); /** Initialise ldbs' global information @@ -819,7 +819,7 @@ int ldb_global_init(void); \return pointer to ldb_context that should be free'd (using talloc_free()) at the end of the program. */ -struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx); +struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx); /** Connect to a database. diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index c065288279..cf4017ef14 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -123,7 +123,7 @@ struct ldb_context { char *modules_dir; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; }; #ifndef ARRAY_SIZE diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index a95859276f..9e31bc62bb 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -52,7 +52,7 @@ struct ildb_private { struct ldap_connection *ldap; - struct event_context *event_ctx; + struct tevent_context *event_ctx; }; struct ildb_context { @@ -92,8 +92,8 @@ static void ildb_request_done(struct ildb_context *ctx, ctx->req->callback(ctx->req, ares); } -static void ildb_auto_done_callback(struct event_context *ev, - struct timed_event *te, +static void ildb_auto_done_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -182,7 +182,7 @@ static int ildb_map_error(struct ldb_module *module, NTSTATUS status) return LDB_ERR_OPERATIONS_ERROR; } -static void ildb_request_timeout(struct event_context *ev, struct timed_event *te, +static void ildb_request_timeout(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private_data) { struct ildb_context *ac = talloc_get_type(private_data, struct ildb_context); @@ -661,7 +661,7 @@ static int ildb_handle_request(struct ldb_module *module, struct ldb_request *re { struct ildb_private *ildb; struct ildb_context *ac; - struct timed_event *te; + struct tevent_timer *te; int ret; ildb = talloc_get_type(module->private_data, struct ildb_private); diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 9f8b3e9f35..8e053818e5 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -619,8 +619,8 @@ free_and_return: return lret; } -static void lldb_timeout(struct event_context *ev, - struct timed_event *te, +static void lldb_timeout(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -630,13 +630,13 @@ static void lldb_timeout(struct event_context *ev, lldb_request_done(ac->req, NULL, LDB_ERR_TIME_LIMIT_EXCEEDED); } -static void lldb_callback(struct event_context *ev, - struct timed_event *te, +static void lldb_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { struct lldb_context *ac; - struct timed_event *lte; + struct tevent_timer *lte; struct timeval tv; LDAPMessage *result; int lret; @@ -701,8 +701,8 @@ static bool lldb_dn_is_special(struct ldb_request *req) return false; } -static void lldb_auto_done_callback(struct event_context *ev, - struct timed_event *te, +static void lldb_auto_done_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -716,8 +716,8 @@ static int lldb_handle_request(struct ldb_module *module, struct ldb_request *re { struct lldb_private *lldb; struct lldb_context *ac; - struct event_context *ev; - struct timed_event *te; + struct tevent_context *ev; + struct tevent_timer *te; struct timeval tv; int ret; diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index ea460def65..76469e356b 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -999,8 +999,8 @@ static void ltdb_request_done(struct ldb_request *req, int error) req->callback(req, ares); } -static void ltdb_timeout(struct event_context *ev, - struct timed_event *te, +static void ltdb_timeout(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -1051,8 +1051,8 @@ static void ltdb_handle_extended(struct ltdb_context *ctx) ltdb_request_extended_done(ctx->req, ext, ret); } -static void ltdb_callback(struct event_context *ev, - struct timed_event *te, +static void ltdb_callback(struct tevent_context *ev, + struct tevent_timer *te, struct timeval t, void *private_data) { @@ -1095,9 +1095,9 @@ static void ltdb_callback(struct event_context *ev, static int ltdb_handle_request(struct ldb_module *module, struct ldb_request *req) { - struct event_context *ev; + struct tevent_context *ev; struct ltdb_context *ac; - struct timed_event *te; + struct tevent_timer *te; struct timeval tv; if (check_critical_controls(req->controls)) { diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.h b/source4/lib/ldb/ldb_tdb/ldb_tdb.h index 7b9a76501f..b373d37b7e 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.h +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.h @@ -51,7 +51,7 @@ struct ltdb_context { struct ldb_dn *base; enum ldb_scope scope; const char * const *attrs; - struct timed_event *timeout_event; + struct tevent_timer *timeout_event; }; /* special record types */ diff --git a/source4/lib/ldb_wrap.c b/source4/lib/ldb_wrap.c index 617371333f..15cf11f942 100644 --- a/source4/lib/ldb_wrap.c +++ b/source4/lib/ldb_wrap.c @@ -95,7 +95,7 @@ static int ldb_wrap_destructor(struct ldb_context *ldb) TODO: We need an error_string parameter */ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *url, struct auth_session_info *session_info, diff --git a/source4/lib/ldb_wrap.h b/source4/lib/ldb_wrap.h index f2982302ab..f44ff8c599 100644 --- a/source4/lib/ldb_wrap.h +++ b/source4/lib/ldb_wrap.h @@ -27,12 +27,12 @@ struct ldb_message; struct ldb_dn; struct cli_credentials; struct loadparm_context; -struct event_context; +struct tevent_context; char *wrap_casefold(void *context, void *mem_ctx, const char *s, size_t n); struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct loadparm_context *lp_ctx, const char *url, struct auth_session_info *session_info, diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h index 3527f10648..fa91a147c6 100644 --- a/source4/lib/messaging/irpc.h +++ b/source4/lib/messaging/irpc.h @@ -37,7 +37,7 @@ struct irpc_message { struct messaging_context *msg_ctx; struct irpc_list *irpc; void *data; - struct event_context *ev; + struct tevent_context *ev; }; /* don't allow calls to take too long */ @@ -97,11 +97,11 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, const char *dir, struct server_id server_id, struct smb_iconv_convenience *iconv_convenience, - struct event_context *ev); + struct tevent_context *ev); struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, const char *dir, struct smb_iconv_convenience *iconv_convenience, - struct event_context *ev); + struct tevent_context *ev); NTSTATUS messaging_send_ptr(struct messaging_context *msg, struct server_id server, uint32_t msg_type, void *ptr); void messaging_deregister(struct messaging_context *msg, uint32_t msg_type, void *private); diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index ff9ef8afc5..decad7b5a8 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -52,10 +52,10 @@ struct messaging_context { struct idr_context *idr; const char **names; struct timeval start_time; - struct timed_event *retry_te; + struct tevent_timer *retry_te; struct { - struct event_context *ev; - struct fd_event *fde; + struct tevent_context *ev; + struct tevent_fd *fde; } event; }; @@ -216,7 +216,7 @@ static NTSTATUS try_send(struct messaging_rec *rec) /* retry backed off messages */ -static void msg_retry_timer(struct event_context *ev, struct timed_event *te, +static void msg_retry_timer(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private) { struct messaging_context *msg = talloc_get_type(private, @@ -338,7 +338,7 @@ static void messaging_recv_handler(struct messaging_context *msg) /* handle a socket event */ -static void messaging_handler(struct event_context *ev, struct fd_event *fde, +static void messaging_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private) { struct messaging_context *msg = talloc_get_type(private, @@ -536,7 +536,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, const char *dir, struct server_id server_id, struct smb_iconv_convenience *iconv_convenience, - struct event_context *ev) + struct tevent_context *ev) { struct messaging_context *msg; NTSTATUS status; @@ -615,7 +615,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, struct messaging_context *messaging_client_init(TALLOC_CTX *mem_ctx, const char *dir, struct smb_iconv_convenience *iconv_convenience, - struct event_context *ev) + struct tevent_context *ev) { struct server_id id; ZERO_STRUCT(id); @@ -843,7 +843,7 @@ static int irpc_destructor(struct irpc_request *irpc) /* timeout a irpc request */ -static void irpc_timeout(struct event_context *ev, struct timed_event *te, +static void irpc_timeout(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private) { struct irpc_request *irpc = talloc_get_type(private, struct irpc_request); diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c index 9f04bf0c6d..9cc14b4381 100644 --- a/source4/lib/messaging/pymessaging.c +++ b/source4/lib/messaging/pymessaging.c @@ -65,7 +65,7 @@ typedef struct { PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs) { - struct event_context *ev; + struct tevent_context *ev; const char *kwnames[] = { "own_id", "messaging_path", NULL }; PyObject *own_id = Py_None; const char *messaging_path = NULL; @@ -317,7 +317,7 @@ typedef struct { PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs) { - struct event_context *ev; + struct tevent_context *ev; const char *kwnames[] = { "server", "own_id", "messaging_path", NULL }; char *server; const char *messaging_path = NULL; diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c index d9b0548643..d45bcb6bf7 100644 --- a/source4/lib/messaging/tests/irpc.c +++ b/source4/lib/messaging/tests/irpc.c @@ -34,7 +34,7 @@ static bool test_debug; struct irpc_test_data { struct messaging_context *msg_ctx1, *msg_ctx2; - struct event_context *ev; + struct tevent_context *ev; }; /* @@ -53,7 +53,7 @@ static NTSTATUS irpc_AddOne(struct irpc_message *irpc, struct echo_AddOne *r) /* a deferred reply to echodata */ -static void deferred_echodata(struct event_context *ev, struct timed_event *te, +static void deferred_echodata(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private) { struct irpc_message *irpc = talloc_get_type(private, struct irpc_message); diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c index f66b3a5b43..838de55d83 100644 --- a/source4/lib/messaging/tests/messaging.c +++ b/source4/lib/messaging/tests/messaging.c @@ -58,7 +58,7 @@ static void exit_message(struct messaging_context *msg, void *private, */ static bool test_ping_speed(struct torture_context *tctx) { - struct event_context *ev; + struct tevent_context *ev; struct messaging_context *msg_client_ctx; struct messaging_context *msg_server_ctx; int ping_count = 0; diff --git a/source4/lib/registry/hive.c b/source4/lib/registry/hive.c index 5105040f30..8bf7c9f8d1 100644 --- a/source4/lib/registry/hive.c +++ b/source4/lib/registry/hive.c @@ -28,7 +28,7 @@ _PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **root) { diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 87268ce5e7..1d238f4e23 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -429,7 +429,7 @@ static WERROR ldb_open_key(TALLOC_CTX *mem_ctx, const struct hive_key *h, WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **k) { diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index f9db39f4ae..a97d9f6184 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -149,12 +149,12 @@ struct hive_operations { struct cli_credentials; struct auth_session_info; -struct event_context; +struct tevent_context; WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **root); WERROR hive_key_get_info(TALLOC_CTX *mem_ctx, const struct hive_key *key, @@ -207,7 +207,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, WERROR reg_open_ldb_file(TALLOC_CTX *parent_ctx, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct hive_key **k); @@ -357,7 +357,7 @@ struct registry_context { }; struct auth_session_info; -struct event_context; +struct tevent_context; struct loadparm_context; /** @@ -368,7 +368,7 @@ WERROR reg_open_local(TALLOC_CTX *mem_ctx, WERROR reg_open_samba(TALLOC_CTX *mem_ctx, struct registry_context **ctx, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct auth_session_info *session_info, struct cli_credentials *credentials); @@ -380,7 +380,7 @@ WERROR reg_open_remote(struct registry_context **ctx, struct auth_session_info *session_info, struct cli_credentials *credentials, struct loadparm_context *lp_ctx, - const char *location, struct event_context *ev); + const char *location, struct tevent_context *ev); WERROR reg_open_wine(struct registry_context **ctx, const char *path); diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index 117951ed03..8096c8fbfe 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -480,7 +480,7 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, struct auth_session_info *session_info, struct cli_credentials *credentials, struct loadparm_context *lp_ctx, - const char *location, struct event_context *ev) + const char *location, struct tevent_context *ev) { NTSTATUS status; struct dcerpc_pipe *p; diff --git a/source4/lib/registry/samba.c b/source4/lib/registry/samba.c index 84a8112f17..fc59bdfdfa 100644 --- a/source4/lib/registry/samba.c +++ b/source4/lib/registry/samba.c @@ -26,7 +26,7 @@ */ static WERROR mount_samba_hive(struct registry_context *ctx, - struct event_context *event_ctx, + struct tevent_context *event_ctx, struct loadparm_context *lp_ctx, struct auth_session_info *auth_info, struct cli_credentials *creds, @@ -56,7 +56,7 @@ static WERROR mount_samba_hive(struct registry_context *ctx, _PUBLIC_ WERROR reg_open_samba(TALLOC_CTX *mem_ctx, struct registry_context **ctx, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct auth_session_info *session_info, struct cli_credentials *credentials) diff --git a/source4/lib/registry/tools/common.c b/source4/lib/registry/tools/common.c index f770f6a3ca..c9f1248bf8 100644 --- a/source4/lib/registry/tools/common.c +++ b/source4/lib/registry/tools/common.c @@ -24,7 +24,7 @@ #include "lib/registry/tools/common.h" struct registry_context *reg_common_open_remote(const char *remote, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct cli_credentials *creds) { @@ -43,7 +43,7 @@ struct registry_context *reg_common_open_remote(const char *remote, } struct registry_key *reg_common_open_file(const char *path, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, struct cli_credentials *creds) { @@ -70,7 +70,7 @@ struct registry_key *reg_common_open_file(const char *path, } struct registry_context *reg_common_open_local(struct cli_credentials *creds, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx) { WERROR error; diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index fcf7c26237..945b472903 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -29,7 +29,7 @@ enum reg_backend { REG_UNKNOWN, REG_LOCAL, REG_REMOTE, REG_NULL }; static struct registry_context *open_backend(poptContext pc, - struct event_context *ev_ctx, + struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx, enum reg_backend backend, const char *remote_host) @@ -83,7 +83,7 @@ int main(int argc, const char **argv) }; TALLOC_CTX *ctx; void *callback_data; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; struct reg_diff_callbacks *callbacks; ctx = talloc_init("regdiff"); diff --git a/source4/lib/registry/tools/regpatch.c b/source4/lib/registry/tools/regpatch.c index 03d29a598b..3f550e517e 100644 --- a/source4/lib/registry/tools/regpatch.c +++ b/source4/lib/registry/tools/regpatch.c @@ -34,7 +34,7 @@ int main(int argc, char **argv) struct registry_context *h; const char *file = NULL; const char *remote = NULL; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; struct poptOption long_options[] = { POPT_AUTOHELP {"remote", 'R', POPT_ARG_STRING, &remote, 0, "connect to specified remote server", NULL}, diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index 5c308bfbda..8939f21269 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -493,7 +493,7 @@ int main(int argc, char **argv) poptContext pc; const char *remote = NULL; struct regshell_context *ctx; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; bool ret = true; struct poptOption long_options[] = { POPT_AUTOHELP diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c index 6d55a3eb84..cca009a0e2 100644 --- a/source4/lib/registry/tools/regtree.c +++ b/source4/lib/registry/tools/regtree.c @@ -104,7 +104,7 @@ int main(int argc, char **argv) poptContext pc; struct registry_context *h = NULL; struct registry_key *start_key = NULL; - struct event_context *ev_ctx; + struct tevent_context *ev_ctx; WERROR error; bool fullpath = false, no_values = false; struct poptOption long_options[] = { diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c index d74a7b4833..be15aa987b 100644 --- a/source4/lib/socket/connect.c +++ b/source4/lib/socket/connect.c @@ -34,8 +34,8 @@ struct connect_state { uint32_t flags; }; -static void socket_connect_handler(struct event_context *ev, - struct fd_event *fde, +static void socket_connect_handler(struct tevent_context *ev, + struct tevent_fd *fde, uint16_t flags, void *private); /* @@ -43,7 +43,7 @@ static void socket_connect_handler(struct event_context *ev, */ static void socket_send_connect(struct composite_context *result) { - struct fd_event *fde; + struct tevent_fd *fde; struct connect_state *state = talloc_get_type(result->private_data, struct connect_state); @@ -73,7 +73,7 @@ struct composite_context *socket_connect_send(struct socket_context *sock, struct socket_address *my_address, struct socket_address *server_address, uint32_t flags, - struct event_context *event_ctx) + struct tevent_context *event_ctx) { struct composite_context *result; struct connect_state *state; @@ -116,8 +116,8 @@ struct composite_context *socket_connect_send(struct socket_context *sock, /* handle write events on connect completion */ -static void socket_connect_handler(struct event_context *ev, - struct fd_event *fde, +static void socket_connect_handler(struct tevent_context *ev, + struct tevent_fd *fde, uint16_t flags, void *private) { struct composite_context *result = @@ -149,7 +149,7 @@ NTSTATUS socket_connect_ev(struct socket_context *sock, struct socket_address *my_address, struct socket_address *server_address, uint32_t flags, - struct event_context *ev) + struct tevent_context *ev) { struct composite_context *ctx; ctx = socket_connect_send(sock, my_address, diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c index 14c475d0c3..8fcfc0a8ea 100644 --- a/source4/lib/socket/connect_multi.c +++ b/source4/lib/socket/connect_multi.c @@ -53,8 +53,8 @@ struct connect_one_state { }; static void continue_resolve_name(struct composite_context *creq); -static void connect_multi_timer(struct event_context *ev, - struct timed_event *te, +static void connect_multi_timer(struct tevent_context *ev, + struct tevent_timer *te, struct timeval tv, void *p); static void connect_multi_next_socket(struct composite_context *result); static void continue_one(struct composite_context *creq); @@ -68,7 +68,7 @@ _PUBLIC_ struct composite_context *socket_connect_multi_send( int num_server_ports, uint16_t *server_ports, struct resolve_context *resolve_ctx, - struct event_context *event_ctx) + struct tevent_context *event_ctx) { struct composite_context *result; struct connect_multi_state *multi; @@ -179,8 +179,8 @@ static void connect_multi_next_socket(struct composite_context *result) /* a timer has gone off telling us that we should try the next port */ -static void connect_multi_timer(struct event_context *ev, - struct timed_event *te, +static void connect_multi_timer(struct tevent_context *ev, + struct tevent_timer *te, struct timeval tv, void *p) { struct composite_context *result = talloc_get_type(p, struct composite_context); @@ -265,7 +265,7 @@ NTSTATUS socket_connect_multi(TALLOC_CTX *mem_ctx, const char *server_address, int num_server_ports, uint16_t *server_ports, struct resolve_context *resolve_ctx, - struct event_context *event_ctx, + struct tevent_context *event_ctx, struct socket_context **result, uint16_t *result_port) { diff --git a/source4/lib/socket/socket.h b/source4/lib/socket/socket.h index 4741a67990..7a27e3070b 100644 --- a/source4/lib/socket/socket.h +++ b/source4/lib/socket/socket.h @@ -20,7 +20,7 @@ #ifndef _SAMBA_SOCKET_H #define _SAMBA_SOCKET_H -struct event_context; +struct tevent_context; struct socket_context; enum socket_type { @@ -178,20 +178,20 @@ struct composite_context *socket_connect_send(struct socket_context *sock, struct socket_address *my_address, struct socket_address *server_address, uint32_t flags, - struct event_context *event_ctx); + struct tevent_context *event_ctx); NTSTATUS socket_connect_recv(struct composite_context *ctx); NTSTATUS socket_connect_ev(struct socket_context *sock, struct socket_address *my_address, struct socket_address *server_address, uint32_t flags, - struct event_context *ev); + struct tevent_context *ev); struct composite_context *socket_connect_multi_send(TALLOC_CTX *mem_ctx, const char *server_address, int num_server_ports, uint16_t *server_ports, struct resolve_context *resolve_ctx, - struct event_context *event_ctx); + struct tevent_context *event_ctx); NTSTATUS socket_connect_multi_recv(struct composite_context *ctx, TALLOC_CTX *mem_ctx, struct socket_context **result, @@ -199,7 +199,7 @@ NTSTATUS socket_connect_multi_recv(struct composite_context *ctx, NTSTATUS socket_connect_multi(TALLOC_CTX *mem_ctx, const char *server_address, int num_server_ports, uint16_t *server_ports, struct resolve_context *resolve_ctx, - struct event_context *event_ctx, + struct tevent_context *event_ctx, struct socket_context **result, uint16_t *port); void set_socket_options(int fd, const char *options); diff --git a/source4/lib/socket/testsuite.c b/source4/lib/socket/testsuite.c index 0fae880ca0..cba283f558 100644 --- a/source4/lib/socket/testsuite.c +++ b/source4/lib/socket/testsuite.c @@ -124,7 +124,7 @@ static bool test_tcp(struct torture_context *tctx) DATA_BLOB blob, blob2; size_t sent, nread; TALLOC_CTX *mem_ctx = tctx; - struct event_context *ev = tctx->ev; + struct tevent_context *ev = tctx->ev; struct interface *ifaces; status = socket_create("ip", SOCKET_TYPE_STREAM, &sock1, 0); diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c index 72a7e6485c..7882059faf 100644 --- a/source4/lib/stream/packet.c +++ b/source4/lib/stream/packet.c @@ -35,10 +35,10 @@ struct packet_context { uint32_t num_read; uint32_t initial_read; struct socket_context *sock; - struct event_context *ev; + struct tevent_context *ev; size_t packet_size; void *private; - struct fd_event *fde; + struct tevent_fd *fde; bool serialise; int processing; bool recv_disable; @@ -136,7 +136,7 @@ _PUBLIC_ void packet_set_socket(struct packet_context *pc, struct socket_context time on a socket. This can matter for code that relies on not getting more than one packet per event */ -_PUBLIC_ void packet_set_event_context(struct packet_context *pc, struct event_context *ev) +_PUBLIC_ void packet_set_event_context(struct packet_context *pc, struct tevent_context *ev) { pc->ev = ev; } @@ -144,7 +144,7 @@ _PUBLIC_ void packet_set_event_context(struct packet_context *pc, struct event_c /* tell the packet layer the fde for the socket */ -_PUBLIC_ void packet_set_fde(struct packet_context *pc, struct fd_event *fde) +_PUBLIC_ void packet_set_fde(struct packet_context *pc, struct tevent_fd *fde) { pc->fde = fde; } @@ -209,7 +209,7 @@ static void packet_eof(struct packet_context *pc) /* used to put packets on event boundaries */ -static void packet_next_event(struct event_context *ev, struct timed_event *te, +static void packet_next_event(struct tevent_context *ev, struct tevent_timer *te, struct timeval t, void *private) { struct packet_context *pc = talloc_get_type(private, struct packet_context); diff --git a/source4/lib/stream/packet.h b/source4/lib/stream/packet.h index f7b10cd878..c9bd9d4767 100644 --- a/source4/lib/stream/packet.h +++ b/source4/lib/stream/packet.h @@ -21,8 +21,8 @@ */ struct packet_context; -struct event_context; -struct fd_event; +struct tevent_context; +struct tevent_fd; typedef NTSTATUS (*packet_full_request_fn_t)(void *private, DATA_BLOB blob, size_t *packet_size); @@ -40,8 +40,8 @@ void packet_set_error_handler(struct packet_context *pc, packet_error_handler_fn void packet_set_private(struct packet_context *pc, void *private); void packet_set_full_request(struct packet_context *pc, packet_full_request_fn_t callback); void packet_set_socket(struct packet_context *pc, struct socket_context *sock); -void packet_set_event_context(struct packet_context *pc, struct event_context *ev); -void packet_set_fde(struct packet_context *pc, struct fd_event *fde); +void packet_set_event_context(struct packet_context *pc, struct tevent_context *ev); +void packet_set_fde(struct packet_context *pc, struct tevent_fd *fde); void packet_set_serialise(struct packet_context *pc); void packet_set_initial_read(struct packet_context *pc, uint32_t initial_read); void packet_set_nofree(struct packet_context *pc); diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index d16df25548..99a15059ad 100644 --- a/source4/lib/tls/tls.c +++ b/source4/lib/tls/tls.c @@ -47,7 +47,7 @@ struct tls_params { /* hold per connection tls data */ struct tls_context { struct socket_context *socket; - struct fd_event *fde; + struct tevent_fd *fde; bool tls_enabled; #if ENABLE_GNUTLS gnutls_session session; @@ -455,7 +455,7 @@ init_failed: */ struct socket_context *tls_init_server(struct tls_params *params, struct socket_context *socket_ctx, - struct fd_event *fde, + struct tevent_fd *fde, const char *plain_chars) { struct tls_context *tls; @@ -535,7 +535,7 @@ failed: setup for a new client connection */ struct socket_context *tls_init_client(struct socket_context *socket_ctx, - struct fd_event *fde, + struct tevent_fd *fde, const char *ca_path) { struct tls_context *tls; @@ -663,7 +663,7 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context * */ struct socket_context *tls_init_server(struct tls_params *params, struct socket_context *socket, - struct fd_event *fde, + struct tevent_fd *fde, const char *plain_chars) { return NULL; @@ -674,7 +674,7 @@ struct socket_context *tls_init_server(struct tls_params *params, setup for a new client connection */ struct socket_context *tls_init_client(struct socket_context *socket, - struct fd_event *fde, + struct tevent_fd *fde, const char *ca_path) { return NULL; diff --git a/source4/lib/tls/tls.h b/source4/lib/tls/tls.h index e6aa8f0e1a..c5bd5c87cc 100644 --- a/source4/lib/tls/tls.h +++ b/source4/lib/tls/tls.h @@ -42,14 +42,14 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context * */ struct socket_context *tls_init_server(struct tls_params *parms, struct socket_context *sock, - struct fd_event *fde, + struct tevent_fd *fde, const char *plain_chars); /* call tls_init_client() on each new client connection */ struct socket_context *tls_init_client(struct socket_context *sock, - struct fd_event *fde, + struct tevent_fd *fde, const char *cafile); /* |