[Haiku-commits] r30964 - haiku/trunk/src/kits/network/dns/irs
axeld at BerliOS
axeld at mail.berlios.de
Fri Jun 5 09:37:25 CEST 2009
Author: axeld
Date: 2009-06-05 09:37:24 +0200 (Fri, 05 Jun 2009)
New Revision: 30964
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=30964&view=rev
Modified:
haiku/trunk/src/kits/network/dns/irs/lcl_ho.c
Log:
* Fixed wrong localhost. This fixes bug #3990.
* Automatic whitespace cleanup.
Modified: haiku/trunk/src/kits/network/dns/irs/lcl_ho.c
===================================================================
--- haiku/trunk/src/kits/network/dns/irs/lcl_ho.c 2009-06-05 03:50:21 UTC (rev 30963)
+++ haiku/trunk/src/kits/network/dns/irs/lcl_ho.c 2009-06-05 07:37:24 UTC (rev 30964)
@@ -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 @@
struct hostent *hp;
char **hap;
size_t n;
-
+
if (init(this) == -1)
return (NULL);
@@ -261,7 +261,7 @@
const u_char *uaddr = addr;
struct hostent *hp;
int size;
-
+
if (init(this) == -1)
return (NULL);
@@ -350,7 +350,7 @@
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 @@
}
if (pvt->res)
res_nclose(pvt->res);
-}
+}
static struct __res_state *
ho_res_get(struct irs_ho *this) {
@@ -589,7 +589,7 @@
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) &&
More information about the Haiku-commits
mailing list