Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gensio for openSUSE:Factory checked 
in at 2021-02-08 11:47:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gensio (Old)
 and      /work/SRC/openSUSE:Factory/.gensio.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gensio"

Mon Feb  8 11:47:33 2021 rev:9 rq:870117 version:2.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/gensio/gensio.changes    2021-01-11 
17:18:15.640788403 +0100
+++ /work/SRC/openSUSE:Factory/.gensio.new.28504/gensio.changes 2021-02-08 
11:47:34.129723772 +0100
@@ -1,0 +2,6 @@
+Sat Feb  6 21:32:02 UTC 2021 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 2.2.4
+  * Minor bug fixes, including a long standing issue with UDP.
+
+-------------------------------------------------------------------

Old:
----
  gensio-2.2.2.tar.gz

New:
----
  gensio-2.2.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gensio.spec ++++++
--- /var/tmp/diff_new_pack.wAamo6/_old  2021-02-08 11:47:34.773724815 +0100
+++ /var/tmp/diff_new_pack.wAamo6/_new  2021-02-08 11:47:34.777724822 +0100
@@ -2,7 +2,7 @@
 # spec file for package gensio
 #
 # Copyright (c) 2021 SUSE LLC
-# Copyright (c) 2020, Martin Hauke <mar...@gmx.de>
+# Copyright (c) 2020-2021, Martin Hauke <mar...@gmx.de>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
 %bcond_with    openipmi
 %endif
 Name:           gensio
-Version:        2.2.2
+Version:        2.2.4
 Release:        0
 Summary:        Library to abstract stream and packet I/O
 # examples/* is licenced under Apache-2.0

++++++ gensio-2.2.2.tar.gz -> gensio-2.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/CMakeLists.txt 
new/gensio-2.2.4/CMakeLists.txt
--- old/gensio-2.2.2/CMakeLists.txt     2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/CMakeLists.txt     2021-02-06 01:32:10.000000000 +0100
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.10)
 
-project(gensio VERSION 2.2.2)
+project(gensio VERSION 2.2.4)
 set (gensio_VERSION_STRING 
"${gensio_VERSION_MAJOR}.${gensio_VERSION_MINOR}.${gensio_VERSION_PATCH}")
 
 include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/include"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/configure.ac 
new/gensio-2.2.4/configure.ac
--- old/gensio-2.2.2/configure.ac       2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/configure.ac       2021-02-06 01:32:10.000000000 +0100
@@ -1,7 +1,7 @@
-AC_INIT([gensio], [2.2.2], [miny...@acm.org])
+AC_INIT([gensio], [2.2.4], [miny...@acm.org])
 AC_SUBST(gensio_VERSION_MAJOR, 2)
 AC_SUBST(gensio_VERSION_MINOR, 2)
-AC_SUBST(gensio_VERSION_PATCH, 2)
+AC_SUBST(gensio_VERSION_PATCH, 4)
 AC_SUBST(gensio_VERSION_STRING, ${PACKAGE_VERSION})
 AM_INIT_AUTOMAKE([-Wall])
 AC_CONFIG_HEADERS([config.h])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/include/gensio/gensio_version.h.in 
new/gensio-2.2.4/include/gensio/gensio_version.h.in
--- old/gensio-2.2.2/include/gensio/gensio_version.h.in 2021-01-09 
23:24:15.000000000 +0100
+++ new/gensio-2.2.4/include/gensio/gensio_version.h.in 2021-02-06 
01:32:10.000000000 +0100
@@ -13,4 +13,24 @@
 #define gensio_version_patch @gensio_VERSION_PATCH@
 #define gensio_version_string "@gensio_VERSION_STRING@"
 
+/*
+ * A macro to compare a gensio version, for handling new features.
+ */
+#define gensio_version_ge(maj, min, patch) \
+    ((gensio_version_major > (maj)) ||                                 \
+     (gensio_version_major == (maj) && gensio_version_minor > (min)) ||        
\
+     (gensio_version_major == (maj) && gensio_version_minor == (min) &&        
\
+      gensio_version_patch >= (patch)))
+
+/*
+ * A macro to compare a gensio version, for handling features being
+ * removed.
+ */
+#define gensio_version_lt(maj, min, patch) \
+    ((gensio_version_major < (maj)) ||                                 \
+     (gensio_version_major == (maj) && gensio_version_minor < (min)) ||        
\
+     (gensio_version_major == (maj) && gensio_version_minor == (min) &&        
\
+      gensio_version_patch < (patch)))
+
+
 #endif /* GENSIO_VERSION_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/Makefile.am 
