diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-07 15:49:40 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-07 15:49:40 +0200 |
commit | eefb295c90fb51c9f6f7c1a5bb95bba52d3a3557 (patch) | |
tree | 1f309ab4f05918283aebcafb9ffac963d3a4ff39 | |
parent | d6da57ae0370aeb705f63fd04e575b5ed4684618 (diff) | |
parent | c64203c7f2c886712c33c21de7e0e53b7939a883 (diff) | |
download | rsyslog-eefb295c90fb51c9f6f7c1a5bb95bba52d3a3557.tar.gz rsyslog-eefb295c90fb51c9f6f7c1a5bb95bba52d3a3557.tar.xz rsyslog-eefb295c90fb51c9f6f7c1a5bb95bba52d3a3557.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
plugins/imptcp/imptcp.c
plugins/imtcp/imtcp.c
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | doc/rsyslog_conf_global.html | 4 | ||||
-rw-r--r-- | plugins/imptcp/imptcp.c | 2 | ||||
-rw-r--r-- | runtime/cfsysline.c | 69 | ||||
-rw-r--r-- | tcpsrv.h | 2 |
5 files changed, 54 insertions, 35 deletions
@@ -1,3 +1,9 @@ +--------------------------------------------------------------------------- +Version 5.9.6 [V5-DEVEL], 2012-03-?? +- permit size modifiers (k,m,g,...) in integer config parameters + Thanks to Jo Rhett for the suggestion. +- bugfix: imklog invalidly computed facility and severity + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=313 - added configuration directive to disable octet-counted framing for imtcp, directive is $InputTCPServerSupportOctetCountedFraming for imptcp, directive is $InputPTCPServerSupportOctetCountedFraming @@ -510,6 +516,12 @@ Version 5.8.9 [V5-stable] 2012-03-15 stats subsystem. --------------------------------------------------------------------------- Version 5.8.8 [V5-stable] 2012-03-05 +- added capability to use a local interface IP address as fromhost-ip for + imuxsock imklog + new config directives: $IMUXSockLocalIPIF, $klogLocalIPIF +- added configuration directives to customize queue light delay marks + $MainMsgQueueLightDelayMark, $ActionQueueLightDelayMark; both + specify number of messages starting at which a delay happens. - bugfix: omprog made rsyslog abort on startup if not binary to execute was configured - bugfix: imklog invalidly computed facility and severity diff --git a/doc/rsyslog_conf_global.html b/doc/rsyslog_conf_global.html index e24b0c15..8cfdd303 100644 --- a/doc/rsyslog_conf_global.html +++ b/doc/rsyslog_conf_global.html @@ -317,7 +317,7 @@ not be reset. </li> <li><a href="rsconf1_umask.html">$UMASK</a></li> </ul> -<p><b>Where <size_nbr> is specified above,</b> +<p><b>Where <size_nbr> or integers are specified above,</b> modifiers can be used after the number part. For example, 1k means 1024. Supported are k(ilo), m(ega), g(iga), t(era), p(eta) and e(xa). Lower case letters refer to the traditional binary defintion (e.g. 1m @@ -325,7 +325,7 @@ equals 1,048,576) whereas upper case letters refer to their new 1000-based definition (e.g 1M equals 1,000,000).</p> <p>Numbers may include '.' and ',' for readability. So you can for example specify either "1000" or "1,000" with the same result. -Please note that rsyslogd simply ignores the punctuation. Form it's +Please note that rsyslogd simply ignores the punctuation. From it's point of view, "1,,0.0.,.,0" also has the value 1000. </p> <p>[<a href="manual.html">manual index</a>] diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index e712dc58..ba323a94 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -147,7 +147,6 @@ struct ptcpsrv_s { ptcpsrv_t *pNext; /* linked list maintenance */ uchar *port; /* Port to listen to */ uchar *lstnIP; /* which IP we should listen on? */ - sbool bSuppOctetFram; int iAddtlFrameDelim; int iKeepAliveIntvl; int iKeepAliveProbes; @@ -160,6 +159,7 @@ struct ptcpsrv_s { pthread_mutex_t mutSessLst; sbool bKeepAlive; /* support keep-alive packets */ sbool bEmitMsgOnClose; + sbool bSuppOctetFram; }; /* the ptcp session object. Describes a single active session. diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c index 7814e86a..af88b3de 100644 --- a/runtime/cfsysline.c +++ b/runtime/cfsysline.c @@ -155,36 +155,6 @@ finalize_it: } -/* Parse a number from the configuration line. - * rgerhards, 2007-07-31 - */ -static rsRetVal doGetInt(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal) -{ - uchar *p; - DEFiRet; - int64 i; - - assert(pp != NULL); - assert(*pp != NULL); - - CHKiRet(parseIntVal(pp, &i)); - p = *pp; - - if(pSetHdlr == NULL) { - /* we should set value directly to var */ - *((int*)pVal) = (int) i; - } else { - /* we set value via a set function */ - CHKiRet(pSetHdlr(pVal, (int) i)); - } - - *pp = p; - -finalize_it: - RETiRet; -} - - /* Parse a size from the configuration line. This is basically an integer * syntax, but modifiers may be added after the integer (e.g. 1k to mean * 1024). The size must immediately follow the number. Note that the @@ -238,7 +208,44 @@ finalize_it: } -/* Parse and interpet a $FileCreateMode and $umask line. This function +/* Parse a number from the configuration line. + * rgerhards, 2007-07-31 + */ +static rsRetVal doGetInt(uchar **pp, rsRetVal (*pSetHdlr)(void*, uid_t), void *pVal) +{ + uchar *p; + DEFiRet; + int64 i; + uchar errMsg[256]; /* for dynamic error messages */ + + assert(pp != NULL); + assert(*pp != NULL); + + CHKiRet(doGetSize(pp, NULL,&i)); + p = *pp; + if(i > 2147483648ll) { /*2^31*/ + snprintf((char*) errMsg, sizeof(errMsg)/sizeof(uchar), + "value %lld too large for integer argument.", i); + errmsg.LogError(0, RS_RET_INVALID_VALUE, "%s", errMsg); + ABORT_FINALIZE(RS_RET_INVALID_VALUE); + } + + if(pSetHdlr == NULL) { + /* we should set value directly to var */ + *((int*)pVal) = (int) i; + } else { + /* we set value via a set function */ + CHKiRet(pSetHdlr(pVal, (int) i)); + } + + *pp = p; + +finalize_it: + RETiRet; +} + + +/* Parse and interpret a $FileCreateMode and $umask line. This function * pulls the creation mode and, if successful, stores it * into the global variable so that the rest of rsyslogd * opens files with that mode. Any previous value will be @@ -148,7 +148,7 @@ ENDinterface(tcpsrv) * - SetAddtlFrameDelim() added -- rgerhards, 2008-12-10 * - SetInputName() added -- rgerhards, 2008-12-10 * change for v5 and up: see above - * for v10: param bSuppOctetFram added to configureTCPListen + * for v12: param bSuppOctetFram added to configureTCPListen */ |