Hello community, here is the log from the commit of package librelp for openSUSE:Factory checked in at 2016-01-04 09:21:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/librelp (Old) and /work/SRC/openSUSE:Factory/.librelp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "librelp" Changes: -------- --- /work/SRC/openSUSE:Factory/librelp/librelp.changes 2015-09-09 20:21:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.librelp.new/librelp.changes 2016-01-04 09:22:24.000000000 +0100 @@ -1,0 +2,8 @@ +Sat Jan 2 15:17:45 UTC 2016 - [email protected] + +- librelp 1.2.9: + * Ignoring return status when handling syslog frames now. + Otherwise valid messages in the frame buffer will get lost when + the remote connection is closed during meantime. + +------------------------------------------------------------------- Old: ---- librelp-1.2.8.tar.gz New: ---- librelp-1.2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ librelp.spec ++++++ --- /var/tmp/diff_new_pack.Tlpf26/_old 2016-01-04 09:22:25.000000000 +0100 +++ /var/tmp/diff_new_pack.Tlpf26/_new 2016-01-04 09:22:25.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package librelp # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define library_name librelp0 Name: librelp -Version: 1.2.8 +Version: 1.2.9 Release: 0 Summary: A reliable logging library License: GPL-3.0+ ++++++ librelp-1.2.8.tar.gz -> librelp-1.2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/ChangeLog new/librelp-1.2.9/ChangeLog --- old/librelp-1.2.8/ChangeLog 2015-09-04 12:25:06.000000000 +0200 +++ new/librelp-1.2.9/ChangeLog 2015-12-15 15:35:38.000000000 +0100 @@ -1,4 +1,12 @@ ---------------------------------------------------------------------- +Version 1.2.9 - 2015-12-15 +- bugfix: Ignoring return status when handling syslog frames now. + Otherwise valid messages in the frame buffer will get lost when the + remote connection is closed during meantime. +- build bugfix: GnuTLS header was required even if TLS was turned off + Thanks to Pedro Alvarez Piedehierro for the patch. +- bugfix: correct wrong assert() calls [debug mode only affected] +---------------------------------------------------------------------- Version 1.2.8 - 2014-09-07 - bugfix: segfault if KEEPALIVE is used Thanks to Tomas Heinrich for the patch. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/configure new/librelp-1.2.9/configure --- old/librelp-1.2.8/configure 2015-09-04 12:25:38.000000000 +0200 +++ new/librelp-1.2.9/configure 2015-12-15 15:35:50.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for librelp 1.2.8. +# Generated by GNU Autoconf 2.69 for librelp 1.2.9. # # Report bugs to <[email protected]>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='librelp' PACKAGE_TARNAME='librelp' -PACKAGE_VERSION='1.2.8' -PACKAGE_STRING='librelp 1.2.8' +PACKAGE_VERSION='1.2.9' +PACKAGE_STRING='librelp 1.2.9' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1323,7 +1323,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures librelp 1.2.8 to adapt to many kinds of systems. +\`configure' configures librelp 1.2.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of librelp 1.2.8:";; + short | recursive ) echo "Configuration of librelp 1.2.9:";; esac cat <<\_ACEOF @@ -1508,7 +1508,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -librelp configure 1.2.8 +librelp configure 1.2.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2034,7 +2034,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by librelp $as_me 1.2.8, which was +It was created by librelp $as_me 1.2.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2897,7 +2897,7 @@ # Define the identity of the package. PACKAGE='librelp' - VERSION='1.2.8' + VERSION='1.2.9' cat >>confdefs.h <<_ACEOF @@ -3011,7 +3011,7 @@ # Define the identity of the package. PACKAGE='librelp' - VERSION='1.2.8' + VERSION='1.2.9' cat >>confdefs.h <<_ACEOF @@ -13342,7 +13342,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by librelp $as_me 1.2.8, which was +This file was extended by librelp $as_me 1.2.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13408,7 +13408,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -librelp config.status 1.2.8 +librelp config.status 1.2.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/configure.ac new/librelp-1.2.9/configure.ac --- old/librelp-1.2.8/configure.ac 2015-09-04 12:25:31.000000000 +0200 +++ new/librelp-1.2.9/configure.ac 2015-12-15 15:35:38.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([librelp], [1.2.8], [[email protected]]) +AC_INIT([librelp], [1.2.9], [[email protected]]) AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/src/relp.c new/librelp-1.2.9/src/relp.c --- old/librelp-1.2.8/src/relp.c 2015-04-27 09:23:57.000000000 +0200 +++ new/librelp-1.2.9/src/relp.c 2015-12-15 08:15:51.000000000 +0100 @@ -990,7 +990,12 @@ * at the top of the list! */ if(!strcmp((char*)pFrame->cmd, "syslog")) { - CHKRet(relpSCSyslog(pFrame, pSess)); + /* When processing Syslog frames, we ignore return code. + * Otherwise valid messages in the frame buffer will be + * discarded. And it's better to have duplicated messages + * instead of losing them. + */ + relpSCSyslog(pFrame, pSess); } else if(!strcmp((char*)pFrame->cmd, "rsp")) { CHKRet(relpSCRsp(pFrame, pSess)); } else if(!strcmp((char*)pFrame->cmd, "open")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/src/relpsess.c new/librelp-1.2.9/src/relpsess.c --- old/librelp-1.2.8/src/relpsess.c 2015-04-27 09:27:16.000000000 +0200 +++ new/librelp-1.2.9/src/relpsess.c 2015-12-15 08:20:14.000000000 +0100 @@ -299,7 +299,9 @@ ENTER_RELPFUNC; RELPOBJ_assert(pThis, Sess); - CHKRet(relpSendqSend(pThis->pSendq, pThis->pTcp)); + if (pThis->sessState != eRelpSessState_BROKEN) { + CHKRet(relpSendqSend(pThis->pSendq, pThis->pTcp)); + } finalize_it: LEAVE_RELPFUNC; @@ -536,8 +538,17 @@ "fd %d, timeout %d.%d\n", sock, (int) tvSelect.tv_sec, (int) tvSelect.tv_usec); nfds = select(sock+1, (fd_set *) &readfds, NULL, NULL, &tvSelect); - pThis->pEngine->dbgprint("relpSessWaitRsp select returns, " - "nfds %d, errno %d\n", nfds, errno); + if(nfds == -1) { + if(errno == EINTR) { + pThis->pEngine->dbgprint("relpSessWaitRsp select interrupted, continue\n"); + } else { + pThis->pEngine->dbgprint("relpSessWaitRsp select returned error %d\n", errno); + ABORT_FINALIZE(RELP_RET_SESSION_BROKEN); + } + } + else + pThis->pEngine->dbgprint("relpSessWaitRsp select returns, " + "nfds %d, errno %d\n", nfds, errno); if(relpEngineShouldStop(pThis->pEngine)) break; /* we don't check if we had a timeout-we give it one last chance*/ @@ -553,7 +564,9 @@ finalize_it: pThis->pEngine->dbgprint("relpSessWaitState returns %d\n", iRet); - if(iRet == RELP_RET_TIMED_OUT || relpEngineShouldStop(pThis->pEngine)) { + if( iRet == RELP_RET_TIMED_OUT || + iRet == RELP_RET_SESSION_BROKEN || + relpEngineShouldStop(pThis->pEngine)) { /* the session is broken! */ pThis->sessState = eRelpSessState_BROKEN; } @@ -994,7 +1007,7 @@ relpSessSetGnuTLSPriString(relpSess_t *pThis, char *pristr) { ENTER_RELPFUNC; - RELPOBJ_assert(pThis, Tcp); + RELPOBJ_assert(pThis, Sess); free(pThis->pristring); if(pristr == NULL) { @@ -1011,7 +1024,7 @@ relpSessSetCACert(relpSess_t *pThis, char *cert) { ENTER_RELPFUNC; - RELPOBJ_assert(pThis, Tcp); + RELPOBJ_assert(pThis, Sess); free(pThis->caCertFile); if(cert == NULL) { @@ -1028,7 +1041,7 @@ relpSessSetOwnCert(relpSess_t *pThis, char *cert) { ENTER_RELPFUNC; - RELPOBJ_assert(pThis, Tcp); + RELPOBJ_assert(pThis, Sess); free(pThis->ownCertFile); if(cert == NULL) { @@ -1045,7 +1058,7 @@ relpSessSetPrivKey(relpSess_t *pThis, char *cert) { ENTER_RELPFUNC; - RELPOBJ_assert(pThis, Tcp); + RELPOBJ_assert(pThis, Sess); free(pThis->privKeyFile); if(cert == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/src/tcp.c new/librelp-1.2.9/src/tcp.c --- old/librelp-1.2.8/src/tcp.c 2015-04-27 09:23:57.000000000 +0200 +++ new/librelp-1.2.9/src/tcp.c 2015-12-15 08:20:14.000000000 +0100 @@ -316,17 +316,16 @@ pEngine = pThis->pEngine; assert(pAddr != NULL); - error = getnameinfo(pAddr, SALEN(pAddr), (char*)szIP, sizeof(szIP), NULL, 0, NI_NUMERICHOST); - - if(error) { - pThis->pEngine->dbgprint("Malformed from address %s\n", gai_strerror(error)); + error = getnameinfo(pAddr, SALEN(pAddr), (char*)szIP, sizeof(szIP), NULL, 0, NI_NUMERICHOST); + if(error) { + pThis->pEngine->dbgprint("Malformed from address %s\n", gai_strerror(error)); strcpy((char*)szHname, "???"); strcpy((char*)szIP, "???"); ABORT_FINALIZE(RELP_RET_INVALID_HNAME); } if(pEngine->bEnableDns) { - error = getnameinfo(pAddr, SALEN(pAddr), (char*)szHname, NI_MAXHOST, NULL, 0, NI_NAMEREQD); + error = getnameinfo(pAddr, SALEN(pAddr), (char*)szHname, sizeof(szHname), NULL, 0, NI_NAMEREQD); if(error == 0) { memset (&hints, 0, sizeof (struct addrinfo)); hints.ai_flags = AI_NUMERICHOST; @@ -685,7 +684,7 @@ RELP_RET_WRN_NO_KEEPALIVE); } - pThis->pEngine->dbgprint("KEEPALIVE enabled for socket %d\n", sock); + // pThis->pEngine->dbgprint("KEEPALIVE enabled for socket %d\n", sock); done: return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.8/src/tcp.h new/librelp-1.2.9/src/tcp.h --- old/librelp-1.2.8/src/tcp.h 2015-04-27 09:23:57.000000000 +0200 +++ new/librelp-1.2.9/src/tcp.h 2015-12-15 08:17:51.000000000 +0100 @@ -34,7 +34,9 @@ #define RELPTCP_H_INCLUDED #include <stdint.h> -#include <gnutls/gnutls.h> +#ifdef ENABLE_TLS +# include <gnutls/gnutls.h> +#endif #include "relp.h" typedef enum { relpTCP_RETRY_none = 0, @@ -102,16 +104,22 @@ int dhBits; /**< number of bits for Diffie-Hellman key */ char *pristring; /**< priority string for GnuTLS */ relpAuthMode_t authmode; +#ifdef ENABLE_TLS gnutls_anon_client_credentials_t anoncred; /**< client anon credentials */ gnutls_anon_server_credentials_t anoncredSrv; /**< server anon credentials */ +#endif tcpPermittedPeers_t permittedPeers; /* GnuTLS certificat support */ +#ifdef ENABLE_TLS gnutls_certificate_credentials_t xcred; /**< certificate credentials */ +#endif char *caCertFile; char *ownCertFile; char *privKeyFile; +#ifdef ENABLE_TLS gnutls_session_t session; gnutls_dh_params_t dh_params; /**< server DH parameters for anon mode */ +#endif relpTcpRtryState_t rtryOp; } relpTcp_t;
