[dovecot-cvs] dovecot/src/lib ioloop-internal.h,1.4,1.5 ioloop-poll.c,1.9,1.10 ioloop-select.c,1.10,1.11 ioloop.c,1.11,1.12 ioloop.h,1.7,1.8 ostream-file.c,1.6,1.7
cras at procontrol.fi
cras at procontrol.fi
Mon Jan 27 03:44:36 EET 2003
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv23816/lib
Modified Files:
ioloop-internal.h ioloop-poll.c ioloop-select.c ioloop.c
ioloop.h ostream-file.c
Log Message:
Removed useless parameters from io_callback_t and timeout_callback_t.
Index: ioloop-internal.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop-internal.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ioloop-internal.h 11 Jan 2003 19:55:56 -0000 1.4
+++ ioloop-internal.h 27 Jan 2003 01:44:34 -0000 1.5
@@ -29,7 +29,7 @@
unsigned int destroyed:1;
unsigned int invalid:1;
- io_callback_t callback;
+ io_callback_t *callback;
void *context;
};
@@ -41,7 +41,7 @@
int run_now;
int destroyed;
- timeout_callback_t callback;
+ timeout_callback_t *callback;
void *context;
};
Index: ioloop-poll.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop-poll.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ioloop-poll.c 11 Jan 2003 19:55:56 -0000 1.9
+++ ioloop-poll.c 27 Jan 2003 01:44:34 -0000 1.10
@@ -209,7 +209,7 @@
}
t_id = t_push();
- io->callback(io->context, io->fd, io);
+ io->callback(io->context);
if (t_pop() != t_id)
i_panic("Leaked a t_pop() call!");
Index: ioloop-select.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop-select.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ioloop-select.c 11 Jan 2003 19:55:56 -0000 1.10
+++ ioloop-select.c 27 Jan 2003 01:44:34 -0000 1.11
@@ -126,7 +126,7 @@
continue;
t_id = t_push();
- io->callback(io->context, io->fd, io);
+ io->callback(io->context);
if (t_pop() != t_id)
i_panic("Leaked a t_pop() call!");
Index: ioloop.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ioloop.c 27 Jan 2003 00:46:55 -0000 1.11
+++ ioloop.c 27 Jan 2003 01:44:34 -0000 1.12
@@ -83,14 +83,14 @@
}
}
-struct io *io_add(int fd, int condition, io_callback_t callback, void *data)
+struct io *io_add(int fd, int condition, io_callback_t *callback, void *data)
{
return io_add_priority(fd, IO_PRIORITY_DEFAULT,
condition, callback, data);
}
struct io *io_add_priority(int fd, int priority, int condition,
- io_callback_t callback, void *context)
+ io_callback_t *callback, void *context)
{
struct io *io;
@@ -184,7 +184,7 @@
}
}
-struct timeout *timeout_add(int msecs, timeout_callback_t callback,
+struct timeout *timeout_add(int msecs, timeout_callback_t *callback,
void *context)
{
struct timeout *timeout;
@@ -281,7 +281,7 @@
timeout_update_next(t, &ioloop_timeval);
t_id = t_push();
- t->callback(t->context, t);
+ t->callback(t->context);
if (t_pop() != t_id)
i_panic("Leaked a t_pop() call!");
}
Index: ioloop.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ioloop.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ioloop.h 27 Jan 2003 00:46:55 -0000 1.7
+++ ioloop.h 27 Jan 2003 01:44:34 -0000 1.8
@@ -14,8 +14,8 @@
struct timeout;
struct ioloop;
-typedef void (*io_callback_t) (void *context, int fd, struct io *io);
-typedef void (*timeout_callback_t) (void *context, struct timeout *timeout);
+typedef void io_callback_t(void *context);
+typedef void timeout_callback_t(void *context);
/* Time when the I/O loop started calling handlers.
Can be used instead of time(NULL). */
@@ -26,13 +26,13 @@
/* I/O listeners - you can create different handlers for IO_READ and IO_WRITE,
but make sure you don't create multiple handlers of same type, it's not
checked and removing one will stop the other from working as well. */
-struct io *io_add(int fd, int condition, io_callback_t callback, void *context);
+struct io *io_add(int fd, int condition, io_callback_t *callback, void *context);
struct io *io_add_priority(int fd, int priority, int condition,
- io_callback_t callback, void *context);
+ io_callback_t *callback, void *context);
void io_remove(struct io *io);
/* Timeout handlers */
-struct timeout *timeout_add(int msecs, timeout_callback_t callback,
+struct timeout *timeout_add(int msecs, timeout_callback_t *callback,
void *context);
void timeout_remove(struct timeout *timeout);
Index: ostream-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ostream-file.c 11 Jan 2003 19:55:56 -0000 1.6
+++ ostream-file.c 27 Jan 2003 01:44:34 -0000 1.7
@@ -410,8 +410,7 @@
fstream->buffer_size = size;
}
-static void stream_send_io(void *context, int fd __attr_unused__,
- struct io *io __attr_unused__)
+static void stream_send_io(void *context)
{
struct file_ostream *fstream = context;
struct iovec iov[2];
More information about the dovecot-cvs
mailing list