diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-11 17:06:06 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-11 17:06:06 +0000 |
commit | 648eb8dfccf457fc2fbd01286718629b006524fa (patch) | |
tree | 23381570741b3188468d2321cbbd79f7011ec9fb | |
parent | 393a729f2f74eb1ca0ba710baacca80024213769 (diff) | |
download | s6-dns-2.0.0.4.tar.xz |
- Fix s6dns-resolve.h for C++ inclusionv2.0.0.4
- Fix leak in s6dns_resolve_core.c
- version: 2.0.0.4
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/upgrade.html | 6 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/include/s6-dns/s6dns-resolve.h | 2 | ||||
-rw-r--r-- | src/libs6dns/s6dns_resolve_core.c | 9 |
6 files changed, 18 insertions, 7 deletions
@@ -6,7 +6,7 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 4.0 or later - - skalibs version 2.3.3.0 or later: http://skarnet.org/software/skalibs/ + - skalibs version 2.3.5.1 or later: http://skarnet.org/software/skalibs/ This software will run on any operating system that implements POSIX.1-2008, available at: diff --git a/doc/index.html b/doc/index.html index 6bea39f..d69d141 100644 --- a/doc/index.html +++ b/doc/index.html @@ -46,7 +46,7 @@ point in the future. <li> A POSIX-compliant system with a standard C development environment </li> <li> GNU make, version 4.0 or later </li> <li> <a href="http://skarnet.org/software/skalibs/">skalibs</a> version -2.3.3.0 or later </li> +2.3.5.1 or later </li> </ul> <h3> Licensing </h3> @@ -59,7 +59,7 @@ point in the future. <h3> Download </h3> <ul> - <li> The current released version of s6-dns is <a href="s6-dns-2.0.0.3.tar.gz">2.0.0.3</a>. </li> + <li> The current released version of s6-dns is <a href="s6-dns-2.0.0.4.tar.gz">2.0.0.4</a>. </li> <li> Alternatively, you can checkout a copy of the s6-dns git repository: <pre> git clone git://git.skarnet.org/s6-dns </pre> </li> </ul> diff --git a/doc/upgrade.html b/doc/upgrade.html index 4c43b9a..61ce2b6 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,12 @@ <h1> What has changed in s6-dns </h1> +<h2> in 2.0.0.4 </h2> + +<ul> + <li> skalibs dependency bumped to 2.3.5.1. </li> +</ul> + <h2> in 2.0.0.3 </h2> <ul> diff --git a/package/info b/package/info index e6f4a4d..e64e368 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-dns -version=2.0.0.3 +version=2.0.0.4 category=web package_macro_name=S6_DNS diff --git a/src/include/s6-dns/s6dns-resolve.h b/src/include/s6-dns/s6dns-resolve.h index e7eb629..805ea2a 100644 --- a/src/include/s6-dns/s6dns-resolve.h +++ b/src/include/s6-dns/s6dns-resolve.h @@ -220,7 +220,7 @@ extern int s6dns_resolve_mpag_r (stralloc *, genalloc *, char const *, unsigned */ extern int s6dns_resolven_loop (s6dns_engine_t_ref, unsigned int, unsigned int, tain_t const *, tain_t *) ; -#define s6dns_resolven_loop_g(list, n, or, deadline) s6dns_resolven(list, n, or, (deadline), &STAMP) +#define s6dns_resolven_loop_g(list, n, zor, deadline) s6dns_resolven(list, n, zor, (deadline), &STAMP) typedef struct s6dns_resolve_s s6dns_resolve_t, *s6dns_resolve_t_ref ; struct s6dns_resolve_s diff --git a/src/libs6dns/s6dns_resolve_core.c b/src/libs6dns/s6dns_resolve_core.c index 0b75f07..a3c51c1 100644 --- a/src/libs6dns/s6dns_resolve_core.c +++ b/src/libs6dns/s6dns_resolve_core.c @@ -11,6 +11,11 @@ int s6dns_resolve_core_r (s6dns_domain_t const *d, uint16 qtype, s6dns_engine_t *dt, s6dns_ip46list_t const *servers, s6dns_debughook_t const *dbh, tain_t const *deadline, tain_t *stamp) { - return s6dns_engine_init_r(dt, servers, S6DNS_O_RECURSIVE, d->s, d->len, qtype, dbh, deadline, stamp) - && s6dns_resolve_loop_r(dt, deadline, stamp) ; + if (!s6dns_engine_init_r(dt, servers, S6DNS_O_RECURSIVE, d->s, d->len, qtype, dbh, deadline, stamp)) return 0 ; + if (!s6dns_resolve_loop_r(dt, deadline, stamp)) + { + s6dns_engine_recycle(dt) ; + return 0 ; + } + return 1 ; } |