summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_timed.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-29 20:24:57 +0100
committerStefan Metzmacher <metze@samba.org>2008-12-29 20:46:40 +0100
commit183c379fe58ca60f5ef2d1f2033d035d4117ac8f (patch)
treed68d3895f1e79b96c3af2c80cac6a403a1a180d4 /lib/tevent/tevent_timed.c
parentaf29b82536ef678e6a1817aa11be8c363253b305 (diff)
downloadsamba-183c379fe58ca60f5ef2d1f2033d035d4117ac8f.tar.gz
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 'lib/tevent/tevent_timed.c')
-rw-r--r--lib/tevent/tevent_timed.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/tevent/tevent_timed.c b/lib/tevent/tevent_timed.c
index a9b80948a17..ce3fc8eb006 100644
--- a/lib/tevent/tevent_timed.c
+++ b/lib/tevent/tevent_timed.c
@@ -109,15 +109,15 @@ bool ev_timeval_is_zero(const struct timeval *tv)
/*
destroy a timed event
*/
-static int common_event_timed_destructor(struct timed_event *te)
+static int common_event_timed_destructor(struct tevent_timer *te)
{
- struct event_context *ev = talloc_get_type(te->event_ctx,
- struct event_context);
+ struct tevent_context *ev = talloc_get_type(te->event_ctx,
+ struct tevent_context);
DLIST_REMOVE(ev->timer_events, te);
return 0;
}
-static int common_event_timed_deny_destructor(struct timed_event *te)
+static int common_event_timed_deny_destructor(struct tevent_timer *te)
{
return -1;
}
@@ -126,14 +126,14 @@ static int common_event_timed_deny_destructor(struct timed_event *te)
add a timed event
return NULL on failure (memory allocation error)
*/
-struct timed_event *common_event_add_timed(struct event_context *ev, TALLOC_CTX *mem_ctx,
+struct tevent_timer *common_event_add_timed(struct tevent_context *ev, TALLOC_CTX *mem_ctx,
struct timeval next_event,
event_timed_handler_t handler,
void *private_data)
{
- struct timed_event *te, *last_te, *cur_te;
+ struct tevent_timer *te, *last_te, *cur_te;
- te = talloc(mem_ctx?mem_ctx:ev, struct timed_event);
+ te = talloc(mem_ctx?mem_ctx:ev, struct tevent_timer);
if (te == NULL) return NULL;
te->event_ctx = ev;
@@ -166,10 +166,10 @@ struct timed_event *common_event_add_timed(struct event_context *ev, TALLOC_CTX
return the delay untill the next timed event,
or zero if a timed event was triggered
*/
-struct timeval common_event_loop_timer_delay(struct event_context *ev)
+struct timeval common_event_loop_timer_delay(struct tevent_context *ev)
{
struct timeval current_time = ev_timeval_zero();
- struct timed_event *te = ev->timer_events;
+ struct tevent_timer *te = ev->timer_events;
if (!te) {
/* have a default tick time of 30 seconds. This guarantees