summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-05-25 15:28:35 -0400
committerSimo Sorce <idra@samba.org>2011-08-13 09:54:16 -0400
commit15efcbaa09472b306a875178ee535a06d1b01811 (patch)
tree3916f26e079ccb3490fc12eccb6dbf9d5974e131 /source4
parentedc32665d0f5cfd5d86f975c8ac8e8ff100956f7 (diff)
downloadsamba-15efcbaa09472b306a875178ee535a06d1b01811.tar.gz
samba-15efcbaa09472b306a875178ee535a06d1b01811.tar.bz2
samba-15efcbaa09472b306a875178ee535a06d1b01811.zip
s4:lib: use tevent_ fns names instead of legcay event_ ones
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/com/main.c2
-rw-r--r--source4/lib/messaging/messaging.c12
-rw-r--r--source4/lib/socket/connect.c4
-rw-r--r--source4/lib/socket/connect_multi.c2
-rw-r--r--source4/lib/stream/packet.c16
-rw-r--r--source4/lib/tls/tls.c20
6 files changed, 28 insertions, 28 deletions
diff --git a/source4/lib/com/main.c b/source4/lib/com/main.c
index 487ed5b712..1f657cef87 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 31440db468..4a4adac16f 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);
}
/*
@@ -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;
@@ -626,7 +626,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
msg->event.ev = ev;
msg->event.fde = tevent_add_fd(ev, msg, socket_get_fd(msg->sock),
- EVENT_FD_READ, imessaging_handler, msg);
+ TEVENT_FD_READ, imessaging_handler, msg);
tevent_fd_set_auto_close(msg->event.fde);
if (auto_remove) {
diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c
index b943de8c14..1da8b41bbd 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 4ce5115e97..96277a6139 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 98343707c1..545d518cff 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 63724e9628..00c2d13478 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;