Displaying 9 results from an estimated 9 matches for "p_free".
Did you mean:
i_free
2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
...;kqueue(): %m");
+
+ ctx->fds_size = INITIAL_BUF_SIZE;
+ ctx->fds = p_new(ioloop->pool, struct fdrecord, ctx->fds_size);
+ memset(ctx->fds, 0, sizeof(struct fdrecord) * ctx->fds_size);
+}
+
+
+void io_loop_handler_deinit(struct ioloop *ioloop)
+{
+ p_free(ioloop->pool, ioloop->handler_context->evbuf);
+ p_free(ioloop->pool, ioloop->handler_context->fds);
+ p_free(ioloop->pool, ioloop->handler_context);
+}
+
+
+void io_loop_handle_add(struct ioloop *ioloop, struct io *io)
+{
+ struct ioloop_handler_context...
2004 Aug 30
0
[PATCH] [RFC] epoll based ioloop handler (now with patch)
...LL_EVENTS;
+ data->fd_index = p_new(ioloop->pool, struct io_list *, data->idx_size);
+
+ data->epfd = epoll_create(INITIAL_EPOLL_EVENTS);
+}
+
+void io_loop_handler_deinit(struct ioloop *ioloop)
+{
+ struct ioloop_handler_data *data = ioloop->handler_data;
+
+ close(data->epfd);
+ p_free(ioloop->pool, ioloop->handler_data->events);
+ p_free(ioloop->pool, ioloop->handler_data->fd_index);
+ p_free(ioloop->pool, ioloop->handler_data);
+}
+
+#define IO_EPOLL_INPUT (EPOLLIN | EPOLLPRI | EPOLLERR | EPOLLHUP)
+#define IO_EPOLL_OUTPUT (EPOLLOUT | EPOLLERR | EPOLLHUP...
2008 Jul 05
1
AIX: mntctl implementation for NFS quota support
...o 'lib/mountpoint.c' today. My tests are
looking good and so I'd like to share the patch.
While I'm still not really familiar with dovecots memory management, I
need someone who is familiar with it to have a look on my lines of code.
Especially the usage or p_new, t_strconcat and p_free should be checked.
:-)
To activate the patch you have to add "#define HAVE_VMOUNT_H 1" do
'config.h'. Maybe someone wants to alter configure* to do this
automatically?
And of course Timo, if you find it useful, you may include the code in
one of the next dovecot releases.
R...
2004 Oct 25
0
[PATCH] Request for testing: BSD kqueue ioloop handler
..._new(ioloop->pool, struct io_list *, data->idx_size);
+
+ data->kq = kqueue();
+ if (data->kq < 0)
+ i_panic("kqueue(): %m");
+}
+
+void io_loop_handler_deinit(struct ioloop *ioloop)
+{
+ struct ioloop_handler_data *data = ioloop->handler_data;
+
+ close(data->kq);
+ p_free(ioloop->pool, data->events);
+ p_free(ioloop->pool, data->fd_index);
+ p_free(ioloop->pool, data);
+}
+
+void io_loop_handle_add(struct ioloop *ioloop, struct io *io)
+{
+ struct ioloop_handler_data *data = ioloop->handler_data;
+ struct io_list *list;
+ struct kevent *event;
+ un...
2005 Dec 15
2
Patch: More of kqueue() support.
...define MASK (IO_READ | IO_WRITE | IO_ERROR)
+
struct ioloop_handler_context {
int kq;
size_t evbuf_size;
@@ -57,6 +60,7 @@ void io_loop_handler_init(struct ioloop
void io_loop_handler_deinit(struct ioloop *ioloop)
{
+ close(ioloop->handler_context->kq);
p_free(ioloop->pool, ioloop->handler_context->evbuf);
p_free(ioloop->pool, ioloop->handler_context->fds);
p_free(ioloop->pool, ioloop->handler_context);
@@ -66,8 +70,8 @@ void io_loop_handle_add(struct ioloop *i
{
struct ioloop_handler_context *ctx = iol...
2014 Jul 28
2
not able to compile deleted_to_trash Plugin
...from deleted-to-trash-plugin.c:2:
deleted-to-trash-plugin.c:65:20: error: 'struct last_copy_info' has no member named 'src_mailbox_name'
i_free(last_copy.src_mailbox_name);
^
/usr/include/dovecot/mempool.h:89:33: note: in definition of macro 'p_free'
(pool)->v->free(pool, mem); \
^
deleted-to-trash-plugin.c:65:4: note: in expansion of macro 'i_free'
i_free(last_copy.src_mailbox_name);
^
deleted-to-trash-plugin.c:65:20: error: 'struct last_copy_info' has no member nam...
2004 Aug 23
1
[PATCH] pass struct io * to io_loop_handle_add()/io_loop_handle_remove()
...loop-select.c dovecot-1.0-test32/src/lib/ioloop-select.c
--- dovecot-1.0-test32.vanilla/src/lib/ioloop-select.c 2003-08-27 01:18:16.000000000 +0400
+++ dovecot-1.0-test32/src/lib/ioloop-select.c 2004-08-21 18:28:38.000000000 +0400
@@ -30,9 +30,11 @@ void io_loop_handler_deinit(struct ioloo
p_free(ioloop->pool, ioloop->handler_data);
}
-void io_loop_handle_add(struct ioloop *ioloop, int fd,
- enum io_condition condition)
+void io_loop_handle_add(struct ioloop *ioloop, struct io *io)
{
+ enum io_condition condition = io->condition;
+ int fd = io->fd;
+
i_assert(fd >= 0)...
2005 Aug 22
2
Re: Dovecot inotify problem
Hi Reuben,
I hope you don't mind me copying the dovecot list again.
> dovecot: Aug 21 04:08:22 Error: IMAP(reuben): inotify_rm_watch() failed:
> Invalid argument
Odd.
> This is with a 2.6.13-rc6-mm1 release. I've posted to LKML because there is
> also a kernel stack produced at one point which looks inotify related (but the
> messages above are contant).
> See
2003 Apr 16
1
PATCH Add support for kqueue in ioloop subsystem
...data = data =
p_new(ioloop->pool, struct ioloop_handler_data, 1);
data->kq = kqueue();
if (data->kq < 0) {
i_fatal("couldn't initialise kqueue: %m");
}
memset(&data->event, 0, sizeof(struct kevent));
}
void io_loop_handler_deinit(struct ioloop *ioloop)
{
p_free(ioloop->pool, ioloop->handler_data);
}
void io_loop_handle_add(struct ioloop *ioloop, int fd, int condition)
{
short filter;
struct ioloop_handler_data *data = ioloop->handler_data;
i_assert(fd >= 0);
if (condition & IO_READ)
filter |= EVFILT_READ;
if (condition & IO_W...