[SCM] Samba Shared Repository - branch master updated - de4812ea1c9ed9ca69f949411fbdb0c8a0e66eef

Stefan Metzmacher metze at samba.org
Sun Jan 11 14:28:59 GMT 2009


The branch, master has been updated
       via  de4812ea1c9ed9ca69f949411fbdb0c8a0e66eef (commit)
      from  0c2f8ab3ecf5535b053fa974a93ff6d65e619c2c (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit de4812ea1c9ed9ca69f949411fbdb0c8a0e66eef
Author: Bo Yang <boyang at novell.com>
Date:   Sat Jan 10 13:46:50 2009 +0800

    Fix tevent_common_context_destructor to remove all events instead of just the first one
    
    Signed-off-by: Bo Yang <boyang at novell.com>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/tevent/tevent.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index c8b79c6..fa8219e 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -147,19 +147,25 @@ int tevent_common_context_destructor(struct tevent_context *ev)
 		ev->pipe_fde = NULL;
 	}
 
-	for (fd=ev->fd_events; fd; fd = fd->next) {
+	fd = ev->fd_events;
+	while (fd) {
 		fd->event_ctx = NULL;
 		DLIST_REMOVE(ev->fd_events, fd);
+		fd = ev->fd_events;
 	}
 
-	for (te=ev->timer_events; te; te = te->next) {
+	te = ev->timer_events;
+	while (te) {
 		te->event_ctx = NULL;
-		DLIST_REMOVE(ev->timer_events, te);
+		DLIST_REMOVE(te->timer_events, te);
+		te = ev->timer_events;
 	}
 
-	for (se=ev->signal_events; se; se = se->next) {
+	se = ev->signal_events;
+	while (se) {
 		se->event_ctx = NULL;
 		DLIST_REMOVE(ev->signal_events, se);
+		se = ev->signal_events;
 	}
 
 	return 0;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list