diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-25 18:12:15 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-25 18:12:15 +0000 |
commit | f3fad17adc058fa4b390883d549172f14b3ef6e0 (patch) | |
tree | 400b423fda25aca3d5b4a192092487717eafa30c /usr.sbin/hoststated/parse.y | |
parent | 6582d5889c3f67dc10b7321a3e8e5377ecb339eb (diff) |
partial rewrite of the check_* routines to use libevent everywhere
instead of nested select() calls and to handle the non-blocking
sockets properly.
From Pierre-Yves Ritschard (pyr at spootnik dot org)
(with a little help by me)
Diffstat (limited to 'usr.sbin/hoststated/parse.y')
-rw-r--r-- | usr.sbin/hoststated/parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/hoststated/parse.y b/usr.sbin/hoststated/parse.y index b6ce1f815bb..0c6008365b8 100644 --- a/usr.sbin/hoststated/parse.y +++ b/usr.sbin/hoststated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.4 2006/12/16 18:05:35 martin Exp $ */ +/* $OpenBSD: parse.y,v 1.5 2006/12/25 18:12:14 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -140,6 +140,7 @@ varset : STRING '=' STRING { ; main : INTERVAL number { conf->interval = $2; } + | TIMEOUT number { conf->timeout = $2; } ; service : SERVICE STRING { @@ -291,7 +292,7 @@ table : TABLE STRING { YYERROR; } tb->id = last_table_id++; - tb->timeout = CONNECT_TIMEOUT; + tb->timeout = conf->timeout; if (last_table_id == UINT_MAX) { yyerror("too many tables defined"); YYERROR; @@ -685,6 +686,7 @@ parse_config(struct hostated *x_conf, const char *filename, int opts) (void)strlcpy(conf->empty_table.name, "empty", sizeof(conf->empty_table.name)); + conf->timeout = CHECK_TIMEOUT; conf->interval = CHECK_INTERVAL; conf->opts = opts; |