Mercurial > dovecot > core-2.2
changeset 18984:d26178d0557a
lib: io_add_notify() wasn't setting struct io.source_linenum
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 19 Aug 2015 21:24:50 +0300 |
parents | 637e005a5559 |
children | 818c1a77c025 |
files | src/lib/ioloop-notify-inotify.c src/lib/ioloop-notify-kqueue.c src/lib/ioloop-notify-none.c src/lib/ioloop.h |
diffstat | 4 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ioloop-notify-inotify.c Wed Aug 19 20:49:12 2015 +0300 +++ b/src/lib/ioloop-notify-inotify.c Wed Aug 19 21:24:50 2015 +0300 @@ -85,8 +85,9 @@ } #undef io_add_notify -enum io_notify_result io_add_notify(const char *path, io_callback_t *callback, - void *context, struct io **io_r) +enum io_notify_result +io_add_notify(const char *path, unsigned int source_linenum, + io_callback_t *callback, void *context, struct io **io_r) { struct ioloop_notify_handler_context *ctx = current_ioloop->notify_handler_context; @@ -125,6 +126,7 @@ } *io_r = io_notify_fd_add(&ctx->fd_ctx, wd, callback, context); + (*io_r)->source_linenum = source_linenum; return IO_NOTIFY_ADDED; }
--- a/src/lib/ioloop-notify-kqueue.c Wed Aug 19 20:49:12 2015 +0300 +++ b/src/lib/ioloop-notify-kqueue.c Wed Aug 19 21:24:50 2015 +0300 @@ -104,8 +104,9 @@ } #undef io_add_notify -enum io_notify_result io_add_notify(const char *path, io_callback_t *callback, - void *context, struct io **io_r) +enum io_notify_result +io_add_notify(const char *path, unsigned int source_linenum, + io_callback_t *callback, void *context, struct io **io_r) { struct ioloop_notify_handler_context *ctx = current_ioloop->notify_handler_context; @@ -128,6 +129,7 @@ io = i_new(struct io_notify, 1); io->io.condition = IO_NOTIFY; + io->io.source_linenum = source_linenum; io->io.callback = callback; io->io.context = context; io->io.ioloop = current_ioloop;
--- a/src/lib/ioloop-notify-none.c Wed Aug 19 20:49:12 2015 +0300 +++ b/src/lib/ioloop-notify-none.c Wed Aug 19 21:24:50 2015 +0300 @@ -8,6 +8,7 @@ #undef io_add_notify enum io_notify_result io_add_notify(const char *path ATTR_UNUSED, + unsigned int source_linenum ATTR_UNUSED, io_callback_t *callback ATTR_UNUSED, void *context ATTR_UNUSED, struct io **io_r) {
--- a/src/lib/ioloop.h Wed Aug 19 20:49:12 2015 +0300 +++ b/src/lib/ioloop.h Wed Aug 19 21:24:50 2015 +0300 @@ -55,10 +55,11 @@ CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \ (io_callback_t *)callback, context) enum io_notify_result -io_add_notify(const char *path, io_callback_t *callback, - void *context, struct io **io_r) ATTR_NULL(3); +io_add_notify(const char *path, unsigned int source_linenum, + io_callback_t *callback, void *context, + struct io **io_r) ATTR_NULL(3); #define io_add_notify(path, callback, context, io_r) \ - io_add_notify(path + \ + io_add_notify(path, __LINE__ + \ CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \ (io_callback_t *)callback, context, io_r) struct io *io_add_istream(struct istream *input, unsigned int source_linenum,