* 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:
Axel Dörfler
2009-06-05 07:37:24 +00:00
parent a63261ea5a
commit d5f3f51106
+7 -7
View File
@@ -6,7 +6,7 @@
/* /*
* Copyright (c) 1985, 1988, 1993 * Copyright (c) 1985, 1988, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
@@ -22,7 +22,7 @@
* 4. Neither the name of the University nor the names of its contributors * 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 * may be used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * 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; struct hostent *hp;
char **hap; char **hap;
size_t n; size_t n;
if (init(this) == -1) if (init(this) == -1)
return (NULL); return (NULL);
@@ -261,7 +261,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af) {
const u_char *uaddr = addr; const u_char *uaddr = addr;
struct hostent *hp; struct hostent *hp;
int size; int size;
if (init(this) == -1) if (init(this) == -1)
return (NULL); return (NULL);
@@ -350,7 +350,7 @@ ho_next(struct irs_ho *this) {
pvt->host.h_addrtype = AF_INET; pvt->host.h_addrtype = AF_INET;
pvt->host.h_aliases = pvt->host_aliases; pvt->host.h_aliases = pvt->host_aliases;
pvt->host.h_name = pvt->hostbuf; 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++; pvt->index++;
RES_SET_H_ERRNO(pvt->res, NETDB_SUCCESS); RES_SET_H_ERRNO(pvt->res, NETDB_SUCCESS);
@@ -474,7 +474,7 @@ ho_minimize(struct irs_ho *this) {
} }
if (pvt->res) if (pvt->res)
res_nclose(pvt->res); res_nclose(pvt->res);
} }
static struct __res_state * static struct __res_state *
ho_res_get(struct irs_ho *this) { ho_res_get(struct irs_ho *this) {
@@ -589,7 +589,7 @@ ns_namelen(const char *s) {
static int static int
init(struct irs_ho *this) { init(struct irs_ho *this) {
struct pvt *pvt = (struct pvt *)this->private; struct pvt *pvt = (struct pvt *)this->private;
if (!pvt->res && !ho_res_get(this)) if (!pvt->res && !ho_res_get(this))
return (-1); return (-1);
if (((pvt->res->options & RES_INIT) == 0U) && if (((pvt->res->options & RES_INIT) == 0U) &&