summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-04-23 11:43:00 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-04-23 11:43:00 +0100
commitc4b0f6bcae4761cc7c41a2b07043a1bec00ad6e6 (patch)
tree48d9110b63e34c59c1648df3ff8a7049327bc487 /action.c
parent236c96ffb124074d6efe3382b4d1b77da9a2986a (diff)
parent3a12d05433153d5c7c84f85af6b5039fbcdd1d09 (diff)
downloadrsyslog-c4b0f6bcae4761cc7c41a2b07043a1bec00ad6e6.tar.gz
rsyslog-c4b0f6bcae4761cc7c41a2b07043a1bec00ad6e6.tar.xz
rsyslog-c4b0f6bcae4761cc7c41a2b07043a1bec00ad6e6.zip
Merge branch 'v4-devel' into master
Conflicts: runtime/rsyslog.h runtime/wtp.c
Diffstat (limited to 'action.c')
-rw-r--r--action.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/action.c b/action.c
index c9d0b5a4..59d984a5 100644
--- a/action.c
+++ b/action.c
@@ -208,7 +208,7 @@ rsRetVal actionDestruct(action_t *pThis)
/* message ptr cleanup */
for(i = 0 ; i < pThis->iNumTpls ; ++i) {
- if(pThis->ppMsgs[i] != NULL) {
+ if(((uchar**)pThis->ppMsgs)[i] != NULL) {
switch(pThis->eParamPassing) {
case ACT_ARRAY_PASSING:
#if 0 /* later, as an optimization. So far, we do the cleanup after each message */
@@ -222,7 +222,7 @@ rsRetVal actionDestruct(action_t *pThis)
#endif
break;
case ACT_STRING_PASSING:
- d_free(pThis->ppMsgs[i]);
+ d_free(((uchar**)pThis->ppMsgs)[i]);
break;
case ACT_MSG_PASSING:
/* No cleanup needed in this case */
@@ -633,16 +633,16 @@ static rsRetVal prepareDoActionParams(action_t *pAction, msg_t *pMsg)
for(i = 0 ; i < pAction->iNumTpls ; ++i) {
switch(pAction->eParamPassing) {
case ACT_STRING_PASSING:
- CHKiRet(tplToString(pAction->ppTpl[i], pMsg, &(pAction->ppMsgs[i]), &(pAction->lenMsgs[i])));
+ CHKiRet(tplToString(pAction->ppTpl[i], pMsg, &(((uchar**)pAction->ppMsgs)[i]), &(pAction->lenMsgs[i])));
break;
case ACT_ARRAY_PASSING:
- CHKiRet(tplToArray(pAction->ppTpl[i], pMsg, (uchar***) &(pAction->ppMsgs[i])));
+ CHKiRet(tplToArray(pAction->ppTpl[i], pMsg, (uchar***) &(((uchar**)pAction->ppMsgs)[i])));
break;
case ACT_MSG_PASSING:
/* we abuse the uchar* ptr, it now actually is a void*, but we can not
* change that other than by chaning the interface, what we don't like...
*/
- pAction->ppMsgs[i] = (uchar*) pMsg;
+ ((uchar**)pAction->ppMsgs)[i] = (uchar*) pMsg;
break;
default:assert(0); /* software bug if this happens! */
}
@@ -664,16 +664,16 @@ static rsRetVal cleanupDoActionParams(action_t *pAction)
ASSERT(pAction != NULL);
for(i = 0 ; i < pAction->iNumTpls ; ++i) {
- if(pAction->ppMsgs[i] != NULL) {
+ if(((uchar**)pAction->ppMsgs)[i] != NULL) {
switch(pAction->eParamPassing) {
case ACT_ARRAY_PASSING:
iArr = 0;
- while(((char **)pAction->ppMsgs[i])[iArr] != NULL) {
- d_free(((char **)pAction->ppMsgs[i])[iArr++]);
- ((char **)pAction->ppMsgs[i])[iArr++] = NULL;
+ while((((uchar***)pAction->ppMsgs)[i][iArr]) != NULL) {
+ d_free(((uchar ***)pAction->ppMsgs)[i][iArr++]);
+ ((uchar ***)pAction->ppMsgs)[i][iArr++] = NULL;
}
- d_free(pAction->ppMsgs[i]);
- pAction->ppMsgs[i] = NULL;
+ d_free(((uchar**)pAction->ppMsgs)[i]);
+ ((uchar**)pAction->ppMsgs)[i] = NULL;
break;
case ACT_MSG_PASSING:
case ACT_STRING_PASSING: