diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-22 15:12:35 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-22 15:12:35 +0200 |
commit | 651bee9cf55ca6aaea73e7921928bf6f9bd65404 (patch) | |
tree | 8c3ce1b498e01839fe6ef0c6adb8cfbcb2f42bad /runtime/vm.c | |
parent | b5f3387357ffa11e238ddfe0fa38af4fffba6081 (diff) | |
parent | 3abf567d2b57014381eda49018a0e2c21fa1b853 (diff) | |
download | rsyslog-651bee9cf55ca6aaea73e7921928bf6f9bd65404.tar.gz rsyslog-651bee9cf55ca6aaea73e7921928bf6f9bd65404.tar.xz rsyslog-651bee9cf55ca6aaea73e7921928bf6f9bd65404.zip |
Merge branch 'omfile' into tmp
This was a complex manual merge, especially in action.c. So if
there occur some problems, this would be a good point to start
troubleshooting. I run a couple of tests before commiting and
they all went well.
Conflicts:
action.c
action.h
runtime/queue.c
runtime/queue.h
runtime/wti.c
runtime/wti.h
Diffstat (limited to 'runtime/vm.c')
-rw-r--r-- | runtime/vm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/vm.c b/runtime/vm.c index 8cbf9e12..d7cd52d5 100644 --- a/runtime/vm.c +++ b/runtime/vm.c @@ -82,6 +82,7 @@ rsfrAddFunction(uchar *szName, prsf_t rsf) /* unique name, so add to head of list */ CHKmalloc(pEntry = calloc(1, sizeof(rsf_entry_t))); CHKiRet(rsCStrConstructFromszStr(&pEntry->pName, szName)); + CHKiRet(cstrFinalize(pEntry->pName)); pEntry->rsf = rsf; pEntry->pNext = funcRegRoot; funcRegRoot = pEntry; @@ -167,7 +168,7 @@ rsfrRemoveAll(void) while(pEntry != NULL) { pEntryDel = pEntry; pEntry = pEntry->pNext; - rsCStrDestruct(&pEntryDel->pName); + cstrDestruct(&pEntryDel->pName); free(pEntryDel); } funcRegRoot = NULL; @@ -405,6 +406,7 @@ CODESTARTop(STRADD) vmstk.PopString(pThis->pStk, &operand1); CHKiRet(rsCStrAppendCStr(operand1->val.pStr, operand2->val.pStr)); + CHKiRet(cstrFinalize(operand1->val.pStr)); /* we have a result, so let's push it */ vmstk.Push(pThis->pStk, operand1); @@ -554,12 +556,12 @@ rsf_tolower(vmstk_t *pStk, int numOperands) ABORT_FINALIZE(RS_RET_INVLD_NBR_ARGUMENTS); /* pop args and do operaton */ - CHKiRet(rsCStrConstruct(&pcstr)); + CHKiRet(cstrConstruct(&pcstr)); vmstk.PopString(pStk, &operand1); - pSrc = rsCStrGetSzStr(operand1->val.pStr); - iStrlen = strlen((char*)pSrc); + pSrc = cstrGetSzStr(operand1->val.pStr); + iStrlen = strlen((char*)pSrc); // TODO: use count from string! while(iStrlen--) { - CHKiRet(rsCStrAppendChar(pcstr, tolower(*pSrc++))); + CHKiRet(cstrAppendChar(pcstr, tolower(*pSrc++))); } /* Store result and cleanup */ |