summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-10-15 08:06:40 -0700
committerRainer Gerhards <rgerhards@adiscon.com>2010-10-15 08:06:40 -0700
commit5d8b1846ec376f590b390aef22566b6f87a8c188 (patch)
treecaac7e1cc47713f6a30b3a8c631fca981080c8f7 /runtime
parent6714bb931bcbe8d1a4ca60f503598f57e6ebe3b9 (diff)
parent3700a64d973f55e1cc8bd478e203f00d529ce27b (diff)
downloadrsyslog-5d8b1846ec376f590b390aef22566b6f87a8c188.tar.gz
rsyslog-5d8b1846ec376f590b390aef22566b6f87a8c188.tar.xz
rsyslog-5d8b1846ec376f590b390aef22566b6f87a8c188.zip
Merge branch 'v4-devel' into v5-beta
Conflicts: Makefile.am tests/tcpflood.c
Diffstat (limited to 'runtime')
-rw-r--r--runtime/rsyslog.h4
-rw-r--r--runtime/stream.c16
2 files changed, 12 insertions, 8 deletions
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 81b446e3..34eaedca 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -450,6 +450,10 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_TIMEOUT = -2164, /**< timeout occured during operation */
RS_RET_RCV_ERR = -2165, /**< error occured during socket rcv operation */
RS_RET_NO_SOCK_CONFIGURED = -2166, /**< no socket (name) was configured where one is required */
+ RS_RET_NO_LSTN_DEFINED = -2172, /**< no listener defined (e.g. inside an input module) */
+ RS_RET_EPOLL_CR_FAILED = -2173, /**< epoll_create() failed */
+ RS_RET_EPOLL_CTL_FAILED = -2174, /**< epoll_ctl() failed */
+ RS_RET_INTERNAL_ERROR = -2175, /**< rsyslogd internal error, unexpected code path reached */
/* RainerScript error messages (range 1000.. 1999) */
RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */
diff --git a/runtime/stream.c b/runtime/stream.c
index b4295762..6b3040d8 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -214,7 +214,7 @@ doPhysOpen(strm_t *pThis)
iFlags |= O_NONBLOCK;
}
- pThis->fd = open((char*)pThis->pszCurrFName, iFlags, pThis->tOpenMode);
+ pThis->fd = open((char*)pThis->pszCurrFName, iFlags | O_LARGEFILE, pThis->tOpenMode);
DBGPRINTF("file '%s' opened as #%d with mode %d\n", pThis->pszCurrFName,
pThis->fd, (int) pThis->tOpenMode);
if(pThis->fd == -1) {
@@ -1184,7 +1184,7 @@ finalize_it:
* is invalidated.
* rgerhards, 2008-01-12
*/
-static rsRetVal strmSeek(strm_t *pThis, off_t offs)
+static rsRetVal strmSeek(strm_t *pThis, off64_t offs)
{
DEFiRet;
@@ -1194,9 +1194,9 @@ static rsRetVal strmSeek(strm_t *pThis, off_t offs)
strmOpenFile(pThis);
else
strmFlushInternal(pThis);
- int i;
- DBGOPRINT((obj_t*) pThis, "file %d seek, pos %ld\n", pThis->fd, (long) offs);
- i = lseek(pThis->fd, offs, SEEK_SET); // TODO: check error!
+ long long i;
+ DBGOPRINT((obj_t*) pThis, "file %d seek, pos %llu\n", pThis->fd, (long long unsigned) offs);
+ i = lseek64(pThis->fd, offs, SEEK_SET); // TODO: check error!
pThis->iCurrOffs = offs; /* we are now at *this* offset */
pThis->iBufPtr = 0; /* buffer invalidated */
@@ -1473,7 +1473,7 @@ static rsRetVal strmSerialize(strm_t *pThis, strm_t *pStrm)
{
DEFiRet;
int i;
- long l;
+ int64 l;
ISOBJ_TYPE_assert(pThis, strm);
ISOBJ_TYPE_assert(pStrm, strm);
@@ -1495,8 +1495,8 @@ static rsRetVal strmSerialize(strm_t *pThis, strm_t *pStrm)
i = pThis->tOpenMode;
objSerializeSCALAR_VAR(pStrm, tOpenMode, INT, i);
- l = (long) pThis->iCurrOffs;
- objSerializeSCALAR_VAR(pStrm, iCurrOffs, LONG, l);
+ l = pThis->iCurrOffs;
+ objSerializeSCALAR_VAR(pStrm, iCurrOffs, INT64, l);
CHKiRet(obj.EndSerialize(pStrm));