[Dovecot] rawlog fails

Mark E. Mallett mem at mv.mv.com
Fri May 16 05:18:06 EEST 2003


You mentioned --with-rawlog earlier, so I tried it.  It fails with
a select error.  I believe it's because in some cases the timeval
struct is not initialized in io_loop_get_wait_time (e.g. see sample
diff below).  

-mm-


diff -c src/lib/ioloop.c.orig src/lib/ioloop.c
*** src/lib/ioloop.c.orig       Sat Apr 12 11:00:10 2003
--- src/lib/ioloop.c    Thu May 15 22:10:12 2003
***************
*** 223,230 ****
--- 223,238 ----
  int io_loop_get_wait_time(struct timeout *timeout, struct timeval *tv,
                          struct timeval *tv_now)
  {
+ #if 0         /* mem 20030515 make sure tv contains valid data here */
        if (timeout == NULL)
                return INT_MAX;
+ #else
+       if (timeout == NULL) {
+               tv->tv_sec = INT_MAX / 1000;
+               tv->tv_usec = 0;
+               return INT_MAX;
+       }
+ #endif

        if (tv_now == NULL) {
                if (gettimeofday(tv, NULL) < 0)




More information about the dovecot mailing list