add a diff to fix the crashing issues exhibited when using kqueue() and
re-enable kqueue(). From Vaclav Haisman on the Dovecot list.
This commit is contained in:
parent
b0cf5680ec
commit
e1c552749f
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.39 2006/04/16 06:59:29 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.40 2006/05/10 00:30:04 brad Exp $
|
||||
|
||||
COMMENT= "compact IMAP/POP3 server"
|
||||
|
||||
DISTNAME= dovecot-1.0.beta7
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
PKGNAME= ${DISTNAME}p3
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= ${HOMEPAGE}releases/
|
||||
|
||||
@ -44,8 +44,8 @@ USE_LIBTOOL= Yes
|
||||
CONFIGURE_STYLE= autoconf
|
||||
AUTOCONF_VERSION= 2.59
|
||||
CONFIGURE_ARGS+=--localstatedir=/var \
|
||||
# --with-ioloop=kqueue \
|
||||
# --with-notify=kqueue \
|
||||
--with-ioloop=kqueue \
|
||||
--with-notify=kqueue \
|
||||
--with-ssl=openssl \
|
||||
--with-ssldir=/etc/ssl \
|
||||
--without-pam \
|
||||
|
46
mail/dovecot/patches/patch-src_lib_ioloop-kqueue_c
Normal file
46
mail/dovecot/patches/patch-src_lib_ioloop-kqueue_c
Normal file
@ -0,0 +1,46 @@
|
||||
$OpenBSD: patch-src_lib_ioloop-kqueue_c,v 1.6 2006/05/10 00:30:04 brad Exp $
|
||||
--- src/lib/ioloop-kqueue.c.orig Sat Mar 25 03:07:39 2006
|
||||
+++ src/lib/ioloop-kqueue.c Tue May 9 15:57:02 2006
|
||||
@@ -74,7 +74,7 @@ void io_loop_handle_add(struct ioloop *i
|
||||
{
|
||||
struct ioloop_handler_context *ctx = ioloop->handler_context;
|
||||
const int fd = io->fd;
|
||||
- struct kevent ev = { fd, 0, EV_ADD | EV_EOF, 0, 0, NULL };
|
||||
+ struct kevent ev = { fd, 0, EV_ADD, 0, 0, NULL };
|
||||
enum io_condition condition = io->condition & MASK;
|
||||
|
||||
i_assert(io->callback != NULL);
|
||||
@@ -184,7 +184,7 @@ void io_loop_handler_run(struct ioloop *
|
||||
|
||||
i_assert(ctx->evbuf[i].ident < ctx->fds_size);
|
||||
if ((ctx->fds[ctx->evbuf[i].ident].mode & IO_ERROR) &&
|
||||
- (ctx->evbuf[i].flags & EV_EOF)) {
|
||||
+ (ctx->evbuf[i].flags & (EV_EOF | EV_ERROR))) {
|
||||
struct io *errio = ctx->fds[ctx->evbuf[i].ident].errio;
|
||||
|
||||
t_id = t_push();
|
||||
@@ -203,14 +203,22 @@ void io_loop_handler_run(struct ioloop *
|
||||
" in I/O handler %p",
|
||||
(void *)io->callback);
|
||||
}
|
||||
+ } else if (ctx->fds[ctx->evbuf[i].ident].mode & IO_ERROR) {
|
||||
+ /*
|
||||
+ NO-OP. If the handle is registered only for
|
||||
+ IO_ERROR, then we can get readable/writable event
|
||||
+ but no IO_READ | IO_WRITE set.
|
||||
+ */
|
||||
} else
|
||||
i_panic("Unrecognized event: kevent {.ident = %u,"
|
||||
" .filter = 0x%04x,"
|
||||
" .flags = 0x%04x,"
|
||||
" .fflags = 0x%08x,"
|
||||
- " .data = 0x%08x}", ctx->evbuf[i].ident,
|
||||
+ " .data = 0x%08x}\n"
|
||||
+ "mode: 0x%x04x", ctx->evbuf[i].ident,
|
||||
ctx->evbuf[i].filter, ctx->evbuf[i].flags,
|
||||
- ctx->evbuf[i].fflags, ctx->evbuf[i].data);
|
||||
+ ctx->evbuf[i].fflags, ctx->evbuf[i].data,
|
||||
+ ctx->fds[ctx->evbuf[i].ident].mode);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user