1
1

* Fix bug #1000 - I had the test wrong for strcmp. We want to use the

local hostname when we *FIND* "localhost" or "127.0.0.1", not when
  we don't find it.  Duh.

This commit was SVN r2925.
Этот коммит содержится в:
Brian Barrett 2004-10-04 20:00:36 +00:00
родитель 4734734520
Коммит b01bfc26a4

Просмотреть файл

@ -98,8 +98,8 @@ parse_line(int first, mca_llm_base_hostfile_node_t *node)
if (MCA_LLM_BASE_STRING == first) {
/* don't allow localhost or 127.0.0.1 */
if ((strncmp("localhost", mca_llm_base_string, strlen("localhost")) != 0) ||
(strcmp("127.0.0.1", mca_llm_base_string) != 0)) {
if ((strncmp("localhost", mca_llm_base_string, strlen("localhost")) == 0) ||
(strcmp("127.0.0.1", mca_llm_base_string) == 0)) {
gethostname(node->hostname, MAXHOSTNAMELEN);
} else {
strncpy(node->hostname, mca_llm_base_string, MAXHOSTNAMELEN);