diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-06-17 05:54:46 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2019-06-17 05:54:46 +0000 |
commit | 68249b00fbaeff7098c1c936d1a10a9ba63f407a (patch) | |
tree | e966665410c890dce2438d24c0ca631f711b5eb2 /lib/libc/asr | |
parent | 36d3b5acdedf1e8f8edbd39f1e7571da28328165 (diff) |
Allow setting of retransmission intervasl via _res.retrans. Ugly API but
it's all we got. ok jca@
Diffstat (limited to 'lib/libc/asr')
-rw-r--r-- | lib/libc/asr/res_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/asr/res_init.c b/lib/libc/asr/res_init.c index c0a6af3aaec..04243c47bef 100644 --- a/lib/libc/asr/res_init.c +++ b/lib/libc/asr/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.10 2016/04/05 04:29:21 guenther Exp $ */ +/* $OpenBSD: res_init.c,v 1.11 2019/06/17 05:54:45 otto Exp $ */ /* * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> * @@ -52,6 +52,8 @@ res_init(void) if (!(_res.options & RES_INIT)) { if (_res.retry == 0) _res.retry = ac->ac_nsretries; + if (_res.retrans == 0) + _res.retrans = ac->ac_nstimeout; if (_res.options == 0) _res.options = ac->ac_options; if (_res.lookups[0] == '\0') @@ -88,6 +90,7 @@ res_init(void) */ if (!__isthreaded) { ac->ac_nsretries = _res.retry; + ac->ac_nstimeout = _res.retrans; ac->ac_options = _res.options; strlcpy(ac->ac_db, _res.lookups, sizeof(ac->ac_db)); ac->ac_dbcount = strlen(ac->ac_db); |