Hello community,
here is the log from the commit of package librelp for openSUSE:Factory checked in at 2014-01-15 16:25:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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 2013-07-16 16:42:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.librelp.new/librelp.changes 2014-01-15 16:25:22.000000000 +0100
@@ -1,0 +2,9 @@
+Tue Jan 14 20:53:10 UTC 2014 - andreas.stieger@gmx.de
+
+- update to 1.2.2:
+ - add capability to enable tcp KEEPALIVE
+ - introduced new API relpSrvSetKeepAlive() to support KEEPALIVE
+ - errors binding listener port are now reported via error message
+ callback
+
+-------------------------------------------------------------------
Old:
----
librelp-1.2.0.tar.gz
New:
----
librelp-1.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ librelp.spec ++++++
--- /var/tmp/diff_new_pack.wPKPGG/_old 2014-01-15 16:25:23.000000000 +0100
+++ /var/tmp/diff_new_pack.wPKPGG/_new 2014-01-15 16:25:23.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package librelp
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products 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 @@
Name: librelp
%define library_name librelp0
-Version: 1.2.0
+Version: 1.2.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.librelp.com/
++++++ librelp-1.2.0.tar.gz -> librelp-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/ChangeLog new/librelp-1.2.2/ChangeLog
--- old/librelp-1.2.0/ChangeLog 2013-07-14 16:53:38.000000000 +0200
+++ new/librelp-1.2.2/ChangeLog 2014-01-07 13:07:36.000000000 +0100
@@ -1,4 +1,12 @@
----------------------------------------------------------------------
+Version 1.2.2 - 2014-01-07
+- add capability to enable tcp KEEPALIVE
+- introduced new API relpSrvSetKeepAlive() to support KEEPALIVE
+----------------------------------------------------------------------
+Version 1.2.1 - 2013-09-26
+- errors binding listener port are now reported via error message
+ callback
+----------------------------------------------------------------------
Version 1.2.0 - 2013-07-15
- support for epoll() added
platforms that do not support it fall back to select()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/configure new/librelp-1.2.2/configure
--- old/librelp-1.2.0/configure 2013-07-08 18:25:51.000000000 +0200
+++ new/librelp-1.2.2/configure 2013-12-10 15:36:55.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for librelp 1.2.0.
+# Generated by GNU Autoconf 2.68 for librelp 1.2.2.
#
# Report bugs to .
#
@@ -570,8 +570,8 @@
# Identity of this package.
PACKAGE_NAME='librelp'
PACKAGE_TARNAME='librelp'
-PACKAGE_VERSION='1.2.0'
-PACKAGE_STRING='librelp 1.2.0'
+PACKAGE_VERSION='1.2.2'
+PACKAGE_STRING='librelp 1.2.2'
PACKAGE_BUGREPORT='rgerhards@adiscon.com'
PACKAGE_URL=''
@@ -1304,7 +1304,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.0 to adapt to many kinds of systems.
+\`configure' configures librelp 1.2.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1374,7 +1374,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of librelp 1.2.0:";;
+ short | recursive ) echo "Configuration of librelp 1.2.2:";;
esac
cat <<\_ACEOF
@@ -1486,7 +1486,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-librelp configure 1.2.0
+librelp configure 1.2.2
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2012,7 +2012,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.0, which was
+It was created by librelp $as_me 1.2.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2827,7 +2827,7 @@
# Define the identity of the package.
PACKAGE='librelp'
- VERSION='1.2.0'
+ VERSION='1.2.2'
cat >>confdefs.h <<_ACEOF
@@ -2889,7 +2889,7 @@
# Define the identity of the package.
PACKAGE='librelp'
- VERSION='1.2.0'
+ VERSION='1.2.2'
cat >>confdefs.h <<_ACEOF
@@ -13171,7 +13171,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.0, which was
+This file was extended by librelp $as_me 1.2.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13237,7 +13237,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.0
+librelp config.status 1.2.2
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/configure.ac new/librelp-1.2.2/configure.ac
--- old/librelp-1.2.0/configure.ac 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/configure.ac 2013-12-10 15:36:48.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.0], [rgerhards@adiscon.com])
+AC_INIT([librelp], [1.2.2], [rgerhards@adiscon.com])
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.0/src/librelp.h new/librelp-1.2.2/src/librelp.h
--- old/librelp-1.2.0/src/librelp.h 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/src/librelp.h 2013-12-10 15:23:52.000000000 +0100
@@ -151,6 +151,7 @@
#define RELP_RET_ERR_INVAL RELPERR_BASE + 41 /**< some parameter is invalid (like EINVAL) */
#define RELP_RET_ERR_EPOLL_CTL RELPERR_BASE + 42 /**< epoll_ctl() failed */
#define RELP_RET_ERR_INTERNAL RELPERR_BASE + 43 /**< internal error in librelp (bug) */
+#define RELP_RET_WRN_NO_KEEPALIVE RELPERR_BASE + 44/**< KEEPALIVE cannot be enabled */
/* some macros to work with librelp error codes */
#define CHKRet(code) if((iRet = code) != RELP_RET_OK) goto finalize_it
@@ -191,6 +192,7 @@
void relpSrvEnableTLS(relpSrv_t *pThis);
void relpSrvEnableTLSZip(relpSrv_t *pThis);
void relpSrvSetDHBits(relpSrv_t *pThis, int bits);
+void relpSrvSetKeepAlive(relpSrv_t *pThis, const int bEnabled, const int iKeepAliveIntvl, const int iKeepAliveProbes, const int iKeepAliveTime);
relpRetVal relpSrvSetGnuTLSPriString(relpSrv_t *pThis, char *pristr);
relpRetVal relpSrvSetCACert(relpSrv_t *pThis, char *cert);
relpRetVal relpSrvSetOwnCert(relpSrv_t *pThis, char *cert);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/src/relpsess.c new/librelp-1.2.2/src/relpsess.c
--- old/librelp-1.2.0/src/relpsess.c 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/src/relpsess.c 2013-09-13 12:56:24.000000000 +0200
@@ -223,8 +223,6 @@
lenBuf = RELP_RCV_BUF_SIZE;
CHKRet(relpTcpRcv(pThis->pTcp, rcvBuf, &lenBuf));
- rcvBuf[lenBuf] = '\0';
- pThis->pEngine->dbgprint("relp session read %d octets, buf '%s'\n", (int) lenBuf, rcvBuf);
if(lenBuf == 0) {
pThis->pEngine->dbgprint("server closed relp session %p, session broken\n", pThis);
/* even though we had a "normal" close, it is unexpected at this
@@ -240,6 +238,10 @@
ABORT_FINALIZE(RELP_RET_SESSION_BROKEN);
}
} else {
+ /* Terminate buffer and output received data to debug*/
+ rcvBuf[lenBuf] = '\0';
+ pThis->pEngine->dbgprint("relp session read %d octets, buf '%s'\n", (int) lenBuf, rcvBuf);
+
/* we have regular data, which we now can process */
for(i = 0 ; i < lenBuf ; ++i) {
CHKRet(relpFrameProcessOctetRcvd(&pThis->pCurrRcvFrame, rcvBuf[i], pThis));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/src/relpsrv.c new/librelp-1.2.2/src/relpsrv.c
--- old/librelp-1.2.0/src/relpsrv.c 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/src/relpsrv.c 2013-12-10 15:32:45.000000000 +0100
@@ -295,6 +295,18 @@
pThis->bEnableTLSZip = 1;
}
+void
+relpSrvSetKeepAlive(relpSrv_t *pThis,
+ const int bEnabled,
+ const int iKeepAliveIntvl,
+ const int iKeepAliveProbes,
+ const int iKeepAliveTime)
+{
+ pThis->bKeepAlive = bEnabled;
+ pThis->iKeepAliveIntvl = iKeepAliveIntvl;
+ pThis->iKeepAliveProbes = iKeepAliveProbes;
+ pThis->iKeepAliveTime = iKeepAliveTime;
+}
/* start a relp server - the server object must have all properties set
* rgerhards, 2008-03-17
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/src/relpsrv.h new/librelp-1.2.2/src/relpsrv.h
--- old/librelp-1.2.0/src/relpsrv.h 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/src/relpsrv.h 2013-12-10 12:10:23.000000000 +0100
@@ -1,6 +1,6 @@
/* The RELPSRV object.
*
- * Copyright 2008 by Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2008-2013 by Rainer Gerhards and Adiscon GmbH.
*
* This file is part of librelp.
*
@@ -47,7 +47,11 @@
relpTcp_t *pTcp; /**< our tcp support object */
size_t maxDataSize; /**< maximum size of a DATA element */
void *pUsr; /**< user pointer (passed back in to callback) */
- int bEnableTLS;
+ int bKeepAlive; /* support keep-alive packets */
+ int iKeepAliveIntvl;
+ int iKeepAliveProbes;
+ int iKeepAliveTime;
+ int bEnableTLS; /* support for TLS */
int bEnableTLSZip;
int dhBits; /**< number of bits for Diffie-Hellman key */
char *pristring; /**< priority string for GnuTLS */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/librelp-1.2.0/src/tcp.c new/librelp-1.2.2/src/tcp.c
--- old/librelp-1.2.0/src/tcp.c 2013-07-08 12:03:48.000000000 +0200
+++ new/librelp-1.2.2/src/tcp.c 2013-12-10 12:45:17.000000000 +0100
@@ -170,7 +170,9 @@
/* helper to call onErr if set */
static void
-callOnErr(relpTcp_t *pThis, char *emsg, relpRetVal ecode)
+callOnErr(const relpTcp_t *__restrict__ const pThis,
+ char *__restrict__ const emsg,
+ const relpRetVal ecode)
{
char objinfo[1024];
pThis->pEngine->dbgprint("librelp: generic error: ecode %d, "
@@ -586,6 +588,79 @@
LEAVE_RELPFUNC;
}
+/* Enable KEEPALIVE handling on the socket. */
+static void
+EnableKeepAlive(const relpTcp_t *__restrict__ const pThis,
+ const relpSrv_t *__restrict__ const pSrv,
+ const int sock)
+{
+ int ret;
+ int optval;
+ socklen_t optlen;
+
+ optval = 1;
+ optlen = sizeof(optval);
+ ret = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &optval, optlen);
+ if(ret < 0) {
+ pThis->pEngine->dbgprint("librelp: EnableKeepAlive socket call "
+ "returns error %d\n", ret);
+ goto done;
+ }
+
+# if defined(TCP_KEEPCNT)
+ if(pSrv->iKeepAliveProbes > 0) {
+ optval = pSrv->iKeepAliveProbes;
+ optlen = sizeof(optval);
+ ret = setsockopt(sock, SOL_TCP, TCP_KEEPCNT, &optval, optlen);
+ } else {
+ ret = 0;
+ }
+# else
+ ret = -1;
+# endif
+ if(ret < 0) {
+ callOnErr(pThis, "librelp cannot set keepalive probes - ignored",
+ RELP_RET_WRN_NO_KEEPALIVE);
+ }
+
+# if defined(TCP_KEEPCNT)
+ if(pSrv->iKeepAliveTime > 0) {
+ optval = pSrv->iKeepAliveTime;
+ optlen = sizeof(optval);
+ ret = setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, &optval, optlen);
+ } else {
+ ret = 0;
+ }
+# else
+ ret = -1;
+# endif
+ if(ret < 0) {
+ callOnErr(pThis, "librelp cannot set keepalive time - ignored",
+ RELP_RET_WRN_NO_KEEPALIVE);
+ }
+
+# if defined(TCP_KEEPCNT)
+ if(pSrv->iKeepAliveIntvl > 0) {
+ optval = pSrv->iKeepAliveIntvl;
+ optlen = sizeof(optval);
+ ret = setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, &optval, optlen);
+ } else {
+ ret = 0;
+ }
+# else
+ ret = -1;
+# endif
+ if(ret < 0) {
+ callOnErr(pThis, "librelp cannot set keepalive intvl - ignored",
+ RELP_RET_WRN_NO_KEEPALIVE);
+ }
+
+ pThis->pEngine->dbgprint("KEEPALIVE enabled for socket %d\n", sock);
+
+done:
+ return;
+}
+
/* accept an incoming connection request, sock provides the socket on which we can
* accept the new session.
* rgerhards, 2008-03-17
@@ -608,6 +683,9 @@
ABORT_FINALIZE(RELP_RET_ACCEPT_ERR);
}
+ if(pSrv->bKeepAlive)
+ EnableKeepAlive(pThis, pSrv, iNewSock);
+
/* construct our object so that we can use it... */
CHKRet(relpTcpConstruct(&pThis, pEngine, RELP_SRV_CONN, pSrv));
@@ -1293,7 +1371,11 @@
&& (errno != EADDRINUSE)
#endif
) {
- pThis->pEngine->dbgprint("error %d while binding relp tcp socket", errno);
+ char msgbuf[4096];
+ snprintf(msgbuf, sizeof(msgbuf), "error while binding relp tcp socket "
+ "on port '%s'", pLstnPort);
+ msgbuf[sizeof(msgbuf)-1] = '\0';
+ callOnErr(pThis, msgbuf, errno);
close(*s);
*s = -1;
continue;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org