From af968e6ef9f146987a858743df3d9f64d3bb0661 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 4 May 2012 09:30:47 +0200 Subject: cleanup: removing no longer needed macros --- runtime/srUtils.h | 13 ------------- tools/syslogd.c | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/runtime/srUtils.h b/runtime/srUtils.h index 76d25eb2..3169fd94 100644 --- a/runtime/srUtils.h +++ b/runtime/srUtils.h @@ -93,19 +93,6 @@ int getSubString(uchar **ppSrc, char *pDst, size_t DstSize, char cSep); rsRetVal getFileSize(uchar *pszName, off_t *pSize); /* mutex operations */ -/* some macros to cancel-safe lock a mutex (it will automatically be released - * when the thread is cancelled. This needs to be done as macros because - * pthread_cleanup_push sometimes is a macro that can not be used inside a function. - * It's a bit ugly, but works well... rgerhards, 2008-01-20 - */ -#define DEFVARS_mutex_cancelsafeLock int iCancelStateSave -#define mutex_cancelsafe_lock(mut) \ - pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave); \ - d_pthread_mutex_lock(mut); \ - pthread_cleanup_push(mutexCancelCleanup, mut); \ - pthread_setcancelstate(iCancelStateSave, NULL); -#define mutex_cancelsafe_unlock(mut) pthread_cleanup_pop(1) - /* some useful constants */ #define DEFVARS_mutexProtection\ int bLockedOpIsLocked=0 diff --git a/tools/syslogd.c b/tools/syslogd.c index 93f37e4a..98f06627 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -2406,7 +2406,7 @@ queryLocalHostname(void) } /* LocalDomain is "" or part of LocalHostName, allocate a new string */ - CHKmalloc(LocalDomain = (uchar*)strdup(LocalDomain)); + CHKmalloc(LocalDomain = (uchar*)strdup((char*)LocalDomain)); /* Convert to lower case to recognize the correct domain laterly */ for(p = LocalDomain ; *p ; p++) -- cgit v1.2.3 From d86a212255d9fd1ef3e4b0e99db1f4bfd0625260 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 10 May 2012 08:03:22 +0200 Subject: bugfix/tcpflood: sending small test files did not work correctly --- ChangeLog | 3 +++ tests/tcpflood.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7cfc3a00..30f12f07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ --------------------------------------------------------------------------- +Version 5.8.12 [V5-stable] 2012-05-03 +- bugfix/tcpflood: sending small test files did not work correctly +--------------------------------------------------------------------------- Version 5.8.11 [V5-stable] 2012-05-03 - bugfix: ommysql did not properly init/exit the mysql runtime library this could lead to segfaults. Triggering condition: multiple action diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 8485acbb..64d95abd 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -346,7 +346,7 @@ genMsg(char *buf, size_t maxBuf, int *pLenBuf, struct instdata *inst) do { done = 1; *pLenBuf = fread(buf, 1, 1024, dataFP); - if(feof(dataFP)) { + if(*pLenBuf == 0) { if(--numFileIterations > 0) { rewind(dataFP); done = 0; /* need new iteration */ @@ -660,7 +660,7 @@ runTests(void) int run; stats.totalRuntime = 0; - stats.minRuntime = (unsigned long long) 0xffffffffffffffffll; + stats.minRuntime = 0xffffffffllu; stats.maxRuntime = 0; stats.numRuns = numRuns; run = 1; -- cgit v1.2.3