On Sun, 5 Oct 2003, Sam Varshavchik wrote: > Gordon Messmer writes: > > > Sam Varshavchik wrote: > >> Download: http://www.courier-mta.org/download.php > > > > Any chance of this patch (or something similar) making it in before the > > next release? > > > > http://phantom.dragonsdawn.net/~gordon/courier-patches/cdfilters-EAGAIN.patch > > This is not correct. No matter what you're trying to do, throwing away the > return code from connect() is patently wrong. This may work on your > particular operating system or revision, but it's a sure bet it's not going > to work for everyone. > > I believe that the following patch, instead, is the correct way to do this.
If I may, I would suggest that neither patch is correct. You normally want to call connect *once*, and then select on the file descriptor. At the end of your proscribed time limit, or earlier, the file descriptor will be definitively connected, failed to connect, or still trying. Sam's patch is much closer, IMO, but still not quite correct, because the patch calls connect multiple times. I could be wrong, but I've never seen it used like this. -- Democracy is two wolves and a sheep voting on what to have for dinner. Liberty is two wolves attempting to have a sheep for dinner and finding a well-informed, well-armed sheep. Jon Nelson <[EMAIL PROTECTED]> C and Python Code Gardener ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
