mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 08:40:42 +01:00
Merge branch 'v8-stable'
This commit is contained in:
commit
68307718c1
@ -1385,7 +1385,7 @@ doFunc_re_extract(struct cnffunc *func, struct var *ret, void* usrptr)
|
||||
matchnbr = (short) var2Number(&r[2], NULL);
|
||||
submatchnbr = (size_t) var2Number(&r[3], NULL);
|
||||
if(submatchnbr >= sizeof(pmatch)/sizeof(regmatch_t)) {
|
||||
DBGPRINTF("re_extract() submatch %d is too large\n", submatchnbr);
|
||||
DBGPRINTF("re_extract() submatch %zd is too large\n", submatchnbr);
|
||||
bHadNoMatch = 1;
|
||||
goto finalize_it;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ CODESTARTdoAction
|
||||
* needs to be more solid. -- rgerhards, 2012-11-28
|
||||
*/
|
||||
if((r = write(1, toWrite, len)) != (int) len) { /* 1 is stdout! */
|
||||
DBGPRINTF("omstdout: error %d writing to stdout[%d]: %s\n",
|
||||
DBGPRINTF("omstdout: error %d writing to stdout[%zd]: %s\n",
|
||||
r, len, toWrite);
|
||||
}
|
||||
if(pWrkrData->pData->bEnsureLFEnding && toWrite[len-1] != '\n') {
|
||||
|
||||
@ -154,7 +154,7 @@ eiCheckFiletype(gcryfile gf)
|
||||
close(gf->fd);
|
||||
gf->fd = -1;
|
||||
}
|
||||
DBGPRINTF("eiCheckFiletype read %d bytes: '%s'\n", didRead, hdrBuf);
|
||||
DBGPRINTF("eiCheckFiletype read %zd bytes: '%s'\n", didRead, hdrBuf);
|
||||
if( didRead != toRead
|
||||
|| strncmp(hdrBuf, "FILETYPE:" RSGCRY_FILETYPE_NAME "\n", toRead))
|
||||
iRet = RS_RET_EI_INVLD_FILE;
|
||||
@ -213,7 +213,7 @@ eiGetIV(gcryfile gf, uchar *iv, size_t leniv)
|
||||
}
|
||||
valueLen = strlen(value);
|
||||
if(valueLen/2 != leniv) {
|
||||
DBGPRINTF("length of IV is %d, expected %d\n",
|
||||
DBGPRINTF("length of IV is %zd, expected %zd\n",
|
||||
valueLen/2, leniv);
|
||||
ABORT_FINALIZE(RS_RET_ERR);
|
||||
}
|
||||
@ -322,7 +322,7 @@ eiClose(gcryfile gf, off64_t offsLogfile)
|
||||
return;
|
||||
if(gf->openMode == 'w') {
|
||||
/* 2^64 is 20 digits, so the snprintf buffer is large enough */
|
||||
len = snprintf(offs, sizeof(offs), "%lld", offsLogfile);
|
||||
len = snprintf(offs, sizeof(offs), "%lld", (long long) offsLogfile);
|
||||
eiWriteRec(gf, "END:", 4, offs, len);
|
||||
}
|
||||
gcry_cipher_close(gf->chd);
|
||||
@ -429,7 +429,7 @@ addPadding(gcryfile pF, uchar *buf, size_t *plen)
|
||||
unsigned i;
|
||||
size_t nPad;
|
||||
nPad = (pF->blkLength - *plen % pF->blkLength) % pF->blkLength;
|
||||
DBGPRINTF("libgcry: addPadding %d chars, blkLength %d, mod %d, pad %d\n",
|
||||
DBGPRINTF("libgcry: addPadding %zd chars, blkLength %zd, mod %zd, pad %zd\n",
|
||||
*plen, pF->blkLength, *plen % pF->blkLength, nPad);
|
||||
for(i = 0 ; i < nPad ; ++i)
|
||||
buf[(*plen)+i] = 0x00;
|
||||
|
||||
@ -1479,7 +1479,7 @@ DoDeleteBatchFromQStore(qqueue_t *pThis, int nElem)
|
||||
if(bytesDel != 0) {
|
||||
pThis->tVars.disk.sizeOnDisk -= bytesDel;
|
||||
DBGOPRINT((obj_t*) pThis, "doDeleteBatch: a %lld octet file has been deleted, now %lld octets disk "
|
||||
"space used\n", bytesDel, pThis->tVars.disk.sizeOnDisk);
|
||||
"space used\n", (long long) bytesDel, pThis->tVars.disk.sizeOnDisk);
|
||||
/* awake possibly waiting enq process */
|
||||
pthread_cond_signal(&pThis->notFull); /* we hold the mutex while we are in here! */
|
||||
}
|
||||
|
||||
@ -301,9 +301,11 @@ CheckFileChange(strm_t *pThis)
|
||||
if(stat((char*) pThis->pszCurrFName, &statName) == -1)
|
||||
ABORT_FINALIZE(RS_RET_IO_ERROR);
|
||||
DBGPRINTF("stream/after deserialize checking for file change on '%s', "
|
||||
"inode %u/%u, size/currOffs %llu/%llu\n",
|
||||
pThis->pszCurrFName, (unsigned) pThis->inode,
|
||||
(unsigned) statName.st_ino, statName.st_size, pThis->iCurrOffs);
|
||||
"inode %u/%u, size/currOffs %llu/%llu\n",
|
||||
pThis->pszCurrFName, (unsigned) pThis->inode,
|
||||
(unsigned) statName.st_ino,
|
||||
(long long unsigned) statName.st_size,
|
||||
(long long unsigned) pThis->iCurrOffs);
|
||||
if(pThis->inode != statName.st_ino || statName.st_size < pThis->iCurrOffs) {
|
||||
DBGPRINTF("stream: file %s has changed\n", pThis->pszCurrFName);
|
||||
pThis->iCurrOffs = 0;
|
||||
@ -1460,7 +1462,7 @@ static rsRetVal strmSeek(strm_t *pThis, off64_t offs)
|
||||
DBGOPRINT((obj_t*) pThis, "file %d seek, pos %llu\n", pThis->fd, (long long unsigned) offs);
|
||||
i = lseek64(pThis->fd, offs, SEEK_SET);
|
||||
if(i != offs) {
|
||||
DBGPRINTF("strmSeek: error %lld seeking to offset %lld\n", i, offs);
|
||||
DBGPRINTF("strmSeek: error %lld seeking to offset %lld\n", i, (long long) offs);
|
||||
ABORT_FINALIZE(RS_RET_IO_ERROR);
|
||||
}
|
||||
pThis->iCurrOffs = offs; /* we are now at *this* offset */
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include "config.h"
|
||||
#include "rsyslog.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <liblogging/stdlog.h>
|
||||
#ifdef OS_SOLARIS
|
||||
# include <errno.h>
|
||||
|
||||
@ -102,11 +102,9 @@
|
||||
#include "msg.h"
|
||||
#include "iminternal.h"
|
||||
#include "threads.h"
|
||||
#include "errmsg.h"
|
||||
#include "parser.h"
|
||||
#include "unicode-helper.h"
|
||||
#include "net.h"
|
||||
#include "rsconf.h"
|
||||
#include "dnscache.h"
|
||||
#include "sd-daemon.h"
|
||||
#include "ratelimit.h"
|
||||
@ -114,8 +112,6 @@
|
||||
/* definitions for objects we access */
|
||||
DEFobjCurrIf(obj)
|
||||
DEFobjCurrIf(glbl)
|
||||
DEFobjCurrIf(errmsg)
|
||||
DEFobjCurrIf(rsconf)
|
||||
DEFobjCurrIf(net) /* TODO: make go away! */
|
||||
|
||||
|
||||
@ -405,10 +401,6 @@ syslogd_obtainClassPointers(void)
|
||||
/* Now tell the system which classes we need ourselfs */
|
||||
pErrObj = "glbl";
|
||||
CHKiRet(objUse(glbl, CORE_COMPONENT));
|
||||
pErrObj = "errmsg";
|
||||
CHKiRet(objUse(errmsg, CORE_COMPONENT));
|
||||
pErrObj = "rsconf";
|
||||
CHKiRet(objUse(rsconf, CORE_COMPONENT));
|
||||
|
||||
/* TODO: the dependency on net shall go away! -- rgerhards, 2008-03-07 */
|
||||
pErrObj = "net";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user