The branch, master has been updated via c84caab s4:misc: remove last usage of legacy event_ fn names via 15efcba s4:lib: use tevent_ fns names instead of legcay event_ ones via edc3266 s4:smbd: use tevent_ fn names instead of leagcy event_ ones via b1feb9d s4:ntvfs: use tevent_ fn names instead of legacy event_ ones via 4a8fdc3 s4:librpc: use tevent_ fn names instead of legacy event_ ones via ab81505 s4:libcli: use tevent_ fn names instead of legacy event_ ones via f364dae s4:dsdb: use tevent_ fn names instaed of legacy event_ ones via 47b6457 s4:messaging: use tevent_ function names instead of legacy event_ ones via b120c5f torture: use tevent_ functions names instead of the legacy event_ ones from 813bdf4 ldb: Remove use after free in error case
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit c84caabf8c5061af75d9e046813c1e2e8eff3722 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:29:14 2010 -0400 s4:misc: remove last usage of legacy event_ fn names Autobuild-User: Simo Sorce <i...@samba.org> Autobuild-Date: Sun Aug 14 00:38:13 CEST 2011 on sn-devel-104 commit 15efcbaa09472b306a875178ee535a06d1b01811 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:28:35 2010 -0400 s4:lib: use tevent_ fns names instead of legcay event_ ones commit edc32665d0f5cfd5d86f975c8ac8e8ff100956f7 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:28:10 2010 -0400 s4:smbd: use tevent_ fn names instead of leagcy event_ ones commit b1feb9d4324dfca7190ec3816d43392b65a94671 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:27:41 2010 -0400 s4:ntvfs: use tevent_ fn names instead of legacy event_ ones commit 4a8fdc3958b7bc42bd90d4307f6fb0556944b300 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:27:11 2010 -0400 s4:librpc: use tevent_ fn names instead of legacy event_ ones commit ab81505e080e72c2217cb3946b04eee872397763 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:26:42 2010 -0400 s4:libcli: use tevent_ fn names instead of legacy event_ ones commit f364daed2203170bc772c8ff9bb28f78da615669 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:26:00 2010 -0400 s4:dsdb: use tevent_ fn names instaed of legacy event_ ones commit 47b64573c0d41d418d441ffc40325b822bfadb26 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:25:26 2010 -0400 s4:messaging: use tevent_ function names instead of legacy event_ ones commit b120c5f28876fd9efe032a6dbecebfaaff7dfd14 Author: Simo Sorce <sso...@redhat.com> Date: Tue May 25 15:23:55 2010 -0400 torture: use tevent_ functions names instead of the legacy event_ ones ----------------------------------------------------------------------- Summary of changes: source3/torture/torture.c | 6 +++--- source4/auth/gensec/socket.c | 6 +++--- source4/dsdb/kcc/kcc_periodic.c | 2 +- source4/dsdb/repl/drepl_notify.c | 2 +- source4/dsdb/repl/drepl_periodic.c | 2 +- source4/lib/com/main.c | 2 +- source4/lib/messaging/messaging.c | 16 ++++++++-------- source4/lib/messaging/tests/irpc.c | 6 +++--- source4/lib/messaging/tests/messaging.c | 4 ++-- source4/lib/socket/connect.c | 4 ++-- source4/lib/socket/connect_multi.c | 2 +- source4/lib/stream/packet.c | 16 ++++++++-------- source4/lib/tls/tls.c | 20 ++++++++++---------- source4/libcli/composite/composite.c | 8 ++++---- source4/libcli/dgram/dgramsocket.c | 12 ++++++------ source4/libcli/dgram/mailslot.c | 2 +- source4/libcli/raw/clitransport.c | 14 +++++++------- source4/libcli/raw/rawrequest.c | 2 +- source4/libcli/resolve/dns_ex.c | 2 +- source4/libcli/smb2/request.c | 2 +- source4/libcli/smb2/transport.c | 14 +++++++------- source4/librpc/rpc/dcerpc.c | 8 ++++---- source4/librpc/rpc/dcerpc_connect.c | 2 +- source4/librpc/rpc/dcerpc_sock.c | 8 ++++---- source4/nbt_server/register.c | 2 +- source4/nbt_server/wins/winsclient.c | 4 ++-- source4/ntvfs/posix/pvfs_notify.c | 2 +- source4/ntvfs/posix/pvfs_search.c | 2 +- source4/ntvfs/posix/pvfs_wait.c | 2 +- source4/ntvfs/posix/pvfs_write.c | 4 ++-- source4/rpc_server/echo/rpc_echo.c | 2 +- source4/smbd/process_onefork.c | 2 +- source4/smbd/process_prefork.c | 6 +++--- source4/smbd/process_standard.c | 4 ++-- source4/smbd/process_thread.c | 4 ++-- source4/torture/basic/base.c | 2 +- source4/torture/basic/misc.c | 2 +- source4/torture/nbt/dgram.c | 20 ++++++++++---------- source4/torture/nbt/query.c | 4 ++-- source4/torture/nbt/wins.c | 4 ++-- source4/torture/nbt/winsbench.c | 4 ++-- source4/torture/nbt/winsreplication.c | 12 ++++++------ source4/torture/raw/composite.c | 8 ++++---- source4/torture/raw/lockbench.c | 14 +++++++------- source4/torture/raw/offline.c | 8 ++++---- source4/torture/raw/open.c | 4 ++-- source4/torture/raw/openbench.c | 14 +++++++------- source4/torture/raw/oplock.c | 6 +++--- source4/torture/rpc/echo.c | 2 +- source4/torture/rpc/lsa.c | 2 +- source4/torture/rpc/netlogon.c | 4 ++-- source4/torture/rpc/schannel.c | 8 ++++---- source4/torture/smb2/create.c | 4 ++-- source4/torture/smb2/lock.c | 2 +- source4/torture/smb2/notify.c | 10 +++++----- source4/torture/smb2/oplock.c | 6 +++--- source4/web_server/web_server.c | 8 ++++---- source4/wrepl_server/wrepl_periodic.c | 2 +- 58 files changed, 173 insertions(+), 173 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/torture/torture.c b/source3/torture/torture.c index d5c2a56..888bcb1 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -6517,7 +6517,7 @@ static bool run_chain1(int dummy) } while (!done) { - event_loop_once(evt); + tevent_loop_once(evt); } torture_close_connection(cli1); @@ -6573,7 +6573,7 @@ static bool run_chain2(int dummy) } while (!done) { - event_loop_once(evt); + tevent_loop_once(evt); } torture_close_connection(cli1); @@ -8424,7 +8424,7 @@ static bool run_local_wbclient(int dummy) i = 0; while (i < nprocs * torture_numops) { - event_loop_once(ev); + tevent_loop_once(ev); } result = true; diff --git a/source4/auth/gensec/socket.c b/source4/auth/gensec/socket.c index 38eab6a..4ee1512 100644 --- a/source4/auth/gensec/socket.c +++ b/source4/auth/gensec/socket.c @@ -204,7 +204,7 @@ static void gensec_socket_trigger_read(struct tevent_context *ev, struct gensec_socket *gensec_socket = talloc_get_type(private_data, struct gensec_socket); gensec_socket->in_extra_read++; - gensec_socket->recv_handler(gensec_socket->recv_private, EVENT_FD_READ); + gensec_socket->recv_handler(gensec_socket->recv_private, TEVENT_FD_READ); gensec_socket->in_extra_read--; /* It may well be that, having run the recv handler, we still @@ -212,7 +212,7 @@ static void gensec_socket_trigger_read(struct tevent_context *ev, */ if (gensec_socket->read_buffer.length && gensec_socket->recv_handler) { /* Schedule this funcion to run again */ - event_add_timed(gensec_socket->ev, gensec_socket, timeval_zero(), + tevent_add_timer(gensec_socket->ev, gensec_socket, timeval_zero(), gensec_socket_trigger_read, gensec_socket); } } @@ -275,7 +275,7 @@ static NTSTATUS gensec_socket_recv(struct socket_context *sock, void *buf, /* Manually call a read event, to get this moving * again (as the socket should be dry, so the normal * event handler won't trigger) */ - event_add_timed(gensec_socket->ev, gensec_socket, timeval_zero(), + tevent_add_timer(gensec_socket->ev, gensec_socket, timeval_zero(), gensec_socket_trigger_read, gensec_socket); } diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c index 820aee3..8b74bab 100644 --- a/source4/dsdb/kcc/kcc_periodic.c +++ b/source4/dsdb/kcc/kcc_periodic.c @@ -423,7 +423,7 @@ WERROR kccsrv_periodic_schedule(struct kccsrv_service *service, uint32_t next_in /* reset the next scheduled timestamp */ service->periodic.next_event = next_time; - new_te = event_add_timed(service->task->event_ctx, service, + new_te = tevent_add_timer(service->task->event_ctx, service, service->periodic.next_event, kccsrv_periodic_handler_te, service); W_ERROR_HAVE_NO_MEMORY(new_te); diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c index 58081d4..cd248d5 100644 --- a/source4/dsdb/repl/drepl_notify.c +++ b/source4/dsdb/repl/drepl_notify.c @@ -451,7 +451,7 @@ WERROR dreplsrv_notify_schedule(struct dreplsrv_service *service, uint32_t next_ /* reset the next scheduled timestamp */ service->notify.next_event = next_time; - new_te = event_add_timed(service->task->event_ctx, service, + new_te = tevent_add_timer(service->task->event_ctx, service, service->notify.next_event, dreplsrv_notify_handler_te, service); W_ERROR_HAVE_NO_MEMORY(new_te); diff --git a/source4/dsdb/repl/drepl_periodic.c b/source4/dsdb/repl/drepl_periodic.c index 4487bb0..62b4092 100644 --- a/source4/dsdb/repl/drepl_periodic.c +++ b/source4/dsdb/repl/drepl_periodic.c @@ -74,7 +74,7 @@ WERROR dreplsrv_periodic_schedule(struct dreplsrv_service *service, uint32_t nex /* reset the next scheduled timestamp */ service->periodic.next_event = next_time; - new_te = event_add_timed(service->task->event_ctx, service, + new_te = tevent_add_timer(service->task->event_ctx, service, service->periodic.next_event, dreplsrv_periodic_handler_te, service); W_ERROR_HAVE_NO_MEMORY(new_te); diff --git a/source4/lib/com/main.c b/source4/lib/com/main.c index 487ed5b..1f657ce 100644 --- a/source4/lib/com/main.c +++ b/source4/lib/com/main.c @@ -28,7 +28,7 @@ WERROR com_init_ctx(struct com_context **ctx, struct tevent_context *event_ctx) { *ctx = talloc(NULL, struct com_context); if (event_ctx == NULL) { - event_ctx = event_context_init(*ctx); + event_ctx = tevent_context_init(*ctx); } (*ctx)->event_ctx = event_ctx; return WERR_OK; diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index ccc6003..4a4adac 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -251,7 +251,7 @@ static void msg_retry_timer(struct tevent_context *ev, struct tevent_timer *te, DLIST_ADD_END(msg->pending, rec, struct imessaging_rec *); } - EVENT_FD_WRITEABLE(msg->event.fde); + TEVENT_FD_WRITEABLE(msg->event.fde); } /* @@ -273,7 +273,7 @@ static void imessaging_send_handler(struct imessaging_context *msg) struct imessaging_rec *); if (msg->retry_te == NULL) { msg->retry_te = - event_add_timed(msg->event.ev, msg, + tevent_add_timer(msg->event.ev, msg, timeval_current_ofs(1, 0), msg_retry_timer, msg); } @@ -294,7 +294,7 @@ static void imessaging_send_handler(struct imessaging_context *msg) talloc_free(rec); } if (msg->pending == NULL) { - EVENT_FD_NOT_WRITEABLE(msg->event.fde); + TEVENT_FD_NOT_WRITEABLE(msg->event.fde); } } @@ -366,10 +366,10 @@ static void imessaging_handler(struct tevent_context *ev, struct tevent_fd *fde, { struct imessaging_context *msg = talloc_get_type(private_data, struct imessaging_context); - if (flags & EVENT_FD_WRITE) { + if (flags & TEVENT_FD_WRITE) { imessaging_send_handler(msg); } - if (flags & EVENT_FD_READ) { + if (flags & TEVENT_FD_READ) { imessaging_recv_handler(msg); } } @@ -514,7 +514,7 @@ NTSTATUS imessaging_send(struct imessaging_context *msg, struct server_id server if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) { if (msg->pending == NULL) { - EVENT_FD_WRITEABLE(msg->event.fde); + TEVENT_FD_WRITEABLE(msg->event.fde); } DLIST_ADD_END(msg->pending, rec, struct imessaging_rec *); return NT_STATUS_OK; @@ -625,8 +625,8 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx, set_blocking(socket_get_fd(msg->sock), false); msg->event.ev = ev; - msg->event.fde = event_add_fd(ev, msg, socket_get_fd(msg->sock), - EVENT_FD_READ, imessaging_handler, msg); + msg->event.fde = tevent_add_fd(ev, msg, socket_get_fd(msg->sock), + TEVENT_FD_READ, imessaging_handler, msg); tevent_fd_set_auto_close(msg->event.fde); if (auto_remove) { diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c index 554a7ef..c94765a 100644 --- a/source4/lib/messaging/tests/irpc.c +++ b/source4/lib/messaging/tests/irpc.c @@ -74,7 +74,7 @@ static void deferred_echodata(struct tevent_context *ev, struct tevent_timer *te static NTSTATUS irpc_EchoData(struct irpc_message *irpc, struct echo_EchoData *r) { irpc->defer_reply = true; - event_add_timed(irpc->ev, irpc, timeval_zero(), deferred_echodata, irpc); + tevent_add_timer(irpc->ev, irpc, timeval_zero(), deferred_echodata, irpc); return NT_STATUS_OK; } @@ -218,14 +218,14 @@ static bool test_speed(struct torture_context *tctx, ping_count++; while (ping_count > pong_count + 20) { - event_loop_once(data->ev); + tevent_loop_once(data->ev); } } torture_comment(tctx, "waiting for %d remaining replies (done %d)\n", ping_count - pong_count, pong_count); while (timeval_elapsed(&tv) < 30 && pong_count < ping_count) { - event_loop_once(data->ev); + tevent_loop_once(data->ev); } torture_assert_int_equal(tctx, ping_count, pong_count, "ping test failed"); diff --git a/source4/lib/messaging/tests/messaging.c b/source4/lib/messaging/tests/messaging.c index c5d3795..c17b95e 100644 --- a/source4/lib/messaging/tests/messaging.c +++ b/source4/lib/messaging/tests/messaging.c @@ -110,14 +110,14 @@ static bool test_ping_speed(struct torture_context *tctx) ping_count++; while (ping_count > pong_count + 20) { - event_loop_once(ev); + tevent_loop_once(ev); } } torture_comment(tctx, "waiting for %d remaining replies (done %d)\n", ping_count - pong_count, pong_count); while (timeval_elapsed(&tv) < 30 && pong_count < ping_count) { - event_loop_once(ev); + tevent_loop_once(ev); } torture_comment(tctx, "sending exit\n"); diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c index b943de8..1da8b41 100644 --- a/source4/lib/socket/connect.c +++ b/source4/lib/socket/connect.c @@ -58,9 +58,9 @@ static void socket_send_connect(struct composite_context *result) return; } - fde = event_add_fd(result->event_ctx, result, + fde = tevent_add_fd(result->event_ctx, result, socket_get_fd(state->sock), - EVENT_FD_READ|EVENT_FD_WRITE, + TEVENT_FD_READ|TEVENT_FD_WRITE, socket_connect_handler, result); composite_nomem(fde, result); } diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c index 4ce5115..96277a6 100644 --- a/source4/lib/socket/connect_multi.c +++ b/source4/lib/socket/connect_multi.c @@ -161,7 +161,7 @@ static void connect_multi_next_socket(struct composite_context *result) /* note that this timer is a child of the single connect attempt state, so it will go away when this request completes */ - event_add_timed(result->event_ctx, state, + tevent_add_timer(result->event_ctx, state, timeval_current_ofs_usec(MULTI_PORT_DELAY), connect_multi_timer, result); } diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c index 9834370..545d518 100644 --- a/source4/lib/stream/packet.c +++ b/source4/lib/stream/packet.c @@ -251,14 +251,14 @@ _PUBLIC_ void packet_recv(struct packet_context *pc) bool recv_retry = false; if (pc->processing) { - EVENT_FD_NOT_READABLE(pc->fde); + TEVENT_FD_NOT_READABLE(pc->fde); pc->processing++; return; } if (pc->recv_disable) { pc->recv_need_enable = true; - EVENT_FD_NOT_READABLE(pc->fde); + TEVENT_FD_NOT_READABLE(pc->fde); return; } @@ -424,7 +424,7 @@ next_partial: if (pc->processing) { if (pc->processing > 1) { - EVENT_FD_READABLE(pc->fde); + TEVENT_FD_READABLE(pc->fde); } pc->processing = 0; } @@ -457,7 +457,7 @@ next_partial: return; } - event_add_timed(pc->ev, pc, timeval_zero(), packet_next_event, pc); + tevent_add_timer(pc->ev, pc, timeval_zero(), packet_next_event, pc); } @@ -476,11 +476,11 @@ _PUBLIC_ void packet_recv_enable(struct packet_context *pc) { if (pc->recv_need_enable) { pc->recv_need_enable = false; - EVENT_FD_READABLE(pc->fde); + TEVENT_FD_READABLE(pc->fde); } pc->recv_disable = false; if (pc->num_read != 0 && pc->packet_size >= pc->num_read) { - event_add_timed(pc->ev, pc, timeval_zero(), packet_next_event, pc); + tevent_add_timer(pc->ev, pc, timeval_zero(), packet_next_event, pc); } } @@ -523,7 +523,7 @@ _PUBLIC_ void packet_queue_run(struct packet_context *pc) /* we're out of requests to send, so don't wait for write events any more */ - EVENT_FD_NOT_WRITEABLE(pc->fde); + TEVENT_FD_NOT_WRITEABLE(pc->fde); } /* @@ -561,7 +561,7 @@ _PUBLIC_ NTSTATUS packet_send_callback(struct packet_context *pc, DATA_BLOB blob return NT_STATUS_NO_MEMORY; } - EVENT_FD_WRITEABLE(pc->fde); + TEVENT_FD_WRITEABLE(pc->fde); return NT_STATUS_OK; } diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c index 63724e9..00c2d13 100644 --- a/source4/lib/tls/tls.c +++ b/source4/lib/tls/tls.c @@ -126,21 +126,21 @@ static ssize_t tls_pull(gnutls_transport_ptr ptr, void *buf, size_t size) return 0; } if (NT_STATUS_IS_ERR(status)) { - EVENT_FD_NOT_READABLE(tls->fde); - EVENT_FD_NOT_WRITEABLE(tls->fde); + TEVENT_FD_NOT_READABLE(tls->fde); + TEVENT_FD_NOT_WRITEABLE(tls->fde); errno = EBADF; return -1; } if (!NT_STATUS_IS_OK(status)) { - EVENT_FD_READABLE(tls->fde); + TEVENT_FD_READABLE(tls->fde); errno = EAGAIN; return -1; } if (tls->output_pending) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); } if (size != nread) { - EVENT_FD_READABLE(tls->fde); + TEVENT_FD_READABLE(tls->fde); } return nread; } @@ -168,11 +168,11 @@ static ssize_t tls_push(gnutls_transport_ptr ptr, const void *buf, size_t size) return -1; } if (!NT_STATUS_IS_OK(status)) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); return -1; } if (size != nwritten) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); } return nwritten; } @@ -205,7 +205,7 @@ static NTSTATUS tls_handshake(struct tls_context *tls) ret = gnutls_handshake(tls->session); if (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN) { if (gnutls_record_get_direction(tls->session) == 1) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); } return STATUS_MORE_ENTRIES; } @@ -298,7 +298,7 @@ static NTSTATUS tls_socket_recv(struct socket_context *sock, void *buf, ret = gnutls_record_recv(tls->session, buf, wantlen); if (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN) { if (gnutls_record_get_direction(tls->session) == 1) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); } tls->interrupted = true; return STATUS_MORE_ENTRIES; @@ -334,7 +334,7 @@ static NTSTATUS tls_socket_send(struct socket_context *sock, ret = gnutls_record_send(tls->session, blob->data, blob->length); if (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN) { if (gnutls_record_get_direction(tls->session) == 1) { - EVENT_FD_WRITEABLE(tls->fde); + TEVENT_FD_WRITEABLE(tls->fde); } tls->interrupted = true; return STATUS_MORE_ENTRIES; diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index b326b51..26cf5c8 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -55,7 +55,7 @@ _PUBLIC_ NTSTATUS composite_wait(struct composite_context *c) c->used_wait = true; while (c->state < COMPOSITE_STATE_DONE) { - if (event_loop_once(c->event_ctx) != 0) { + if (tevent_loop_once(c->event_ctx) != 0) { return NT_STATUS_UNSUCCESSFUL; } } @@ -106,7 +106,7 @@ _PUBLIC_ void composite_error(struct composite_context *ctx, NTSTATUS status) return; } if (!ctx->used_wait && !ctx->async.fn) { - event_add_timed(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); + tevent_add_timer(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); } ctx->status = status; ctx->state = COMPOSITE_STATE_ERROR; @@ -136,7 +136,7 @@ _PUBLIC_ bool composite_is_ok(struct composite_context *ctx) _PUBLIC_ void composite_done(struct composite_context *ctx) { if (!ctx->used_wait && !ctx->async.fn) { - event_add_timed(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); + tevent_add_timer(ctx->event_ctx, ctx, timeval_zero(), composite_trigger, ctx); } ctx->state = COMPOSITE_STATE_DONE; if (ctx->async.fn != NULL) { @@ -157,7 +157,7 @@ _PUBLIC_ void composite_continue(struct composite_context *ctx, already finished, then we should run the callback with an immediate event, otherwise we can be stuck forever */ if (new_ctx->state >= COMPOSITE_STATE_DONE && continuation) { - event_add_timed(new_ctx->event_ctx, new_ctx, timeval_zero(), composite_trigger, new_ctx); + tevent_add_timer(new_ctx->event_ctx, new_ctx, timeval_zero(), composite_trigger, new_ctx); } } diff --git a/source4/libcli/dgram/dgramsocket.c b/source4/libcli/dgram/dgramsocket.c index 090e67a..3f06dc7 100644 --- a/source4/libcli/dgram/dgramsocket.c +++ b/source4/libcli/dgram/dgramsocket.c @@ -131,7 +131,7 @@ static void dgm_socket_send(struct nbt_dgram_socket *dgmsock) talloc_free(req); } - EVENT_FD_NOT_WRITEABLE(dgmsock->fde); + TEVENT_FD_NOT_WRITEABLE(dgmsock->fde); return; } @@ -144,10 +144,10 @@ static void dgm_socket_handler(struct tevent_context *ev, struct tevent_fd *fde, { struct nbt_dgram_socket *dgmsock = talloc_get_type(private_data, struct nbt_dgram_socket); - if (flags & EVENT_FD_WRITE) { + if (flags & TEVENT_FD_WRITE) { dgm_socket_send(dgmsock); } - if (flags & EVENT_FD_READ) { + if (flags & TEVENT_FD_READ) { dgm_socket_recv(dgmsock); } } @@ -175,7 +175,7 @@ struct nbt_dgram_socket *nbt_dgram_socket_init(TALLOC_CTX *mem_ctx, talloc_steal(dgmsock, dgmsock->sock); - dgmsock->fde = event_add_fd(dgmsock->event_ctx, dgmsock, + dgmsock->fde = tevent_add_fd(dgmsock->event_ctx, dgmsock, socket_get_fd(dgmsock->sock), 0, dgm_socket_handler, dgmsock); @@ -202,7 +202,7 @@ NTSTATUS dgram_set_incoming_handler(struct nbt_dgram_socket *dgmsock, { dgmsock->incoming.handler = handler; dgmsock->incoming.private_data = private_data; - EVENT_FD_READABLE(dgmsock->fde); + TEVENT_FD_READABLE(dgmsock->fde); return NT_STATUS_OK; } @@ -233,7 +233,7 @@ NTSTATUS nbt_dgram_send(struct nbt_dgram_socket *dgmsock, DLIST_ADD_END(dgmsock->send_queue, req, struct nbt_dgram_request *); - EVENT_FD_WRITEABLE(dgmsock->fde); + TEVENT_FD_WRITEABLE(dgmsock->fde); return NT_STATUS_OK; diff --git a/source4/libcli/dgram/mailslot.c b/source4/libcli/dgram/mailslot.c index 38dd8fb..466c603 100644 --- a/source4/libcli/dgram/mailslot.c +++ b/source4/libcli/dgram/mailslot.c @@ -71,7 +71,7 @@ struct dgram_mailslot_handler *dgram_mailslot_listen(struct nbt_dgram_socket *dg DLIST_ADD(dgmsock->mailslot_handlers, dgmslot); -- Samba Shared Repository