new/gensio-2.2.4/lib/Makefile.am
--- old/gensio-2.2.2/lib/Makefile.am    2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/Makefile.am    2021-02-06 01:32:10.000000000 +0100
@@ -5,7 +5,7 @@
        gensio_filter_ssl.h gensio_filter_telnet.h gensio_ll_ipmisol.h \
        gensio_filter_certauth.h gensio_filter_msgdelim.h \
        gensio_filter_relpkt.h gensio_filter_trace.h gensio_filter_perf.h \
-       errtrig.h avahi_watcher.h
+       errtrig.h avahi_watcher.h gensio_net.h
 
 libgensio_la_SOURCES = \
        gensio.c gensio_osops.c gensio_net.c gensio_udp.c gensio_stdio.c \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio.c 
new/gensio-2.2.4/lib/gensio.c
--- old/gensio-2.2.2/lib/gensio.c       2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio.c       2021-02-06 01:32:10.000000000 +0100
@@ -19,6 +19,7 @@
 #include <gensio/gensio_class.h>
 
 #include "utils.h"
+#include "gensio_net.h"
 
 static unsigned int gensio_log_mask =
     (1 << GENSIO_LOG_FATAL) | (1 << GENSIO_LOG_ERR);
@@ -1277,8 +1278,11 @@
 
        str += len;
        err = gensio_scan_args(o, &str, NULL, &args);
-       if (!err)
+       if (!err) {
+           while (isspace(*str))
+               str++;
            err = r->handler(str, args, o, cb, user_data, accepter);
+       }
        if (args)
            gensio_argv_free(o, args);
        return err;
@@ -1488,8 +1492,11 @@
 
        str += len;
        err = gensio_scan_args(o, &str, NULL, &args);
-       if (!err)
+       if (!err) {
+           while (isspace(*str))
+               str++;
            err = r->handler(str, args, o, cb, user_data, gensio);
+       }
        if (args)
            gensio_argv_free(o, args);
        return err;
@@ -1946,7 +1953,12 @@
     /* Defaults for TCP, UDP, and SCTP. */
     { "nodelay",       GENSIO_DEFAULT_BOOL,    .def.intval = 0 },
     { "laddr",         GENSIO_DEFAULT_STR,     .def.strval = NULL },
-    /* sctp */
+    /* TCP only */
+#ifdef HAVE_TCPD_H
+    { "tcpd",          GENSIO_DEFAULT_ENUM,    .enums = tcpd_enums,
+                                               .def.intval = GENSIO_TCPD_ON },
+#endif
+    /* SCTP only */
     { "instreams",     GENSIO_DEFAULT_INT,     .min = 1, .max = INT_MAX,
                                                .def.intval = 1 },
     { "ostreams",      GENSIO_DEFAULT_INT,     .min = 1, .max = INT_MAX,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_ll_ipmisol.c 
new/gensio-2.2.4/lib/gensio_ll_ipmisol.c
--- old/gensio-2.2.2/lib/gensio_ll_ipmisol.c    2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/lib/gensio_ll_ipmisol.c    2021-02-06 01:32:10.000000000 
+0100
@@ -1532,7 +1532,9 @@
     struct sol_op_done **op_done = icb_data;
     struct sol_ll *solll = (*op_done)->solll;
 
+    sol_lock(solll);
     sol_op_done(solll, err, op_done);
+    sol_deref_and_unlock(solll);
 }
 
 static int
@@ -1551,11 +1553,9 @@
     case IPMI_SOL_ERR_VAL(IPMI_SOL_UNCONFIRMABLE_OPERATION):
        op->started = true;
        op->use_runner = true;
-       sol_ref(solll);
        rv = 0; /* Operation done, but won't get a callback. */
-       if (op->use_runner)
-           /* Schedule the callback in the runner. */
-           sol_sched_deferred_op(solll);
+       /* Schedule the callback in the runner. */
+       sol_sched_deferred_op(solll);
        break;
 
     case EAGAIN:
@@ -1580,7 +1580,6 @@
     void *cb_data;
     int val;
 
-    sol_lock(solll);
  restart:
     if (err)
        err = sol_xlat_ipmi_err(solll->o, err);
