summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-10-17 14:48:29 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-10-17 14:48:29 +0200
commit943a2070a6f556c48a903d55da0317b5942a41b6 (patch)
tree7df8ab0fe4a06bdb7fecf71e17569a4dc2fe64d5 /action.c
parentb0d33ab78056f06dee06694990a71fc7895ddbb5 (diff)
parentf84c8c4e9637748bd3a6a985bd12afa6b50e9797 (diff)
downloadrsyslog-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.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/action.c b/action.c
index 11c680e1..82bd106a 100644
--- a/action.c
+++ b/action.c
@@ -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;
}