svn commit: samba r21212 - in branches/SAMBA_4_0/source/lib/events:
.
tridge at samba.org
tridge at samba.org
Wed Feb 7 03:16:10 GMT 2007
Author: tridge
Date: 2007-02-07 03:16:10 +0000 (Wed, 07 Feb 2007)
New Revision: 21212
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21212
Log:
detect if the kernel does not support integrated epoll/aio when the
event context is created. This allows the LOCAL-EVENT test to pass on
systems with have libaio but not the necessary kernel patches
Modified:
branches/SAMBA_4_0/source/lib/events/events_aio.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/events/events_aio.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-02-07 02:57:44 UTC (rev 21211)
+++ branches/SAMBA_4_0/source/lib/events/events_aio.c 2007-02-07 03:16:10 UTC (rev 21212)
@@ -324,15 +324,25 @@
aio_ev->epoll_iocb = talloc(aio_ev, struct iocb);
if (io_queue_init(MAX_AIO_QUEUE_DEPTH, &aio_ev->ioctx) != 0) {
+ talloc_free(aio_ev);
return -1;
}
aio_ev->epoll_fd = epoll_create(MAX_AIO_QUEUE_DEPTH);
- if (aio_ev->epoll_fd == -1) return -1;
+ if (aio_ev->epoll_fd == -1) {
+ talloc_free(aio_ev);
+ return -1;
+ }
talloc_set_destructor(aio_ev, aio_ctx_destructor);
ev->additional_data = aio_ev;
+
+ if (setup_epoll_wait(aio_ev) < 0) {
+ talloc_free(aio_ev);
+ return -1;
+ }
+
return 0;
}
More information about the samba-cvs
mailing list