* Fixed wrong localhost. This fixes bug #3990.
* Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30964 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/*
|
||||
* Copyright (c) 1985, 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
@@ -22,7 +22,7 @@
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@@ -226,7 +226,7 @@ ho_byname2(struct irs_ho *this, const char *name, int af) {
|
||||
struct hostent *hp;
|
||||
char **hap;
|
||||
size_t n;
|
||||
|
||||
|
||||
if (init(this) == -1)
|
||||
return (NULL);
|
||||
|
||||
@@ -261,7 +261,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) {
|
||||
const u_char *uaddr = addr;
|
||||
struct hostent *hp;
|
||||
int size;
|
||||
|
||||
|
||||
if (init(this) == -1)
|
||||
return (NULL);
|
||||
|
||||
@@ -350,7 +350,7 @@ ho_next(struct irs_ho *this) {
|
||||
pvt->host.h_addrtype = AF_INET;
|
||||
pvt->host.h_aliases = pvt->host_aliases;
|
||||
pvt->host.h_name = pvt->hostbuf;
|
||||
((struct in_addr *)pvt->host_addr)->s_addr = INADDR_LOOPBACK;
|
||||
((struct in_addr *)pvt->host_addr)->s_addr = htonl(INADDR_LOOPBACK);
|
||||
pvt->index++;
|
||||
|
||||
RES_SET_H_ERRNO(pvt->res, NETDB_SUCCESS);
|
||||
@@ -474,7 +474,7 @@ ho_minimize(struct irs_ho *this) {
|
||||
}
|
||||
if (pvt->res)
|
||||
res_nclose(pvt->res);
|
||||
}
|
||||
}
|
||||
|
||||
static struct __res_state *
|
||||
ho_res_get(struct irs_ho *this) {
|
||||
@@ -589,7 +589,7 @@ ns_namelen(const char *s) {
|
||||
static int
|
||||
init(struct irs_ho *this) {
|
||||
struct pvt *pvt = (struct pvt *)this->private;
|
||||
|
||||
|
||||
if (!pvt->res && !ho_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
|
||||
Reference in New Issue
Block a user