pcp
[Top] [All Lists]

Re: [pcp] pmlogger_check is fooled by localhost

To: kenj@xxxxxxxxxxxxxxxx
Subject: Re: [pcp] pmlogger_check is fooled by localhost
From: Max Matveev <makc@xxxxxxxxx>
Date: Sun, 11 Apr 2010 11:06:43 +1000
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1270847750.18793.8.camel@bozo-laptop>
References: <19387.53537.727368.123975@xxxxxxxxxxxx> <1270603621.15121.79.camel@xxxxxxxxxxxxxxxx> <19387.65322.68301.468516@xxxxxxxxxxxx> <1270642137.15121.125.camel@xxxxxxxxxxxxxxxx> <19389.24907.135424.300701@xxxxxxxxxxxx> <1270704927.8807.7.camel@xxxxxxxxxxxxxxxx> <19390.53020.92570.731051@xxxxxxxxxxxx> <1270847750.18793.8.camel@bozo-laptop>
On Sat, 10 Apr 2010 07:15:50 +1000, Ken McDonell wrote:

 kenj> Yep, pretty close to my patch (no man page from me either) ... I just
 kenj> went for the -H as a flag, rather than -H hostname (which is the same as
 kenj> -h hostname, unless hostname happens to be localhost).
I can live with H being a flag, but I really like to remove
gethostbyname from GetPort - it's just another place where pmlogger is
trying to second-guess user's input and yet another place when it can
go wrong.

 kenj> But more importantly your source and mine don't match without the
 kenj> patch ... I don't have archive_host[] in my source, it uses local[]
 kenj> there and there is no second test for pmcd_host being NULL, no strncmp()
 kenj> in an else branch ... ???
That's because patch was on top of the earlier change I've made which is
available from

http://oss.sgi.com/cgi-bin/gitweb.cgi?p=makc/pcp;a=shortlog;h=refs/heads/pmlogger

It includes using different names for __pmLogCreate() and for the
pmNewConext and not trying to resolve the name when creating a map
file.

And strncmp is a brain-fart - I'm surpised that the stuff works.

max

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