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.c | |
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.c')
-rw-r--r-- | runtime/prop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/prop.c b/runtime/prop.c index 9d5927fd..a1f51ed1 100644 --- a/runtime/prop.c +++ b/runtime/prop.c @@ -100,7 +100,8 @@ static int GetStringLen(prop_t *pThis) /* get string */ -static rsRetVal GetString(prop_t *pThis, uchar **ppsz, int *plen) +rsRetVal +propGetString(prop_t *pThis, uchar **ppsz, int *plen) { BEGINfunc ISOBJ_TYPE_assert(pThis, prop); @@ -173,7 +174,7 @@ rsRetVal CreateOrReuseStringProp(prop_t **ppThis, uchar *psz, int len) CHKiRet(CreateStringProp(ppThis, psz, len)); } else { /* already exists, check if we can re-use it */ - GetString(*ppThis, &pszPrev, &lenPrev); + propGetString(*ppThis, &pszPrev, &lenPrev); if(len != lenPrev || ustrcmp(psz, pszPrev)) { /* different, need to discard old & create new one */ propDestruct(ppThis); @@ -212,7 +213,7 @@ CODESTARTobjQueryInterface(prop) pIf->Destruct = propDestruct; pIf->DebugPrint = propDebugPrint; pIf->SetString = SetString; - pIf->GetString = GetString; + pIf->GetString = propGetString; pIf->GetStringLen = GetStringLen; pIf->AddRef = AddRef; pIf->CreateStringProp = CreateStringProp; |