As per Issue #155, since we do not require gethostname() during init, if it fails, there's no reason for init to fail as it is only used to populate the domain

pull/57/merge
Brad House 7 years ago
parent 039debbe66
commit 8af5760b2c
  1. 6
      ares_init.c

@ -1983,8 +1983,10 @@ static int init_by_defaults(ares_channel channel)
continue; continue;
} }
else if(res) { else if(res) {
rc = ARES_EBADNAME; /* Lets not treat a gethostname failure as critical, since we
goto error; * are ok if gethostname doesn't even exist */
*hostname = '\0';
break;
} }
} while (res != 0); } while (res != 0);

Loading…
Cancel
Save