From 285054f4308819e7fcc1e69d2815efadabefca6a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 22 Aug 2017 10:34:13 +0000 Subject: Don't save errno around fd_close ; prepare for 2.2.0.1 --- COPYING | 2 +- INSTALL | 8 +++++++- NEWS | 6 ++++++ doc/index.html | 4 ++-- doc/upgrade.html | 6 ++++++ package/info | 2 +- src/libs6dns/s6dns_engine.c | 12 ------------ 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/COPYING b/COPYING index f496e31..cc344f1 100644 --- a/COPYING +++ b/COPYING @@ -1,4 +1,4 @@ -Copyright (c) 2011-2016 Laurent Bercot +Copyright (c) 2011-2017 Laurent Bercot Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/INSTALL b/INSTALL index 49d1a83..b008974 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.5.0.0 or later: http://skarnet.org/software/skalibs/ + - skalibs version 2.6.0.0 or later: http://skarnet.org/software/skalibs/ This software will run on any operating system that implements POSIX.1-2008, available at: @@ -22,6 +22,12 @@ POSIX.1-2008, available at: It will install the binaries in /bin and the static libraries in /usr/lib/s6-dns. + Please note that static libraries in /usr/lib/s6-dns *will not* +be found by a default linker invocation: you need -L/usr/lib/s6-dns. +Other skarnet.org software automatically handles that case if the +default configuration is used, but if you change the configuration, +remember to use the appropriate --with-lib configure option. + You can strip the binaries and libraries of their extra symbols via "make strip" before the "make install" phase. It will shave a few bytes off them. diff --git a/NEWS b/NEWS index a76db9a..8587bc8 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Changelog for s6-dns. +In 2.2.0.1 +---------- + + - Optimization release for skalibs-2.6.0.0. + + In 2.2.0.0 ---------- diff --git a/doc/index.html b/doc/index.html index 7793388..c83eac1 100644 --- a/doc/index.html +++ b/doc/index.html @@ -46,7 +46,7 @@ point in the future.
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.5.0.0 or later
  • +2.6.0.0 or later

    Licensing

    @@ -59,7 +59,7 @@ point in the future.

    Download

      -
    • The current released version of s6-dns is 2.2.0.0.
    • +
    • The current released version of s6-dns is 2.2.0.1.
    • Alternatively, you can checkout a copy of the s6-dns git repository: diff --git a/doc/upgrade.html b/doc/upgrade.html index 69d1116..f74654d 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,12 @@

      What has changed in s6-dns

      +

      in 2.2.0.1

      + +
        +
      • skalibs dependency bumped to 2.6.0.0.
      • +
      +

      in 2.2.0.0

        diff --git a/package/info b/package/info index d29516e..ce41d09 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-dns -version=2.2.0.0 +version=2.2.0.1 category=web package_macro_name=S6_DNS diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c index 06cb218..26cb5f3 100644 --- a/src/libs6dns/s6dns_engine.c +++ b/src/libs6dns/s6dns_engine.c @@ -104,17 +104,13 @@ static int thisudp (s6dns_engine_t *dt, tain_t const *stamp) if (dt->fd < 0) return -1 ; if (!randombind(dt->fd, s6dns_ip46list_is6(&dt->servers, dt->curserver))) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; return -1 ; } if ((socketconnect46(dt->fd, s6dns_ip46list_ip(&dt->servers, dt->curserver), 53, s6dns_ip46list_is6(&dt->servers, dt->curserver)) < 0) && (errno != EINPROGRESS)) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; return 0 ; } tain_add(&dt->localdeadline, stamp, &tain_infinite_relative) ; @@ -135,17 +131,13 @@ static int thistcp (s6dns_engine_t *dt, tain_t const *stamp) if (dt->fd < 0) return -1 ; if (!randombind(dt->fd, s6dns_ip46list_is6(&dt->servers, dt->curserver))) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; return -1 ; } if ((socketconnect46(dt->fd, s6dns_ip46list_ip(&dt->servers, dt->curserver), 53, s6dns_ip46list_is6(&dt->servers, dt->curserver)) < 0) && (errno != EINPROGRESS)) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; return 0 ; } tain_addsec(&dt->localdeadline, stamp, 10) ; @@ -255,9 +247,7 @@ static int s6dns_engine_read_udp (s6dns_engine_t *dt, tain_t const *stamp) } if (!stralloc_copyb(&dt->sa, buf, r)) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; return 0 ; } dt->querylen = 0 ; @@ -314,9 +304,7 @@ void s6dns_engine_recycle (s6dns_engine_t *dt) memset(&dt->servers, 0, sizeof(s6dns_ip46list_t)) ; if (dt->fd >= 0) { - int e = errno ; fd_close(dt->fd) ; dt->fd = -1 ; - errno = e ; } dt->status = ECONNABORTED ; dt->flagstrict = dt->flagtcp = dt->flagconnecting = dt->flagreading = dt->flagwriting = 0 ; -- cgit v1.3.1