Re: For us who run more than one client at a time

Horst Birthelmer <[email protected]>
Newsgroups gmane.comp.file-systems.arla.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.