]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
ioloop: If io_add() is called twice for same fd, give a bit more informative panic...
authorTimo Sirainen <tss@iki.fi>
Tue, 19 Oct 2010 18:27:59 +0000 (19:27 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 19 Oct 2010 18:27:59 +0000 (19:27 +0100)
src/lib/ioloop-iolist.c

index 2e8fd17e78e0eaae545edf08682cf1725416dd8f..4a4be299ed4236a9a8ad4f7d01e47f9d428de215 100644 (file)
@@ -22,6 +22,11 @@ bool ioloop_iolist_add(struct io_list *list, struct io_file *io)
                i_unreached();
        }
 
+       if (list->ios[idx] != NULL) {
+               i_panic("io_add(0x%x) called twice fd=%d, callback=%p -> %p",
+                       io->io.condition, io->fd, list->ios[idx]->io.callback,
+                       io->io.callback);
+       }
        i_assert(list->ios[idx] == NULL);
        list->ios[idx] = io;