Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Re: (PR#3901) bug no. 3664
Home

[Freeciv-Dev] Re: (PR#3901) bug no. 3664

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: pzel@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#3901) bug no. 3664
From: "ue80@xxxxxxxxxxxxxxxxxxxxx" <ue80@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Mar 2003 06:02:24 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, Mar 30, 2003 at 03:38:33AM -0800, Peter Zelezny wrote:
> 
> Hi,
> 
> Regarding this bug:
> 
> http://rt.freeciv.org/Ticket/Display.html?id=3664
> 
> I think this patch might be on the right track to fixing it. I havn't had
> a chance to try it out (I havn't the resources).
> 
> Basically, you want to:
> 
> loop
> {
>       select(.., &write_fd, ....);    /* sernet.c */
> 
>       if(FD_IS_SET(socket, &write))
>       {
>               repeat  /* connection.c */
>               {
>                       nput = send(...);
>                       if(nput == -1 && errno==EWOULDBLOCK)
>                               break;
>               }
>       }
> }
> 
> I think the second call to select() in connection.c is incorrect and
> could block. Also, you shouldn't put sockets into write_fd unless there's
> actually something in your queue to send, or select can keep returning
> and loop (on some unix's it does this). I'm not sure if it does it or
> not, just FYI.

There is no significant change in the behavier.

Thomas

P.S.
To attack a message to the right thread you have to put a "(PR#3664)"
into it.
-- 
Thomas Strub  ***  eMail ue80@xxxxxxxxxxxxxxxxxxxxx
Wenn Du nicht programmieren kannst und Dir für Arbeit zu schade bist:
Werde Berater, Analyst oder organisiere Kongresse.



[Prev in Thread] Current Thread [Next in Thread]