diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-10-17 14:48:29 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-10-17 14:48:29 +0200 |
commit | 943a2070a6f556c48a903d55da0317b5942a41b6 (patch) | |
tree | 7df8ab0fe4a06bdb7fecf71e17569a4dc2fe64d5 /action.c | |
parent | b0d33ab78056f06dee06694990a71fc7895ddbb5 (diff) | |
parent | f84c8c4e9637748bd3a6a985bd12afa6b50e9797 (diff) | |
download | rsyslog-943a2070a6f556c48a903d55da0317b5942a41b6.tar.gz rsyslog-943a2070a6f556c48a903d55da0317b5942a41b6.tar.xz rsyslog-943a2070a6f556c48a903d55da0317b5942a41b6.zip |
Merge branch 'v5-stable' into beta
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -773,7 +773,7 @@ finalize_it: */ static rsRetVal releaseBatch(action_t *pAction, batch_t *pBatch) { - int iArr; + int jArr; int i, j; batch_obj_t *pElem; uchar ***ppMsgs; @@ -787,15 +787,15 @@ static rsRetVal releaseBatch(action_t *pAction, batch_t *pBatch) switch(pAction->eParamPassing) { case ACT_ARRAY_PASSING: ppMsgs = (uchar***) pElem->staticActParams; - for(i = 0 ; i < pAction->iNumTpls ; ++i) { - if(((uchar**)ppMsgs)[i] != NULL) { - iArr = 0; - while(ppMsgs[i][iArr] != NULL) { - d_free(ppMsgs[i][iArr++]); - ppMsgs[i][iArr++] = NULL; + for(j = 0 ; j < pAction->iNumTpls ; ++j) { + if(((uchar**)ppMsgs)[j] != NULL) { + jArr = 0; + while(ppMsgs[j][jArr] != NULL) { + d_free(ppMsgs[j][jArr++]); + ppMsgs[j][jArr++] = NULL; } - d_free(((uchar**)ppMsgs)[i]); - ((uchar**)ppMsgs)[i] = NULL; + d_free(((uchar**)ppMsgs)[j]); + ((uchar**)ppMsgs)[j] = NULL; } } break; @@ -1369,7 +1369,6 @@ actionWriteToAction(action_t *pAction) DBGPRINTF("action not yet ready again to be executed, onceInterval %d, tCurr %d, tNext %d\n", (int) pAction->iSecsExecOnceInterval, (int) getActNow(pAction), (int) (pAction->iSecsExecOnceInterval + pAction->tLastExec)); - pAction->tLastExec = getActNow(pAction); /* re-init time flags */ FINALIZE; } |