From ce8121e0c491a773cfcf9997ae55711f6f519078 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 2 Mar 2012 12:45:49 +0100 Subject: mmauditd: moved to changed libee 0.4.2 API --- plugins/mmaudit/mmaudit.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/mmaudit/mmaudit.c') diff --git a/plugins/mmaudit/mmaudit.c b/plugins/mmaudit/mmaudit.c index 5c0c152e..6406024a 100644 --- a/plugins/mmaudit/mmaudit.c +++ b/plugins/mmaudit/mmaudit.c @@ -182,7 +182,6 @@ audit_parse(instanceData *pData, uchar *buf, struct ee_event **event) if(event == NULL) { ABORT_FINALIZE(RS_RET_ERR); } - (*event)->fields = ee_newFieldbucket(pData->ctxee); while(*buf) { //dbgprintf("audit_parse, buf: '%s'\n", buf); @@ -194,10 +193,8 @@ audit_parse(instanceData *pData, uchar *buf, struct ee_event **event) CHKiRet(parseValue(&buf, val, sizeof(val))); estr = es_newStrFromCStr(val, strlen(val)); - eeval = ee_newValue((*event)->ctx); - ee_setStrValue(eeval, estr); - f = ee_newFieldFromNV((*event)->ctx, name, eeval); - ee_addFieldToBucket((*event)->fields, f); + ee_addStrFieldToEvent(*event, name, estr); + es_deleteStr(estr); dbgprintf("mmaudit: parsed %s=%s\n", name, val); } @@ -245,7 +242,7 @@ dbgprintf("mmaudit: msg is '%s'\n", buf); } buf += sizeof(" audit("); - for(i = 0 ; i < (sizeof(auditID)-2) && *buf && *buf != ')' ; ++i) { + for(i = 0 ; i < (int) (sizeof(auditID)-2) && *buf && *buf != ')' ; ++i) { auditID[i] = *buf++; } auditID[i] = '\0'; -- cgit