[SCM] Samba Shared Repository - branch master updated -
183c379fe58ca60f5ef2d1f2033d035d4117ac8f
Stefan Metzmacher
metze at samba.org
Mon Dec 29 19:49:09 GMT 2008
The branch, master has been updated
via 183c379fe58ca60f5ef2d1f2033d035d4117ac8f (commit)
via af29b82536ef678e6a1817aa11be8c363253b305 (commit)
via 635a973be56e484312f336298bc17372075b307f (commit)
from 3dfb0e94670ebea5ab05bcf049b66c88e4601db8 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 183c379fe58ca60f5ef2d1f2033d035d4117ac8f
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Dec 29 20:24:57 2008 +0100
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
commit af29b82536ef678e6a1817aa11be8c363253b305
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Dec 29 17:48:35 2008 +0100
s4:pvfs_aio: use tevent
metze
commit 635a973be56e484312f336298bc17372075b307f
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Dec 29 17:33:51 2008 +0100
s4:sys_lease_linux: use tevent
metze
-----------------------------------------------------------------------
Summary of changes:
lib/tevent/pytevent.c | 4 +-
lib/tevent/testsuite.c | 10 +++---
lib/tevent/tevent.c | 32 ++++++++--------
lib/tevent/tevent.h | 11 ++----
lib/tevent/tevent_aio.c | 48 ++++++++++++------------
lib/tevent/tevent_debug.c | 6 ++--
lib/tevent/tevent_epoll.c | 42 +++++++++++-----------
lib/tevent/tevent_internal.h | 2 +-
lib/tevent/tevent_liboop.c | 40 ++++++++++----------
lib/tevent/tevent_select.c | 32 ++++++++--------
lib/tevent/tevent_signal.c | 6 ++--
lib/tevent/tevent_standard.c | 46 ++++++++++++------------
lib/tevent/tevent_timed.c | 18 +++++-----
lib/torture/torture.c | 2 +-
lib/torture/torture.h | 4 +-
libcli/nbt/libnbt.h | 8 ++--
libcli/nbt/nbtsocket.c | 6 ++--
libcli/nbt/pynbt.c | 2 +-
libcli/nbt/tools/nmblookup.c | 4 +-
source4/auth/auth.h | 8 ++--
source4/auth/credentials/credentials.h | 22 ++++++------
source4/auth/credentials/credentials_files.c | 6 ++--
source4/auth/credentials/credentials_krb5.c | 20 +++++-----
source4/auth/credentials/credentials_krb5.h | 2 +-
source4/auth/gensec/gensec.c | 10 +++---
source4/auth/gensec/gensec.h | 10 +++---
source4/auth/gensec/schannel_state.c | 6 ++--
source4/auth/gensec/socket.c | 8 ++--
source4/auth/kerberos/krb5_init_context.c | 12 +++---
source4/auth/kerberos/krb5_init_context.h | 4 +-
source4/auth/ntlm/auth.c | 8 ++--
source4/auth/ntlm/auth_simple.c | 2 +-
source4/auth/sam.c | 2 +-
source4/auth/session.c | 6 ++--
source4/auth/session.h | 8 ++--
source4/client/cifsdd.c | 6 ++--
source4/client/cifsdd.h | 4 +-
source4/client/cifsddio.c | 6 ++--
source4/client/client.c | 10 +++---
source4/dsdb/common/sidmap.c | 2 +-
source4/dsdb/repl/drepl_periodic.c | 4 +-
source4/dsdb/repl/drepl_service.h | 2 +-
source4/dsdb/samdb/cracknames.c | 4 +-
source4/dsdb/samdb/ldb_modules/samldb.c | 2 +-
source4/dsdb/samdb/samdb.c | 8 ++--
source4/dsdb/samdb/samdb.h | 2 +-
source4/dsdb/samdb/samdb_privilege.c | 2 +-
source4/kdc/hdb-samba4.c | 2 +-
source4/kdc/kdc.c | 6 ++--
source4/kdc/kdc.h | 2 +-
source4/kdc/kpasswdd.c | 2 +-
source4/ldap_server/ldap_server.c | 10 +++---
source4/ldap_server/ldap_server.h | 4 +-
source4/lib/com/com.h | 6 ++--
source4/lib/com/main.c | 2 +-
source4/lib/events/events.h | 4 +-
source4/lib/events/tevent_s4.c | 4 +-
source4/lib/ldb/common/ldb.c | 8 ++--
source4/lib/ldb/include/ldb.h | 10 +++---
source4/lib/ldb/include/ldb_private.h | 2 +-
source4/lib/ldb/ldb_ildap/ldb_ildap.c | 10 +++---
source4/lib/ldb/ldb_ldap/ldb_ldap.c | 18 +++++-----
source4/lib/ldb/ldb_tdb/ldb_tdb.c | 12 +++---
source4/lib/ldb/ldb_tdb/ldb_tdb.h | 2 +-
source4/lib/ldb_wrap.c | 2 +-
source4/lib/ldb_wrap.h | 4 +-
source4/lib/messaging/irpc.h | 6 ++--
source4/lib/messaging/messaging.c | 16 ++++----
source4/lib/messaging/pymessaging.c | 4 +-
source4/lib/messaging/tests/irpc.c | 4 +-
source4/lib/messaging/tests/messaging.c | 2 +-
source4/lib/registry/hive.c | 2 +-
source4/lib/registry/ldb.c | 2 +-
source4/lib/registry/registry.h | 12 +++---
source4/lib/registry/rpc.c | 2 +-
source4/lib/registry/samba.c | 4 +-
source4/lib/registry/tools/common.c | 6 ++--
source4/lib/registry/tools/regdiff.c | 4 +-
source4/lib/registry/tools/regpatch.c | 2 +-
source4/lib/registry/tools/regshell.c | 2 +-
source4/lib/registry/tools/regtree.c | 2 +-
source4/lib/socket/connect.c | 14 ++++----
source4/lib/socket/connect_multi.c | 12 +++---
source4/lib/socket/socket.h | 10 +++---
source4/lib/socket/testsuite.c | 2 +-
source4/lib/stream/packet.c | 10 +++---
source4/lib/stream/packet.h | 8 ++--
source4/lib/tls/tls.c | 10 +++---
source4/lib/tls/tls.h | 4 +-
source4/libcli/cldap/cldap.c | 8 ++--
source4/libcli/cldap/cldap.h | 8 ++--
source4/libcli/cliconnect.c | 4 +-
source4/libcli/composite/composite.c | 4 +-
source4/libcli/composite/composite.h | 6 ++--
source4/libcli/dgram/dgramsocket.c | 4 +-
source4/libcli/dgram/libdgram.h | 6 ++--
source4/libcli/finddcs.c | 4 +-
source4/libcli/ldap/ldap.h | 2 +-
source4/libcli/ldap/ldap_client.c | 8 ++--
source4/libcli/ldap/ldap_client.h | 8 ++--
source4/libcli/libcli.h | 2 +-
source4/libcli/raw/clisocket.c | 6 ++--
source4/libcli/raw/clitransport.c | 10 +++---
source4/libcli/raw/clitree.c | 2 +-
source4/libcli/raw/libcliraw.h | 8 ++--
source4/libcli/resolve/bcast.c | 2 +-
source4/libcli/resolve/dns_ex.c | 8 ++--
source4/libcli/resolve/host.c | 2 +-
source4/libcli/resolve/nbtlist.c | 2 +-
source4/libcli/resolve/resolve.c | 6 ++--
source4/libcli/resolve/resolve.h | 4 +-
source4/libcli/resolve/testsuite.c | 2 +-
source4/libcli/resolve/wins.c | 2 +-
source4/libcli/smb2/connect.c | 4 +-
source4/libcli/smb2/smb2_calls.h | 2 +-
source4/libcli/smb2/transport.c | 10 +++---
source4/libcli/smb_composite/connect.c | 4 +-
source4/libcli/smb_composite/fetchfile.c | 2 +-
source4/libcli/wbclient/wbclient.c | 2 +-
source4/libcli/wbclient/wbclient.h | 4 +-
source4/libcli/wrepl/winsrepl.c | 12 +++---
source4/libcli/wrepl/winsrepl.h | 6 ++--
source4/libnet/libnet.c | 2 +-
source4/libnet/libnet.h | 2 +-
source4/libnet/libnet_samdump_keytab.c | 4 +-
source4/libnet/libnet_vampire.c | 2 +-
source4/libnet/py_net.c | 4 +-
source4/librpc/rpc/dcerpc.c | 10 +++---
source4/librpc/rpc/dcerpc.h | 16 ++++----
source4/librpc/rpc/dcerpc_connect.c | 12 +++---
source4/librpc/rpc/dcerpc_sock.c | 4 +-
source4/librpc/rpc/dcerpc_util.c | 4 +-
source4/librpc/rpc/pyrpc.c | 4 +-
source4/nbt_server/register.c | 2 +-
source4/nbt_server/wins/winsclient.c | 6 ++--
source4/nbt_server/wins/winsdb.c | 4 +-
source4/nbt_server/wins/winsdb.h | 2 +-
source4/nbt_server/wins/winsserver.h | 2 +-
source4/nbt_server/wins/winswack.c | 2 +-
source4/ntptr/ntptr.h | 2 +-
source4/ntptr/ntptr_base.c | 2 +-
source4/ntptr/simple_ldb/ntptr_simple_ldb.c | 2 +-
source4/ntvfs/common/notify.c | 2 +-
source4/ntvfs/ipc/ipc_rap.c | 6 ++--
source4/ntvfs/ipc/rap_server.c | 2 +-
source4/ntvfs/ntvfs.h | 2 +-
source4/ntvfs/ntvfs_base.c | 2 +-
source4/ntvfs/posix/config.mk | 2 +-
source4/ntvfs/posix/pvfs_aio.c | 22 ++++++------
source4/ntvfs/posix/pvfs_notify.c | 2 +-
source4/ntvfs/posix/pvfs_search.c | 4 +-
source4/ntvfs/posix/pvfs_wait.c | 6 ++--
source4/ntvfs/posix/pvfs_write.c | 4 +-
source4/ntvfs/posix/vfs_posix.h | 4 +-
source4/ntvfs/sysdep/config.mk | 2 +-
source4/ntvfs/sysdep/inotify.c | 2 +-
source4/ntvfs/sysdep/sys_lease.c | 2 +-
source4/ntvfs/sysdep/sys_lease.h | 6 ++--
source4/ntvfs/sysdep/sys_lease_linux.c | 14 ++++----
source4/ntvfs/sysdep/sys_notify.c | 2 +-
source4/ntvfs/sysdep/sys_notify.h | 4 +-
source4/param/secrets.c | 4 +-
source4/param/secrets.h | 6 ++--
source4/param/share.c | 2 +-
source4/param/share.h | 4 +-
source4/param/share_classic.c | 2 +-
source4/param/share_ldb.c | 2 +-
source4/rpc_server/common/server_info.c | 2 +-
source4/rpc_server/dcerpc_server.c | 4 +-
source4/rpc_server/dcerpc_server.h | 8 ++--
source4/rpc_server/echo/rpc_echo.c | 2 +-
source4/rpc_server/lsa/lsa_lookup.c | 2 +-
source4/rpc_server/netlogon/dcerpc_netlogon.c | 2 +-
source4/rpc_server/service_rpc.c | 12 +++---
source4/smb_server/smb_samba3.c | 2 +-
source4/smb_server/smb_server.c | 2 +-
source4/smb_server/smb_server.h | 4 +-
source4/smbd/process_model.c | 2 +-
source4/smbd/process_model.h | 16 ++++----
source4/smbd/process_prefork.c | 16 ++++----
source4/smbd/process_single.c | 14 ++++----
source4/smbd/process_standard.c | 18 +++++-----
source4/smbd/process_thread.c | 26 +++++++-------
source4/smbd/server.c | 8 ++--
source4/smbd/service.c | 4 +-
source4/smbd/service_named_pipe.c | 2 +-
source4/smbd/service_stream.c | 14 ++++----
source4/smbd/service_stream.h | 4 +-
source4/smbd/service_task.c | 6 ++--
source4/smbd/service_task.h | 2 +-
source4/torture/basic/misc.c | 4 +-
source4/torture/gentest.c | 10 +++---
source4/torture/locktest.c | 8 ++--
source4/torture/locktest2.c | 8 ++--
source4/torture/masktest.c | 4 +-
source4/torture/raw/composite.c | 6 ++--
source4/torture/raw/lockbench.c | 12 +++---
source4/torture/raw/offline.c | 4 +-
source4/torture/raw/openbench.c | 12 +++---
source4/torture/raw/oplock.c | 4 +-
source4/torture/rpc/echo.c | 2 +-
source4/torture/util.h | 4 +-
source4/torture/util_smb.c | 4 +-
source4/utils/net/net.c | 2 +-
source4/utils/net/net.h | 2 +-
source4/utils/net/net_machinepw.c | 2 +-
source4/utils/ntlm_auth.c | 2 +-
source4/web_server/web_server.c | 4 +-
source4/winbind/idmap.c | 2 +-
source4/winbind/idmap.h | 2 +-
source4/winbind/wb_pam_auth.c | 2 +-
source4/winbind/wb_server.h | 2 +-
source4/wrepl_server/wrepl_periodic.c | 4 +-
source4/wrepl_server/wrepl_server.c | 2 +-
source4/wrepl_server/wrepl_server.h | 4 +-
215 files changed, 701 insertions(+), 704 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index 54f6799..a969373 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -23,7 +23,7 @@
typedef struct {
PyObject_HEAD
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
} PyEventContextObject;
PyAPI_DATA(PyTypeObject) PyEventContext;
@@ -65,7 +65,7 @@ static PyObject *py_event_ctx_new(PyTypeObject *type, PyObject *args, PyObject *
{
const char *kwnames[] = { "name", NULL };
char *name = NULL;
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
PyEventContextObject *ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", (char **)kwnames, &name))
return NULL;
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index 7f2729c..ec57c5a 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -26,7 +26,7 @@
static int fde_count;
-static void fde_handler(struct event_context *ev_ctx, struct fd_event *f,
+static void fde_handler(struct tevent_context *ev_ctx, struct tevent_fd *f,
uint16_t flags, void *private)
{
int *fd = (int *)private;
@@ -40,14 +40,14 @@ static void fde_handler(struct event_context *ev_ctx, struct fd_event *f,
fde_count++;
}
-static void finished_handler(struct event_context *ev_ctx, struct timed_event *te,
+static void finished_handler(struct tevent_context *ev_ctx, struct tevent_timer *te,
struct timeval tval, void *private)
{
int *finished = (int *)private;
(*finished) = 1;
}
-static void count_handler(struct event_context *ev_ctx, struct signal_event *te,
+static void count_handler(struct tevent_context *ev_ctx, struct signal_event *te,
int signum, int count, void *info, void *private)
{
int *countp = (int *)private;
@@ -57,11 +57,11 @@ static void count_handler(struct event_context *ev_ctx, struct signal_event *te,
static bool test_event_context(struct torture_context *test,
const void *test_data)
{
- struct event_context *ev_ctx;
+ struct tevent_context *ev_ctx;
int fd[2] = { -1, -1 };
const char *backend = (const char *)test_data;
int alarm_count=0, info_count=0;
- struct fd_event *fde;
+ struct tevent_fd *fde;
struct signal_event *se1, *se2, *se3;
int finished=0;
struct timeval t;
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 2ea5ad3..e45a690 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -42,7 +42,7 @@
To setup a set of events you first need to create a event_context
structure using the function event_context_init(); This returns a
- 'struct event_context' that you use in all subsequent calls.
+ 'struct tevent_context' that you use in all subsequent calls.
After that you can add/remove events that you are interested in
using event_add_*() and talloc_free()
@@ -145,13 +145,13 @@ const char **event_backend_list(TALLOC_CTX *mem_ctx)
NOTE: use event_context_init() inside of samba!
*/
-static struct event_context *event_context_init_ops(TALLOC_CTX *mem_ctx,
+static struct tevent_context *event_context_init_ops(TALLOC_CTX *mem_ctx,
const struct event_ops *ops)
{
- struct event_context *ev;
+ struct tevent_context *ev;
int ret;
- ev = talloc_zero(mem_ctx, struct event_context);
+ ev = talloc_zero(mem_ctx, struct tevent_context);
if (!ev) return NULL;
ev->ops = ops;
@@ -170,7 +170,7 @@ static struct event_context *event_context_init_ops(TALLOC_CTX *mem_ctx,
call, and all subsequent calls pass this event_context as the first
element. Event handlers also receive this as their first argument.
*/
-struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name)
+struct tevent_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char *name)
{
struct event_ops_list *e;
@@ -197,7 +197,7 @@ struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char
call, and all subsequent calls pass this event_context as the first
element. Event handlers also receive this as their first argument.
*/
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx)
+struct tevent_context *event_context_init(TALLOC_CTX *mem_ctx)
{
return event_context_init_byname(mem_ctx, NULL);
}
@@ -209,7 +209,7 @@ struct event_context *event_context_init(TALLOC_CTX *mem_ctx)
if flags contains EVENT_FD_AUTOCLOSE then the fd will be closed when
the returned fd_event context is freed
*/
-struct fd_event *event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_fd *event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags, event_fd_handler_t handler,
void *private_data)
{
@@ -219,7 +219,7 @@ struct fd_event *event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
/*
add a disk aio event
*/
-struct aio_event *event_add_aio(struct event_context *ev,
+struct aio_event *event_add_aio(struct tevent_context *ev,
TALLOC_CTX *mem_ctx,
struct iocb *iocb,
event_aio_handler_t handler,
@@ -232,7 +232,7 @@ struct aio_event *event_add_aio(struct event_context *ev,
/*
return the fd event flags
*/
-uint16_t event_get_fd_flags(struct fd_event *fde)
+uint16_t event_get_fd_flags(struct tevent_fd *fde)
{
if (!fde) return 0;
return fde->event_ctx->ops->get_fd_flags(fde);
@@ -241,7 +241,7 @@ uint16_t event_get_fd_flags(struct fd_event *fde)
/*
set the fd event flags
*/
-void event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+void event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
if (!fde) return;
fde->event_ctx->ops->set_fd_flags(fde, flags);
@@ -251,7 +251,7 @@ void event_set_fd_flags(struct fd_event *fde, uint16_t flags)
add a timed event
return NULL on failure
*/
-struct timed_event *event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_timer *event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
event_timed_handler_t handler,
void *private_data)
@@ -266,7 +266,7 @@ struct timed_event *event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ct
return NULL on failure
*/
-struct signal_event *event_add_signal(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct signal_event *event_add_signal(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int signum,
int sa_flags,
event_signal_handler_t handler,
@@ -278,7 +278,7 @@ struct signal_event *event_add_signal(struct event_context *ev, TALLOC_CTX *mem_
/*
do a single event loop using the events defined in ev
*/
-int event_loop_once(struct event_context *ev)
+int event_loop_once(struct tevent_context *ev)
{
return ev->ops->loop_once(ev);
}
@@ -286,7 +286,7 @@ int event_loop_once(struct event_context *ev)
/*
return on failure or (with 0) if all fd events are removed
*/
-int event_loop_wait(struct event_context *ev)
+int event_loop_wait(struct tevent_context *ev)
{
return ev->ops->loop_wait(ev);
}
@@ -300,9 +300,9 @@ int event_loop_wait(struct event_context *ev)
where you would prefer to use the existing event context if possible
(which is most situations)
*/
-struct event_context *event_context_find(TALLOC_CTX *mem_ctx)
+struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx)
{
- struct event_context *ev = talloc_find_parent_bytype(mem_ctx, struct event_context);
+ struct tevent_context *ev = talloc_find_parent_bytype(mem_ctx, struct tevent_context);
if (ev == NULL) {
ev = event_context_init(mem_ctx);
}
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 002edd1..f626de9 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -25,16 +25,13 @@
#include <stdint.h>
#include <talloc.h>
-struct event_context;
+struct tevent_context;
struct tevent_ops;
-struct fd_event;
+struct tevent_fd;
struct tevent_timer;
struct tevent_aio;
struct tevent_signal;
-#define tevent_context event_context
-#define tevent_fd fd_event
-
/* event handler types */
typedef void (*tevent_fd_handler_t)(struct tevent_context *,
struct tevent_fd *,
@@ -107,9 +104,9 @@ void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags);
#ifdef TEVENT_COMPAT_DEFINES
-/*TODO:#define event_context tevent_context*/
+#define event_context tevent_context
#define event_ops tevent_ops
-/*TODO:#define fd_event tevent_fd*/
+#define fd_event tevent_fd
#define timed_event tevent_timer
#define aio_event tevent_aio
#define signal_event tevent_signal
diff --git a/lib/tevent/tevent_aio.c b/lib/tevent/tevent_aio.c
index b3cd126..746e960 100644
--- a/lib/tevent/tevent_aio.c
+++ b/lib/tevent/tevent_aio.c
@@ -45,10 +45,10 @@
struct aio_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* number of registered fd event handlers */
int num_fd_events;
@@ -67,7 +67,7 @@ struct aio_event_context {
};
struct aio_event {
- struct event_context *event_ctx;
+ struct tevent_context *event_ctx;
struct iocb iocb;
void *private_data;
event_aio_handler_t handler;
@@ -95,7 +95,7 @@ static int aio_ctx_destructor(struct aio_event_context *aio_ev)
return 0;
}
-static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *fde);
+static void epoll_add_event(struct aio_event_context *aio_ev, struct tevent_fd *fde);
/*
reopen the epoll handle when our pid changes
@@ -104,7 +104,7 @@ static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *f
*/
static void epoll_check_reopen(struct aio_event_context *aio_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
if (aio_ev->pid == getpid()) {
return;
@@ -129,7 +129,7 @@ static void epoll_check_reopen(struct aio_event_context *aio_ev)
/*
add the epoll event to the given fd_event
*/
-static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_add_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (aio_ev->epoll_fd == -1) return;
@@ -154,7 +154,7 @@ static void epoll_add_event(struct aio_event_context *aio_ev, struct fd_event *f
/*
delete the epoll event for given fd_event
*/
-static void epoll_del_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_del_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
@@ -178,7 +178,7 @@ static void epoll_del_event(struct aio_event_context *aio_ev, struct fd_event *f
/*
change the epoll event to the given fd_event
*/
-static void epoll_mod_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_mod_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
struct epoll_event event;
if (aio_ev->epoll_fd == -1) return;
@@ -196,7 +196,7 @@ static void epoll_mod_event(struct aio_event_context *aio_ev, struct fd_event *f
}
}
-static void epoll_change_event(struct aio_event_context *aio_ev, struct fd_event *fde)
+static void epoll_change_event(struct aio_event_context *aio_ev, struct tevent_fd *fde)
{
bool got_error = (fde->additional_flags & EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR);
bool want_read = (fde->flags & EVENT_FD_READ);
@@ -308,7 +308,7 @@ static int aio_event_loop(struct aio_event_context *aio_ev, struct timeval *tval
}
case IOCB_CMD_EPOLL_WAIT: {
struct epoll_event *ep = (struct epoll_event *)finished->u.c.buf;
- struct fd_event *fde;
+ struct tevent_fd *fde;
uint16_t flags = 0;
int j;
@@ -316,7 +316,7 @@ static int aio_event_loop(struct aio_event_context *aio_ev, struct timeval *tval
for (j=0; j<event->res; j++, ep++) {
fde = talloc_get_type(ep->data.ptr,
- struct fd_event);
+ struct tevent_fd);
if (fde == NULL) {
return -1;
}
@@ -348,7 +348,7 @@ static int aio_event_loop(struct aio_event_context *aio_ev, struct timeval *tval
/*
create a aio_event_context structure.
*/
-static int aio_event_context_init(struct event_context *ev)
+static int aio_event_context_init(struct tevent_context *ev)
{
struct aio_event_context *aio_ev;
@@ -385,9 +385,9 @@ static int aio_event_context_init(struct event_context *ev)
/*
destroy an fd_event
*/
-static int aio_event_fd_destructor(struct fd_event *fde)
+static int aio_event_fd_destructor(struct tevent_fd *fde)
{
- struct event_context *ev = fde->event_ctx;
+ struct tevent_context *ev = fde->event_ctx;
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
@@ -410,18 +410,18 @@ static int aio_event_fd_destructor(struct fd_event *fde)
add a fd based event
return NULL on failure (memory allocation error)
*/
-static struct fd_event *aio_event_add_fd(struct event_context *ev, TALLOC_CTX *mem_ctx,
+static struct tevent_fd *aio_event_add_fd(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
int fd, uint16_t flags,
event_fd_handler_t handler,
void *private_data)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
- struct fd_event *fde;
+ struct tevent_fd *fde;
epoll_check_reopen(aio_ev);
- fde = talloc(mem_ctx?mem_ctx:ev, struct fd_event);
+ fde = talloc(mem_ctx?mem_ctx:ev, struct tevent_fd);
if (!fde) return NULL;
fde->event_ctx = ev;
@@ -445,7 +445,7 @@ static struct fd_event *aio_event_add_fd(struct event_context *ev, TALLOC_CTX *m
/*
return the fd event flags
*/
-static uint16_t aio_event_get_fd_flags(struct fd_event *fde)
+static uint16_t aio_event_get_fd_flags(struct tevent_fd *fde)
{
return fde->flags;
}
@@ -453,9 +453,9 @@ static uint16_t aio_event_get_fd_flags(struct fd_event *fde)
/*
set the fd event flags
*/
-static void aio_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
+static void aio_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
- struct event_context *ev;
+ struct tevent_context *ev;
struct aio_event_context *aio_ev;
if (fde->flags == flags) return;
@@ -473,7 +473,7 @@ static void aio_event_set_fd_flags(struct fd_event *fde, uint16_t flags)
/*
do a single event loop using the events defined in ev
*/
-static int aio_event_loop_once(struct event_context *ev)
+static int aio_event_loop_once(struct tevent_context *ev)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
@@ -492,7 +492,7 @@ static int aio_event_loop_once(struct event_context *ev)
/*
return on failure or (with 0) if all fd events are removed
*/
-static int aio_event_loop_wait(struct event_context *ev)
+static int aio_event_loop_wait(struct tevent_context *ev)
{
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
@@ -510,7 +510,7 @@ static int aio_event_loop_wait(struct event_context *ev)
*/
static int aio_destructor(struct aio_event *ae)
{
- struct event_context *ev = ae->event_ctx;
+ struct tevent_context *ev = ae->event_ctx;
struct aio_event_context *aio_ev = talloc_get_type(ev->additional_data,
struct aio_event_context);
struct io_event result;
@@ -520,7 +520,7 @@ static int aio_destructor(struct aio_event *ae)
}
/* submit an aio disk IO event */
-static struct aio_event *aio_event_add_aio(struct event_context *ev,
+static struct aio_event *aio_event_add_aio(struct tevent_context *ev,
TALLOC_CTX *mem_ctx,
struct iocb *iocb,
event_aio_handler_t handler,
diff --git a/lib/tevent/tevent_debug.c b/lib/tevent/tevent_debug.c
index a23ff09..4fa5853 100644
--- a/lib/tevent/tevent_debug.c
+++ b/lib/tevent/tevent_debug.c
@@ -30,7 +30,7 @@
/*
this allows the user to choose their own debug function
*/
-int ev_set_debug(struct event_context *ev,
+int ev_set_debug(struct tevent_context *ev,
void (*debug)(void *context, enum ev_debug_level level,
const char *fmt, va_list ap),
void *context)
@@ -57,7 +57,7 @@ void ev_debug_stderr(void *context, enum ev_debug_level level,
convenience function to setup debug messages on stderr
messages of level EV_DEBUG_WARNING and higher are printed
*/
-int ev_set_debug_stderr(struct event_context *ev)
+int ev_set_debug_stderr(struct tevent_context *ev)
{
return ev_set_debug(ev, ev_debug_stderr, ev);
}
@@ -70,7 +70,7 @@ int ev_set_debug_stderr(struct event_context *ev)
* Applications using the library must decide where to
* redirect debugging messages
*/
-void ev_debug(struct event_context *ev, enum ev_debug_level level, const char *fmt, ...)
+void ev_debug(struct tevent_context *ev, enum ev_debug_level level, const char *fmt, ...)
{
va_list ap;
if (ev->debug_ops.debug == NULL) {
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index cff6e46..1ce6664 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -30,10 +30,10 @@
struct epoll_event_context {
/* a pointer back to the generic event_context */
- struct event_context *ev;
+ struct tevent_context *ev;
/* list of filedescriptor events */
- struct fd_event *fd_events;
+ struct tevent_fd *fd_events;
/* number of registered fd event handlers */
int num_fd_events;
@@ -98,7 +98,7 @@ static int epoll_init_ctx(struct epoll_event_context *epoll_ev)
return 0;
}
-static void epoll_add_event(struct epoll_event_context *epoll_ev, struct fd_event *fde);
+static void epoll_add_event(struct epoll_event_context *epoll_ev, struct tevent_fd *fde);
/*
reopen the epoll handle when our pid changes
@@ -107,7 +107,7 @@ static void epoll_add_event(struct epoll_event_context *epoll_ev, struct fd_even
*/
static void epoll_check_reopen(struct epoll_event_context *epoll_ev)
{
- struct fd_event *fde;
+ struct tevent_fd *fde;
if (epoll_ev->pid == getpid()) {
return;
@@ -133,7 +133,7 @@ static void epoll_check_reopen(struct epoll_event_context *epoll_ev)
/*
add the epoll event to the given fd_event
--
Samba Shared Repository
More information about the samba-cvs
mailing list