@@ -1601,7 +1600,6 @@
        if (err)
            goto restart;
     }
-    sol_deref_and_unlock(solll);
 }
 
 static int
@@ -1827,7 +1825,7 @@
                             GENSIO_DEFAULT_INT, NULL, &ival);
     if (err)
        return err;
-    ival = solll->shared_serial_alert_behavior;
+    solll->shared_serial_alert_behavior = ival;
     err = gensio_get_default(o, "sol", "deassert-CTS-DCD-DSR-on-connect", 
false,
                             GENSIO_DEFAULT_BOOL, NULL, &ival);
     if (err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_mux.c 
new/gensio-2.2.4/lib/gensio_mux.c
--- old/gensio-2.2.2/lib/gensio_mux.c   2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio_mux.c   2021-02-06 01:32:10.000000000 +0100
@@ -1014,6 +1014,7 @@
      * finish the close.
      */
     if (!chan->wr_ready && !chan->in_write_ready &&
+               !chan->deferred_op_pending &&
                !chan->in_read_report &&
                chan->state == MUX_INST_IN_CLOSE_FINAL)
        mux_channel_finish_close(chan);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_net.c 
new/gensio-2.2.4/lib/gensio_net.c
--- old/gensio-2.2.2/lib/gensio_net.c   2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio_net.c   2021-02-06 01:32:10.000000000 +0100
@@ -32,6 +32,8 @@
 #include <gensio/gensio_osops.h>
 #include <gensio/gensio_builtins.h>
 
+#include "gensio_net.h"
+
 struct net_data {
     struct gensio_os_funcs *o;
 
@@ -331,6 +333,12 @@
        return err;
     }
 
+    err = gensio_get_default(o, type, "nodelay", false,
+                            GENSIO_DEFAULT_BOOL, NULL, &ival);
+    if (err)
+       return err;
+    nodelay = ival;
+
     for (i = 0; args && args[i]; i++) {
        if (gensio_check_keyds(args[i], "readbuf", &max_read_size) > 0)
            continue;
@@ -485,7 +493,10 @@
     char *group;
 #endif
 
+#ifdef HAVE_TCPD_H
+    enum gensio_tcpd_options tcpd;
     char *tcpd_progname;
+#endif
 
     unsigned int   nr_acceptfds;
     unsigned int   nr_accept_close_waiting;
@@ -574,14 +585,23 @@
        return;
     }
 
-    if (nadata->istcp) {
-       if (gensio_os_check_tcpd_ok(new_fd, nadata->tcpd_progname)) {
+#ifdef HAVE_TCPD_H
+    if (nadata->istcp && nadata->tcpd != GENSIO_TCPD_OFF) {
+       const char *msg = gensio_os_check_tcpd_ok(new_fd,
+                                                 nadata->tcpd_progname);
+
+       if (msg) {
+           if (nadata->tcpd == GENSIO_TCPD_PRINT) {
+               struct gensio_sg sg[1] = { { msg, strlen(msg) } };
+               gensio_os_send(nadata->o, new_fd, sg, 1, NULL, 0);
+           }
            gensio_acc_log(nadata->acc, GENSIO_LOG_INFO,
                           "Error accepting net gensio: tcpd check failed");
            err = GE_INVAL;
            goto out_err;
        }
     }
+#endif
 
     tdata = nadata->o->zalloc(nadata->o, sizeof(*tdata));
     if (!tdata) {
@@ -644,8 +664,11 @@
            if (new_fd != -1)
                gensio_os_close(nadata->o, &new_fd);
        }
-    } else if (raddr) {
-       gensio_addr_free(raddr);
+    } else {
+       if (raddr)
+           gensio_addr_free(raddr);
+       if (new_fd != -1)
+           gensio_os_close(nadata->o, &new_fd);
     }
 }
 
@@ -1031,6 +1054,15 @@
     }
 }
 
+#ifdef HAVE_TCPD_H
+struct gensio_enum_val tcpd_enums[] = {
+    { "on",    GENSIO_TCPD_ON },
+    { "print", GENSIO_TCPD_PRINT },
+    { "off",   GENSIO_TCPD_OFF },
+    { NULL }
+};
+#endif
+
 static int
 net_gensio_accepter_alloc(struct gensio_addr *iai,
                          const char * const args[],
@@ -1051,6 +1083,7 @@
 #endif
 #ifdef HAVE_TCPD_H
     const char *tcpdname = NULL;
+    enum gensio_tcpd_options tcpd = GENSIO_TCPD_ON;
 #endif
     unsigned int i;
     int err, ival;
@@ -1068,6 +1101,14 @@
     }
     reuseaddr = ival;
 
