--- gvpe/src/conf.C 2005/03/03 07:24:57 1.30 +++ gvpe/src/conf.C 2005/03/18 01:53:05 1.35 @@ -1,8 +1,10 @@ /* conf.c -- configuration code - Copyright (C) 2003-2004 Marc Lehmann + Copyright (C) 2003-2005 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -13,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -37,8 +39,6 @@ #include #include -#include "gettext.h" - #include "conf.h" #include "slog.h" #include "util.h" @@ -122,7 +122,8 @@ default_node.max_retry = DEFAULT_MAX_RETRY; #if ENABLE_DNS - default_node.dns_port = 53; + default_node.dns_port = 0; // default is 0 == client + dns_forw_host = strdup ("127.0.0.1"); dns_forw_port = 53; #endif @@ -321,12 +322,18 @@ free (script_node_down), script_node_down = strdup (val); else if (!strcmp (var, "pid-file")) free (pidfilename), pidfilename = strdup (val); -#if ENABLE_DNS else if (!strcmp (var, "dns-forw-host")) - free (dns_forw_host), dns_forw_host = strdup (val); + { +#if ENABLE_DNS + free (dns_forw_host), dns_forw_host = strdup (val); +#endif + } else if (!strcmp (var, "dns-forw-port")) - dns_forw_port = atoi (val); + { +#if ENABLE_DNS + dns_forw_port = atoi (val); #endif + } else if (!strcmp (var, "http-proxy-host")) { #if ENABLE_HTTP_PROXY @@ -355,12 +362,18 @@ node->udp_port = atoi (val); else if (!strcmp (var, "tcp-port")) node->tcp_port = atoi (val); -#if ENABLE_DNS else if (!strcmp (var, "dns-hostname")) - free (node->dns_hostname), node->dns_hostname = strdup (val); + { +#if ENABLE_DNS + free (node->dns_hostname), node->dns_hostname = strdup (val); +#endif + } else if (!strcmp (var, "dns-port")) - node->dns_port = atoi (val); + { +#if ENABLE_DNS + node->dns_port = atoi (val); #endif + } else if (!strcmp (var, "dns-domain")) { #if ENABLE_DNS