pcp
[Top] [All Lists]

Re: First Cut at Avahi Support for PCP Servers

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: First Cut at Avahi Support for PCP Servers
From: fche@xxxxxxxxxx (Frank Ch. Eigler)
Date: Mon, 07 Oct 2013 10:00:14 -0400
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <5251DF3C.7040805@xxxxxxxxxx> (Dave Brolley's message of "Sun, 06 Oct 2013 18:07:56 -0400")
References: <5251DF3C.7040805@xxxxxxxxxx>
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Hi, Dave -

> I wanted to run this past you all for comments before committing or
> pushing anything. It's code that enables PCP server's to announce
> themselves over the local network using Avahi, if available.

Great start!

I have only a whitespace nit (a lot of the lines seem unnecessarily
wide) and this observatioN


> @@ -961,6 +965,11 @@ main(int argc, char *argv[])
>      __pmServerDumpRequestPorts(stderr);
>      fflush(stderr);
>  
> +    /* Advertise our presence on the network. */
> +    serverPresence = __pmServerAdvertisePresence(SERVER_SERVICE_NAME,
> +                                              SERVER_SERVICE_TAG,
> +                                              SERVER_PORT);
> +

Doing this in pmcd's main() is not ideal.  $SERVER_PORT can be easily
overridden by this time.  We'd want the actual port numbers used for
ipv4 (and separately, ipv6!) listening announced.


- FChE

<Prev in Thread] Current Thread [Next in Thread>