For us who run more than one client at a time

Horst Birthelmer horst at riback.net
Fri Apr 21 12:19:12 CEST 2006


On Apr 20, 2006, at 5:11 PM, Harald Barth wrote:
> This will (mis)use the ports above 7001 as callback port
> if 7001 happens to be taken. Is this OK or do we need
> to be more sophisticated?
>
> Harald.
>
> --- arlad/arla.c.orig   2006-04-20 17:00:55.000000000 +0200
> +++ arlad/arla.c        2006-04-20 17:04:27.000000000 +0200
> @@ -47,11 +47,14 @@
>  initrx (int port)
>  {
>      int error;
> +    int i = 0;
>
>      if (port == 0)
>         port = afscallbackport;
>
> -    error = rx_Init (htons(port));
> +    while ((error = rx_Init (htons(port + i)))
> +          && i < 10)
> +       i++;
>      if (error)
>         arla_err (1, ADEBERROR, error, "rx_init");
>  }

I didn't check the source, so don't slap me too hard if this is a  
stupid question.

Is the port error the only error rx_Init can return?
You're trying to get another port (OK for just 10 times) on every  
init error.

If that's what was intended ... it's OK. ;-)

Horst


More information about the Arla-drinkers mailing list