diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 16:30:39 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-12 16:30:39 +0200 |
commit | 057c9b11fca013205877e15dd851927a11aa058b (patch) | |
tree | 5d314274542db6b09ff325080cc21ed2b144def4 | |
parent | b5ccdf06724d309b777d4dd38a455ed2ef0318a0 (diff) | |
download | rsyslog-057c9b11fca013205877e15dd851927a11aa058b.tar.gz rsyslog-057c9b11fca013205877e15dd851927a11aa058b.tar.xz rsyslog-057c9b11fca013205877e15dd851927a11aa058b.zip |
fixed a regression from past commit & more performance enhancement
a larger buffer is a cheap, yet useful, enhancement... ;)
-rw-r--r-- | tcps_sess.c | 5 | ||||
-rw-r--r-- | tcpsrv.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index 8ba5cbec..f01114d6 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -234,8 +234,8 @@ static rsRetVal defaultDoSubmitMessage(tcps_sess_t *pThis) { msg_t *pMsg; - struct syslogTime stTime; - time_t ttGenTime; + static struct syslogTime stTime; /* the static vars are currently OK (single input thread!) */ + static time_t ttGenTime; DEFiRet; ISOBJ_TYPE_assert(pThis, tcps_sess); @@ -245,6 +245,7 @@ defaultDoSubmitMessage(tcps_sess_t *pThis) FINALIZE; } +RUNLOG_VAR("%ld", ttGenTime); if((iTimeRequery == 0) || (iNbrTimeUsed++ % iTimeRequery) == 0) { RUNLOG_STR("XXX: quering time!"); datetime.getCurrTime(&stTime, &ttGenTime); @@ -513,7 +513,7 @@ Run(tcpsrv_t *pThis) while(nfds && iTCPSess != -1) { CHKiRet(nssel.IsReady(pSel, pThis->pSessions[iTCPSess]->pStrm, NSDSEL_RD, &bIsReady, &nfds)); if(bIsReady) { - char buf[8*1024]; /* reception buffer - may hold a partial or multiple messages */ + char buf[64*1024]; /* reception buffer - may hold a partial or multiple messages */ dbgprintf("netstream %p with new data\n", pThis->pSessions[iTCPSess]->pStrm); /* Receive message */ |