On Mon, Dec 05, 2005 at 06:51:42PM -0800, Landon Fuller wrote: > Frank, I've attached a patch against 1.38.2 -- I'd be most appreciative > if you could test it and verify that it solves your problem.
Nope, but this one (which just does the same thing in a few more spots) does. thanks! -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC
diff -u -r bacula-1.38.2-select/src/lib/bnet.c bacula-1.38.2/src/lib/bnet.c --- bacula-1.38.2-select/src/lib/bnet.c 2005-12-06 12:32:03.000000000 -0500 +++ bacula-1.38.2/src/lib/bnet.c 2005-12-06 12:34:35.000000000 -0500 @@ -538,9 +538,9 @@ FD_ZERO(&fdset); FD_SET((unsigned)bsock->fd, &fdset); - tv.tv_sec = sec; - tv.tv_usec = 0; for (;;) { + tv.tv_sec = sec; + tv.tv_usec = 0; switch (select(bsock->fd + 1, &fdset, NULL, NULL, &tv)) { case 0: /* timeout */ bsock->b_errno = 0; diff -u -r bacula-1.38.2-select/src/lib/tls.c bacula-1.38.2/src/lib/tls.c --- bacula-1.38.2-select/src/lib/tls.c 2005-09-18 05:56:20.000000000 -0400 +++ bacula-1.38.2/src/lib/tls.c 2005-12-06 12:33:51.000000000 -0500 @@ -466,8 +466,6 @@ /* Zero the fdset, we'll set our fd prior to each invocation of select() */ FD_ZERO(&fdset); - tv.tv_sec = 10; - tv.tv_usec = 0; fdmax = bsock->fd + 1; /* Ensure that socket is non-blocking */ @@ -498,12 +496,16 @@ /* If we timeout of a select, this will be unset */ FD_SET((unsigned) bsock->fd, &fdset); /* Block until we can read */ + tv.tv_sec = 10; + tv.tv_usec = 0; select(fdmax, &fdset, NULL, &fdset, &tv); break; case SSL_ERROR_WANT_WRITE: /* If we timeout of a select, this will be unset */ FD_SET((unsigned) bsock->fd, &fdset); /* Block until we can write */ + tv.tv_sec = 10; + tv.tv_usec = 0; select(fdmax, NULL, &fdset, &fdset, &tv); break; default: @@ -646,12 +648,16 @@ /* If we timeout of a select, this will be unset */ FD_SET((unsigned) bsock->fd, &fdset); /* Block until we can read */ + tv.tv_sec = 10; + tv.tv_usec = 0; select(fdmax, &fdset, NULL, &fdset, &tv); break; case SSL_ERROR_WANT_WRITE: /* If we timeout of a select, this will be unset */ FD_SET((unsigned) bsock->fd, &fdset); /* Block until we can write */ + tv.tv_sec = 10; + tv.tv_usec = 0; select(fdmax, NULL, &fdset, &fdset, &tv); break; default: