X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fconf.c;h=eb13c426c60cfac9b66a07b0172906676dc4cac5;hp=c4fe101e0231f94e2f3a14a0fe14a20a3f585cb1;hb=6cf744e4b29cfe3b135b6553851816802ba3d8a8;hpb=b98d9787fdde54f33dcdb376e1e018cd418aff8d diff --git a/src/conf.c b/src/conf.c index c4fe101e..eb13c426 100644 --- a/src/conf.c +++ b/src/conf.c @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: conf.c,v 1.9.4.46 2001/10/27 15:19:13 guus Exp $ + $Id: conf.c,v 1.9.4.49 2001/11/16 12:17:03 zarq Exp $ */ #include "config.h" @@ -42,7 +42,6 @@ #include #include "conf.h" -#include "netutl.h" /* for strtoip */ #include "system.h" @@ -174,7 +173,7 @@ cp } syslog(LOG_ERR, _("\"yes\" or \"no\" expected for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); + cfg->variable, cfg->file, cfg->line); return 0; } @@ -189,7 +188,7 @@ cp return 1; syslog(LOG_ERR, _("Integer expected for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); + cfg->variable, cfg->file, cfg->line); return 0; } @@ -203,40 +202,6 @@ cp return 1; } -int get_config_ip(config_t *cfg, ip_mask_t **result) -{ - ip_mask_t *ip; -cp - if(!cfg) - return 0; - - ip = strtoip(cfg->value); - - if(ip) - { - *result = ip; - return 1; - } - - syslog(LOG_ERR, _("IP address expected for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); - return 0; -} - -int get_config_port(config_t *cfg, port_t *result) -{ -cp - if(!cfg) - return 0; - - if(sscanf(cfg->value, "%hu", result) == 1) - return 1; - - syslog(LOG_ERR, _("Port number expected for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); - return 0; -} - int get_config_subnet(config_t *cfg, subnet_t **result) { ip_mask_t *ip; @@ -250,7 +215,7 @@ cp if(!ip) { syslog(LOG_ERR, _("IP address expected for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); + cfg->variable, cfg->file, cfg->line); return 0; } @@ -259,7 +224,7 @@ cp if((ip->address & ip->mask) != ip->address) { syslog(LOG_ERR, _("Network address and subnet mask for configuration variable %s in %s line %d"), - cfg->value, cfg->file, cfg->line); + cfg->variable, cfg->file, cfg->line); free(ip); return 0; }