svn commit: samba r4954 - in branches/SAMBA_4_0/source: lib
libcli/raw
tridge at samba.org
tridge at samba.org
Mon Jan 24 01:51:45 GMT 2005
Author: tridge
Date: 2005-01-24 01:51:45 +0000 (Mon, 24 Jan 2005)
New Revision: 4954
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4954
Log:
we don't need the separate event_remove_*() calls any more, as you now
remove an event by calling talloc_free().
Modified:
branches/SAMBA_4_0/source/lib/events.c
branches/SAMBA_4_0/source/libcli/raw/clitransport.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/events.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events.c 2005-01-24 01:15:30 UTC (rev 4953)
+++ branches/SAMBA_4_0/source/lib/events.c 2005-01-24 01:51:45 UTC (rev 4954)
@@ -55,7 +55,7 @@
'struct event_context' that you use in all subsequent calls.
After that you can add/remove events that you are interested in
- using event_add_*() and event_remove_*().
+ using event_add_*() and talloc_free()
Finally, you call event_loop_wait() to block waiting for one of the
events to occor. In normal operation event_loop_wait() will loop
@@ -177,18 +177,6 @@
/*
- remove a fd based event
- the event to remove is matched by looking at the handler
- function and the file descriptor
- return False on failure (event not found)
-*/
-BOOL event_remove_fd(struct event_context *ev, struct fd_event *e1)
-{
- talloc_free(e1);
- return True;
-}
-
-/*
remove all fd based events that match a specified fd
*/
void event_remove_fd_all(struct event_context *ev, int fd)
@@ -245,16 +233,6 @@
return e;
}
-/*
- remove a timed event
- return False on failure (event not found)
-*/
-BOOL event_remove_timed(struct event_context *ev, struct timed_event *e)
-{
- talloc_free(e);
- return True;
-}
-
static int event_loop_destructor(void *ptr)
{
struct loop_event *le = talloc_get_type(ptr, struct loop_event);
@@ -283,18 +261,6 @@
}
/*
- remove a loop event
- the event to remove is matched only on the handler function
- return False on failure (memory allocation error)
-*/
-BOOL event_remove_loop(struct event_context *ev, struct loop_event *e)
-{
- talloc_free(e);
- return True;
-}
-
-
-/*
tell the event loop to exit with the specified code
*/
void event_loop_exit(struct event_context *ev, int code)
@@ -413,7 +379,7 @@
if (timeval_compare(&te->next_event, &t) >= 0) {
/* the handler didn't set a time for the
next event - remove the event */
- event_remove_timed(ev, te);
+ talloc_free(te);
}
}
te = next;
Modified: branches/SAMBA_4_0/source/libcli/raw/clitransport.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-01-24 01:15:30 UTC (rev 4953)
+++ branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-01-24 01:51:45 UTC (rev 4954)
@@ -318,7 +318,7 @@
transport->idle.period = period;
if (transport->socket->event.te != NULL) {
- event_remove_timed(transport->socket->event.ctx, transport->socket->event.te);
+ talloc_free(transport->socket->event.te);
}
te.next_event = timeval_current_ofs(0, period);
More information about the samba-cvs
mailing list