+#ifdef HAVE_TCPD_H
+    err = gensio_get_default(o, type, "tcpd", false,
+                            GENSIO_DEFAULT_INT, NULL, &ival);
+    if (err)
+       return err;
+    tcpd = ival;
+#endif
+
     for (i = 0; args && args[i]; i++) {
        if (gensio_check_keyds(args[i], "readbuf", &max_read_size) > 0)
            continue;
@@ -1082,6 +1123,11 @@
 #ifdef HAVE_TCPD_H
        if (istcp && gensio_check_keyvalue(args[i], "tcpdname", &tcpdname))
            continue;
+       if (istcp && gensio_check_keyenum(args[i], "tcpd",
+                                         tcpd_enums, &ival) > 0) {
+           tcpd = ival;
+           continue;
+       }
 #endif
 #if HAVE_UNIX
        if (!istcp && gensio_check_keymode(args[i], "umode", &umode) > 0) {
@@ -1135,6 +1181,7 @@
 #endif
 
 #ifdef HAVE_TCPD_H
+    nadata->tcpd = tcpd;
     if (tcpdname)
        nadata->tcpd_progname = strdup(tcpdname);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_net.h 
new/gensio-2.2.4/lib/gensio_net.h
--- old/gensio-2.2.2/lib/gensio_net.h   1970-01-01 01:00:00.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio_net.h   2021-02-06 01:32:10.000000000 +0100
@@ -0,0 +1,19 @@
+/*
+ *  gensio - A library for abstracting stream I/O
+ *  Copyright (C) 2018  Corey Minyard <miny...@acm.org>
+ *
+ *  SPDX-License-Identifier: LGPL-2.1-only
+ */
+
+#ifndef GENSIO_NET_H
+#define GENSIO_NET_H
+
+enum gensio_tcpd_options {
+    GENSIO_TCPD_ON,
+    GENSIO_TCPD_PRINT,
+    GENSIO_TCPD_OFF,
+};
+
+extern struct gensio_enum_val tcpd_enums[];
+
+#endif /* GENSIO_NET_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_osops.c 
new/gensio-2.2.4/lib/gensio_osops.c
--- old/gensio-2.2.2/lib/gensio_osops.c 2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio_osops.c 2021-02-06 01:32:10.000000000 +0100
@@ -1962,19 +1962,63 @@
        bool notype = false;
 
        if (strcmp(ip, "ipv4") == 0) {
+           if (family != AF_UNSPEC && family != AF_INET) {
+               rv = GE_INVAL;
+               goto out_err;
+           }
            family = AF_INET;
            ip = strtok_r(NULL, ",", &strtok_data);
        } else if (strcmp(ip, "ipv6") == 0) {
+#ifdef AF_INET6
+           if (family != AF_UNSPEC && family != AF_INET6) {
+               rv = GE_INVAL;
+               goto out_err;
+           }
            family = AF_INET6;
            ip = strtok_r(NULL, ",", &strtok_data);
+#else
+           rv = GE_NOTSUP;
+           goto out_err;
+#endif
        } else if (strcmp(ip, "ipv6n4") == 0) {
+#ifdef AF_INET6
+           if (family != AF_UNSPEC && family != AF_INET6) {
+               rv = GE_INVAL;
+               goto out_err;
+           }
            family = AF_INET6;
            rflags |= AI_V4MAPPED;
            ip = strtok_r(NULL, ",", &strtok_data);
+#else
+           rv = GE_NOTSUP;
+           goto out_err;
+#endif
        } else {
-           /* Default to V4 mapped. */
-           rflags |= AI_V4MAPPED;
-           notype = true;
+#ifdef AF_INET6
+           /*
+            * If IPV6 is present, we will try both IPV6 and IPV4
+            * addresses if an address is specified, or use
+            * AI_V4MAPPED if no ip is specified.
+            *
+            * This is a bit strange.  My reading of the getaddrinfo()
+            * man page says that if family == AF_UNSPEC, it's
+            * supposed to return IPV4 and IPV6 addresses.  It's not,
+            * even if AI_V4MAPPED is not set or AI_ALL is set, at
+            * least for localhost.
+            *
+            * It only matters if the user specifies an IP address (or
+            * host).  If the user does not specify an IP address, use
+            * AF_INET6 and AI_V4MAPPED and it works fine.  If the
+            * user specifies an IP address, pull the V6 addresses
+            * then the V4 addresses.  But only for listen sockets,
+            * connect sockets can only connect to one address (or one
+            * address type for SCTP).
+            */
+           if (family == AF_UNSPEC) {
+               notype = true;
+               family = AF_INET6;
+           }
+#endif
        }
 
        if (ip == NULL) {
@@ -1995,21 +2039,19 @@
            port = "0";
        }
 
-       /*
-        * If the user specified something like "tcp,0", ip will be
-        * NULL and getaddrinfo will return IPv4 and IPv6 addresses if
-        * the are available.  AF_V4MAPPED will be set, so we really
-        * only want IPv6 addresses (if any are available) as once you
-        * open the IPv6 address you can't open the IPv4 address.
-        *
-        * To fix this, in this special case we try IPv6 addresses
-        * first, as they will be mapped and work for IPv4 addresses.
-        * If we get no network addresses in IPv4, then try IPv4.
+#ifdef AF_INET6
+       /*
+        * If the user specified something like "tcp,0", ip will be
+        * NULL and getaddrinfo will return IPv4 and IPv6 addresses if
+        * they are available.  AF_V4MAPPED will be set, so we really
+        * only want IPv6 addresses (if any are available) as once you
+        * open the IPv6 address you can't open the IPv4 address.
         */
        if (!ip && notype)
-           family = AF_INET6;
+           rflags |= AI_V4MAPPED;
 
     redo_getaddrinfo:
+#endif
        memset(&hints, 0, sizeof(hints));
        hints.ai_flags = bflags | rflags;
        hints.ai_family = family;
@@ -2017,10 +2059,13 @@
        hints.ai_protocol = protocol;
        rv = getaddrinfo(ip, port, &hints, &ai);
        if (rv) {
+#ifdef AF_INET6
            if (notype && family == AF_INET6) {
+               /* No IPV6, try just IPV4. */
                family = AF_INET;
                goto redo_getaddrinfo;
            }
+#endif
            rv = GE_INVAL;
            goto out_err;
        }
@@ -2064,6 +2109,14 @@
            if (rv)
                goto out_err;
        }
+#ifdef AF_INET6
+       if (listen && ip && notype && ifamily == AF_UNSPEC &&
+               family == AF_INET6) {
+           /* See comments above on why this is done.  Yes, it's strange. */
+           family = AF_INET;
+           goto redo_getaddrinfo;
+       }
+#endif
 
        ip = strtok_r(NULL, ",", &strtok_data);
        first = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/gensio_udp.c 
new/gensio-2.2.4/lib/gensio_udp.c
--- old/gensio-2.2.2/lib/gensio_udp.c   2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/gensio_udp.c   2021-02-06 01:32:10.000000000 +0100
@@ -700,6 +700,15 @@
     struct udpna_data *nadata = ndata->nadata;
 
     if (nadata->pending_data_owner == ndata) {
+       if (ndata->deferred_read) {
+           /*
+            * If there is a read pending on a deferred op, it won't
+            * get called now that this is closed.  So cancel it so
+            * the close will finish
+            */
+           ndata->deferred_read = false;
+           ndata->in_read = false;
+       }
        nadata->pending_data_owner = NULL;
        nadata->data_pending_len = 0;
     }
@@ -812,7 +821,7 @@
        /* Call the read from the selector to avoid lock nesting issues. */
        udpna_start_deferred_op(nadata);
     } else {
-       udpna_check_read_state(ndata->nadata);
+       udpna_check_read_state(nadata);
     }
  out_unlock:
     udpna_unlock(nadata);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/selector.c 
