- upgrade

- fixing bad file descriptor (#428775)
This commit is contained in:
Peter Vrabec 2008-01-18 13:05:40 +00:00
parent eff7ef691d
commit 4c5d31dfab
4 changed files with 53 additions and 7 deletions

View File

@ -1,3 +1,3 @@
rsyslog-2.0.0.tar.gz
rsyslog.init
rsyslog.sysconfig
rsyslog-1.21.2.tar.gz

View File

@ -0,0 +1,42 @@
diff -up rsyslog-2.0.0/omfwd.c.hang rsyslog-2.0.0/omfwd.c
--- rsyslog-2.0.0/omfwd.c.hang 2008-01-17 12:24:03.000000000 +0100
+++ rsyslog-2.0.0/omfwd.c 2008-01-17 13:34:37.000000000 +0100
@@ -116,6 +116,7 @@ typedef struct _instanceData {
BEGINcreateInstance
CODESTARTcreateInstance
+ pData->sock = -1;
ENDcreateInstance
@@ -278,8 +279,8 @@ static rsRetVal TCPSendInit(void *pvData
instanceData *pData = (instanceData *) pvData;
assert(pData != NULL);
- if(pData->sock <= 0) {
- if((pData->sock = TCPSendCreateSocket(pData->f_addr)) <= 0)
+ if(pData->sock < 0) {
+ if((pData->sock = TCPSendCreateSocket(pData->f_addr)) < 0)
iRet = RS_RET_TCP_SOCKCREATE_ERR;
}
diff -up rsyslog-2.0.0/omfile.c.hang rsyslog-2.0.0/omfile.c
--- rsyslog-2.0.0/omfile.c.hang 2008-01-17 12:24:11.000000000 +0100
+++ rsyslog-2.0.0/omfile.c 2008-01-17 13:16:57.000000000 +0100
@@ -357,6 +357,7 @@ static void prepareFile(instanceData *pD
pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
pData->fCreateMode);
} else {
+ pData->fd = -1;
/* file does not exist, create it (and eventually parent directories */
if(pData->bCreateDirs) {
/* we fist need to create parent dirs if they are missing
@@ -596,6 +597,7 @@ again:
BEGINcreateInstance
CODESTARTcreateInstance
+ pData->fd = -1;
ENDcreateInstance
diff -up rsyslog-2.0.0/tcpsyslog.c.hang rsyslog-2.0.0/tcpsyslog.c

View File

@ -2,7 +2,7 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
Version: 1.21.2
Version: 2.0.0
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Daemons
@ -10,14 +10,13 @@ URL: http://www.rsyslog.com/
Source0: http://download.rsyslog.com/rsyslog/%{name}-%{version}.tar.gz
Source1: rsyslog.init
Source2: rsyslog.sysconfig
Conflicts: logrotate < 3.5.2
Patch1: rsyslog-2.0.0-sockhang.patch
BuildRequires: zlib-devel
BuildRequires: autoconf automake
Requires: logrotate
Requires: logrotate
Requires: logrotate >= 3.5.2
Requires: bash >= 2.0
Requires(post): /sbin/chkconfig coreutils
Requires(preun): /sbin/chkconfig /sbin/chkconfig
Requires(preun): /sbin/chkconfig /sbin/service
Requires(postun): /sbin/service
Provides: syslog
Provides: sysklogd = 1.4.3-1
@ -46,6 +45,7 @@ MySQL database support to rsyslog.
%prep
%setup -q
%patch1 -p1 -b .sockHang
%build
%configure --sbindir=%{sbindir} --disable-static --enable-mysql
@ -118,6 +118,10 @@ fi
%{_libdir}/rsyslog/ommysql.so
%changelog
* Thu Jan 17 2008 Peter Vrabec <pvrabec@redhat.com> 2.0.0-1
- upgrade
- fixing bad file descriptor (#428775)
* Wed Jan 02 2008 Peter Vrabec <pvrabec@redhat.com> 1.21.2-1
- new upstream release

View File

@ -1,3 +1,3 @@
de42d8e7a6dc03e38e807662f2bfb240 rsyslog-2.0.0.tar.gz
fe8fcd90c672701fa198dd1206df64ae rsyslog.init
e10d2dc3238c2cf2a54933f10b19b9bf rsyslog.sysconfig
f3d41220ca1d3583eb4624a7685307dc rsyslog-1.21.2.tar.gz