author | Florian Forster <octo@collectd.org> | |
Thu, 4 Aug 2016 09:30:18 +0000 (11:30 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 4 Aug 2016 09:56:03 +0000 (11:56 +0200) | ||
commit | f35f67df9ccfb80c001ed0befcce8bb90ebb2a07 | |
tree | 4498402eebdbd6dd2b33d1bfcb4d2883ab0a94c8 | tree | snapshot |
parent | cd2238b8b4f4ecd80c45862b5aeed3d3d73eddfe | commit | diff |
memcached plugin: Use hostname_g when reading localhost.
Previously, the code would use the value of the "Host" option or
"127.0.0.1" if that option was unset (plus special cases for UNIX
sockets and a legacy mode). Obviously, "127.0.0.1" is a bad default.
This patch emulates the behavior of the MySQL plugin: if the "Host"
option is unset or set to either "localhost" or "127.0.0.1", the global
hostname_g variable is used.
Fixes: #801
Supersedes: #894
Previously, the code would use the value of the "Host" option or
"127.0.0.1" if that option was unset (plus special cases for UNIX
sockets and a legacy mode). Obviously, "127.0.0.1" is a bad default.
This patch emulates the behavior of the MySQL plugin: if the "Host"
option is unset or set to either "localhost" or "127.0.0.1", the global
hostname_g variable is used.
Fixes: #801
Supersedes: #894
src/memcached.c | diff | blob | history |