pcp
[Top] [All Lists]

PCP Updates: Consolidate Code for Obtaining Port Numbers From the Enviro

To: PCP Mailing List <pcp@xxxxxxxxxxx>
Subject: PCP Updates: Consolidate Code for Obtaining Port Numbers From the Environment and From Strings
From: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed, 28 May 2014 14:44:57 -0400
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
There was a lot of duplicated code dedicated to this. I've consolidated it into the new internal APIs described below.

Pushed to the brolley/dev branch of pcpfans.

--------------------------------------------------------------------------------------------------------------

commit 57736b9013bee5e2bbe3e9e7d68dfc1327589e60
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Mon May 26 10:15:13 2014 -0400

    Use the new *AddPorts() APIs throughout as appropriate.

commit 746504515ced5fc1557f946c71287bac4cce9ef6
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date:   Fri May 23 14:11:30 2014 -0400

    New internal API functions for collecting server port numbers.

- extern int __pmServiceAddPorts(const char *, int **, int) _PCP_HIDDEN;
      determines port numbers for the named service.

    - extern int __pmPMCDAddPorts(int **, int) _PCP_HIDDEN;
      determines port numbers for pmcd using the PMCD_PORT
      environment variable.

    - extern int __pmProxyAddPorts(int **, int) _PCP_HIDDEN;
      determines port numbers for pmproxy using the PMPROXY_PORT
      environment variable.

    - extern int __pmWebdAddPorts(int **, int) _PCP_HIDDEN;
      determines port numbers for pmwebd using the new PMWEBD_PORT
      environment variable.

    - extern int __pmAddPorts(const char *, int **, int) _PCP_HIDDEN;
      parses the given string of comma-separated port numbers.

    pmfind now uses these APIs to obtain the default port numbers for
    its supported services (all of the above). With this change,
    pmfind now supports multiple port numbers for a service when
    using the "probe" mechanism.

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