Problem with stunnel 4.06 on FreeBSD and possibly other systems

"Michal Trojnara" <[email protected]> Tue, 28 Dec 2004 09:07:57 +0100
Newsgroups gmane.network.stunnel.announce
Message-ID <001501c4ecb4$57f551e0$df66a8c0__8765.38853995061$1104223555$gmane$org@DT1518000186>
Dear Users,

Frank de Bot has found a bug in stunnel 4.06.  I've attached the patch 
stunnel needs to work on FreeBSD (and possibly other) systems.  It's not 
needed on Linux and WIN32 platforms.

Best regards,
    Mike

_______________________________________________
stunnel-announce mailing list
[email protected]
http://stunnel.mirt.net/mailman/listinfo/stunnel-announce
poll_timeout.patch (application/octet-stream, 783 B)
*** stunnel-4.06-old/src/network.c	2004-10-14 17:03:49.000000000 +0200
--- stunnel-4.06/src/network.c	2004-12-27 21:21:16.000000000 +0100
***************
*** 125,131 ****
      int retval;
  
      do { /* skip "Interrupted system call" errors */
!         retval=poll(fds->ufds, fds->nfds, 1000*timeout);
              /* no timeout -> main loop */
          if(timeout<0 && retval>0 && s_poll_canread(fds, signal_pipe[0]))
              signal_pipe_empty();
--- 125,131 ----
      int retval;
  
      do { /* skip "Interrupted system call" errors */
!         retval=poll(fds->ufds, fds->nfds, timeout<0 ? -1 : 1000*timeout);
              /* no timeout -> main loop */
          if(timeout<0 && retval>0 && s_poll_canread(fds, signal_pipe[0]))
              signal_pipe_empty();