diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-24 09:59:26 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-24 09:59:26 +0100 |
commit | 440aaff114607e82aefee56336846611a2e35c9c (patch) | |
tree | 25de2deb70d2f1b904bf3cd562c52e55d23c74d0 /runtime/prop.h | |
parent | 3668e0085b6c6b89df302c4c390b5bc53b6a6769 (diff) | |
download | rsyslog-440aaff114607e82aefee56336846611a2e35c9c.tar.gz rsyslog-440aaff114607e82aefee56336846611a2e35c9c.tar.bz2 rsyslog-440aaff114607e82aefee56336846611a2e35c9c.zip |
optimize: move lowercasing of hostnames to cache
so we save this on each name lookup!
Diffstat (limited to 'runtime/prop.h')
-rw-r--r-- | runtime/prop.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/prop.h b/runtime/prop.h index 40a35f9b..c7564e6b 100644 --- a/runtime/prop.h +++ b/runtime/prop.h @@ -52,6 +52,13 @@ ENDinterface(prop) #define propCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ +/* get classic c-style string */ +static inline uchar * +propGetSzStr(prop_t *pThis) +{ + return(pThis->len < CONF_PROP_BUFSIZE) ? pThis->szVal.sz : pThis->szVal.psz; +} + /* prototypes */ PROTOTYPEObj(prop); |