new/gensio-2.2.4/lib/selector.c
--- old/gensio-2.2.2/lib/selector.c     2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/lib/selector.c     2021-02-06 01:32:10.000000000 +0100
@@ -1265,7 +1265,7 @@
                        struct timeval  *timeout,
                        sigset_t        *sigmask)
 {
-    int             err, old_errno;
+    int             err = 0, old_errno;
     struct timeval  loc_timeout, wake_time;
     sel_wait_list_t wait_entry;
     unsigned int    count;
@@ -1280,37 +1280,49 @@
     sel_timer_lock(sel);
     count = process_runners(sel);
     process_timers(sel, &count, &loc_timeout, &wake_time);
-    if (timeout) {
-       if (cmp_timeval(&loc_timeout, timeout) >= 0) {
-           loc_timeout = *timeout;
-           user_timeout = 1;
+
+    if (count == 0) {
+       /* Didn't do anything, wait for something. */
+       if (timeout) {
+           if (cmp_timeval(&loc_timeout, timeout) >= 0) {
+               loc_timeout = *timeout;
+               user_timeout = 1;
+           }
        }
-    }
-    add_sel_wait_list(sel, &wait_entry, send_sig, cb_data, thread_id,
-                     &wake_time);
-    sel_timer_unlock(sel);
+
+       add_sel_wait_list(sel, &wait_entry, send_sig, cb_data, thread_id,
+                         &wake_time);
+       sel_timer_unlock(sel);
 
 #ifdef HAVE_EPOLL_PWAIT
-    if (sel->epollfd >= 0)
-       err = process_fds_epoll(sel, &loc_timeout, sigmask);
-    else
+       if (sel->epollfd >= 0)
+           err = process_fds_epoll(sel, &loc_timeout, sigmask);
+       else
 #endif
-       err = process_fds(sel, &loc_timeout, sigmask);
+           err = process_fds(sel, &loc_timeout, sigmask);
+
+       old_errno = errno;
+       if (!user_timeout && !err) {
+           /*
+            * Only return a timeout if we waited on the user's timeout
+            * Otherwise there is a timer to process.
+            */
+           count++;
+       }
+
+       sel_timer_lock(sel);
+       remove_sel_wait_list(sel, &wait_entry);
 
-    old_errno = errno;
-    if (!user_timeout && !err) {
        /*
-        * Only return a timeout if we waited on the user's timeout
-        * Otherwise there is a timer to process.
+        * Process runners before and after the wait.  This way any
+        * runners added while waiting will get processed.  Otherwise
+        * we would have to wake up other threads so the runners get
+        * handled immediately.  Do not add to the count, though, if
+        * we timed out we want to alert the user of that.
         */
-       count++;
-       err = 0;
+       process_runners(sel);
     }
-
-    sel_timer_lock(sel);
-    remove_sel_wait_list(sel, &wait_entry);
     sel_timer_unlock(sel);
-
     if (timeout) {
        sel_get_monotonic_time(&now);
        diff_timeval(timeout, &end, &now);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/lib/sergensio_serialdev.c 
new/gensio-2.2.4/lib/sergensio_serialdev.c
--- old/gensio-2.2.2/lib/sergensio_serialdev.c  2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/lib/sergensio_serialdev.c  2021-02-06 01:32:10.000000000 
+0100
@@ -1547,7 +1547,8 @@
     const char *rest = "";
 
     val = speedstr_to_speed(str, &rest);
-    if (val == -1)
+    if (val < 10)
+       /* Some parameters start a digit, ignore them. */
        return GE_INVAL;
     if (set_termios_from_speed(termio, val, rest, custspeed) == -1)
        return GE_INVAL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/man/gensio.5 
new/gensio-2.2.4/man/gensio.5
--- old/gensio-2.2.2/man/gensio.5       2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/man/gensio.5       2021-02-06 01:32:10.000000000 +0100
@@ -319,11 +319,19 @@
 Set SO_REUSEADDR on the socket, good for accepting gensios only.
 Defaults to true.
 .TP
+.B tcpd=on|print|off
+Accepter only, sets tcpd handling on the socket.  If "on", tcpd is
+enforced and the connection is just closed on a tcpd denial.  "print"
+is like on, except it writes "Access Denied" on the socket before
+closing it.  "off" disabled tcpd handling on the socket.  Defaults to
+on.  Not available if tcpd is disabled at compile time.
+.TP
 .B tcpdname=<name>
 Accepter only, sets the name to use for tcpd access control.  This
 defaults to "gensio", and the default can be overriden with
 gensio_set_progname().  This option allows you to override it on a
-per-gensio accepter basis.
+per-gensio accepter basis.  Not available if tcpd is disabled at
+compile time.
 .SS Remote Address String
 The remote address will be in the format "[ipv4|ipv6],<addr>,<port>" where the
 address is in numeric format, IPv4, or IPv6.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/swig/gensio.i 
new/gensio-2.2.4/swig/gensio.i
--- old/gensio-2.2.2/swig/gensio.i      2021-01-09 23:24:15.000000000 +0100
+++ new/gensio-2.2.4/swig/gensio.i      2021-02-06 01:32:10.000000000 +0100
@@ -297,6 +297,8 @@
 %constant int GENSIO_NETTYPE_IPV6 = GENSIO_NETTYPE_IPV6;
 %constant int GENSIO_NETTYPE_UNIX = GENSIO_NETTYPE_UNIX;
 
+%constant char *version = gensio_version_string;
+
 %extend gensio {
     gensio(struct gensio_os_funcs *o, char *str, swig_cb *handler) {
        int rv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/tests/ipmisimdaemon.py 
new/gensio-2.2.4/tests/ipmisimdaemon.py
--- old/gensio-2.2.2/tests/ipmisimdaemon.py     2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/tests/ipmisimdaemon.py     2021-02-06 01:32:10.000000000 
+0100
@@ -49,7 +49,7 @@
 \n
   endlan\n
 \n
-  sol "%s" 115200\n
+  sol "%s" 115200 nortscts\n
 \n
   # Start startcmd at startup?  Default is false.\n
   startnow false\n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/tests/test_ipmisol.py 
new/gensio-2.2.4/tests/test_ipmisol.py
--- old/gensio-2.2.2/tests/test_ipmisol.py      2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/tests/test_ipmisol.py      2021-02-06 01:32:10.000000000 
+0100
@@ -17,8 +17,8 @@
     sys.exit(77)
 
 s2n_termios_base = dup_termios(base_termios,
-                               cflags = termios.CLOCAL | termios.CRTSCTS,
-                               cflags_mask = termios.CLOCAL | termios.CRTSCTS)
+                               cflags = termios.CLOCAL,
+                               cflags_mask = termios.CLOCAL)
 s2n_termios_base[6][termios.VSTART] = '\0'
 s2n_termios_base[6][termios.VSTOP] = '\0'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/tools/gtlssh-keygen.1 
new/gensio-2.2.4/tools/gtlssh-keygen.1
--- old/gensio-2.2.2/tools/gtlssh-keygen.1      2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/tools/gtlssh-keygen.1      2021-02-06 01:32:10.000000000 
+0100
@@ -15,8 +15,12 @@
 and it would create keys for you.  You should do the same thing on any
 target system you want to log into with gtlssh.  Then copy the
 default.crt file in your $HOME/.gtlssh directory to the target's
-$HOME/.gtlssh/allowed_certs directory.  After that you should be able
-to log in without a password.
+$HOME/.gtlssh/allowed_certs directory.  Then run
+
+  gtlssh rehash
+
+on the target system to generate the hashes   After that you should be
+able to log in without a password.
 
 When you need to regenerate your keys, you run
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gensio-2.2.2/tools/gtlssh-keygen.in 
new/gensio-2.2.4/tools/gtlssh-keygen.in
--- old/gensio-2.2.2/tools/gtlssh-keygen.in     2021-01-09 23:24:15.000000000 
+0100
+++ new/gensio-2.2.4/tools/gtlssh-keygen.in     2021-02-06 01:32:10.000000000 
+0100
@@ -33,7 +33,7 @@
     echo "        $DEFAULT_GTLSSHDIR. Default keys also go here."
     echo "  --keydir <dir> - Location to put the non-default generated keys."
     echo "        Default is $DEFAULT_KEYDIR for normal certificates and"
-    echo "        $CONFDIF for server certificates."
+    echo "        $CONFDIR for server certificates."
     echo "  --commonname <name> - Set the common name in the certificate."
     echo "        The default is your username for normal certificates and"
     echo "        the fully qualified domain name for server certificates."
@@ -154,6 +154,11 @@
 }
 
 hash_dir() {
+    if ! ls "$1"/*.crt >/dev/null 2>&1; then
+       echo "No certificates in $1, not rehashing"
+       return
+    fi
+
     pushd "$1" >/dev/null
     for i in `ls | grep '[0-9a-f]\{8\}\.r\?[0-9]\+'`; do
        rm "$i"

Reply via email to