12 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: Courier 20031005
FromSent OnAttachments
Sam VarshavchikOct 5, 2003 1:47 pm 
Jim GiffordOct 5, 2003 3:54 pm 
Sam VarshavchikOct 5, 2003 4:10 pm 
Jon NelsonOct 5, 2003 4:59 pm 
Sam VarshavchikOct 5, 2003 5:25 pm 
Gordon MessmerOct 5, 2003 6:23 pm 
Sam VarshavchikOct 5, 2003 7:00 pm.txt
Jon NelsonOct 5, 2003 8:16 pm 
Jon NelsonOct 5, 2003 8:21 pm 
Gordon MessmerOct 5, 2003 9:05 pm 
Gordon MessmerOct 5, 2003 9:07 pm 
Jon NelsonOct 6, 2003 5:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Re: Courier 20031005Actions...
From:Jon Nelson (jnel@jamponi.net)
Date:Oct 5, 2003 8:16:05 pm
List:net.sourceforge.lists.courier-users

On Sun, 5 Oct 2003, Sam Varshavchik wrote:

Gordon Messmer writes:

Sam Varshavchik wrote:

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.