[dovecot-cvs] dovecot/src/lib ioloop.c,1.33,1.34

cras at dovecot.org cras at dovecot.org
Sun Feb 5 15:33:25 EET 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv18792

Modified Files:
	ioloop.c 
Log Message:
Don't crash if we couldn't add I/O notifier.



Index: ioloop.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- ioloop.c	29 Jan 2006 10:55:22 -0000	1.33
+++ ioloop.c	5 Feb 2006 13:33:23 -0000	1.34
@@ -50,9 +50,10 @@
 	i_assert(callback != NULL);
 	
 	io = io_loop_notify_add(current_ioloop, path, callback, context);
-	if (io != NULL)
-		io->condition |= IO_NOTIFY;
+	if (io == NULL)
+		return NULL;
 
+	io->condition |= IO_NOTIFY;
 	io->next = current_ioloop->notifys;
 	current_ioloop->notifys = io;
 



More information about the dovecot-cvs mailing list