From: Florian Forster Date: Wed, 5 Oct 2016 06:51:29 +0000 (+0200) Subject: memcached plugin: Clarify documentation and a comment. X-Git-Tag: collectd-5.7.0~58^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cf27e2041102bb17ed5a3c495a50f4207d29ca1c;p=collectd.git memcached plugin: Clarify documentation and a comment. --- diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index f867e61b..a84bd408 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -3361,17 +3361,18 @@ following options are allowed: Sets the B field of dispatched values. Defaults to the global hostname setting. -For backwards compatibility, values are also dispatched with the global hostname -when B is set to "127.0.0.1" or "localhost" and B
is not set. +For backwards compatibility, values are also dispatched with the global +hostname when B is set to B<127.0.0.1> or B and B
is +not set. =item B
I
-Hostname or IP to connect to. For backwards compatibility, it defaults to B -value or to B<127.0.0.1> if it does not set. +Hostname or IP to connect to. For backwards compatibility, defaults to the +value of B or B<127.0.0.1> if B is unset. =item B I -TCP-Port to connect to. Defaults to B<11211>. +TCP port to connect to. Defaults to B<11211>. =item B I diff --git a/src/memcached.c b/src/memcached.c index 46c8df40..765a0fd3 100644 --- a/src/memcached.c +++ b/src/memcached.c @@ -532,14 +532,15 @@ static int memcached_add_read_callback (memcached_t *st) (st->name != NULL) ? st->name : "__legacy__"); /* If no
used then: - * - connect to destination, specified by , if it presents. - * - Keep default hostname, if any: - * - Legacy mode is used (no configuration options at all); - * - "Host" option is not provided; + * - Connect to the destination specified by , if present. + * If not, use the default address. + * - Use the default hostname (set st->host to NULL), if + * - Legacy mode is used (no configuration options at all), or + * - "Host" option is not provided, or * - "Host" option is set to "localhost" or "127.0.0.1". * - * If
used then host may be set to "localhost" - * or "127.0.0.1" explicitly. + * If
used then host may be set to "localhost" or "127.0.0.1" + * explicitly. */ if (st->connhost == NULL) {