From: <tom...@us...> - 2011-06-30 20:54:46
|
Revision: 1539 http://razorbacktm.svn.sourceforge.net/razorbacktm/?rev=1539&view=rev Author: tomjudge Date: 2011-06-30 20:54:40 +0000 (Thu, 30 Jun 2011) Log Message: ----------- More sendible way of passing an event id arround Modified Paths: -------------- nuggets/clamavNugget/trunk/src/ClamAVNugget.c Modified: nuggets/clamavNugget/trunk/src/ClamAVNugget.c =================================================================== --- nuggets/clamavNugget/trunk/src/ClamAVNugget.c 2011-06-30 20:54:32 UTC (rev 1538) +++ nuggets/clamavNugget/trunk/src/ClamAVNugget.c 2011-06-30 20:54:40 UTC (rev 1539) @@ -18,7 +18,7 @@ static int RZB_stop_clamav (struct cl_engine *engine); bool processDeferredList (struct DeferredList *p_pDefferedList); -uint8_t ClamAV_Detection (struct Block *p_pBlock, uuid_t sourceNuggetId, uint64_t eventSeconds, uint64_t eventNanoSecs, struct NTLVList *p_pEventData); +DECL_INSPECTION_FUNC(ClamAV_Detection); static uuid_t sg_uuidNuggetId; @@ -201,14 +201,13 @@ return true; } -uint8_t -ClamAV_Detection (struct Block *p_pBlock, uuid_t sourceNuggetId, uint64_t eventSeconds, uint64_t eventNanoSecs, struct NTLVList *p_pEventData) +DECL_INSPECTION_FUNC(ClamAV_Detection) { const char *virname = NULL; char *message; - uint8_t *data = p_pBlock->pData; - size_t data_len = p_pBlock->pId->iLength; + uint8_t *data = block->pData; + size_t data_len = block->pId->iLength; if (!RZB_scan_buffer (sg_pEngine, data, data_len, &virname)) { @@ -223,7 +222,7 @@ return JUDGMENT_REASON_ERROR; } free(message); - Judgment_Render_Verdict(0, p_pBlock, NULL, NULL, SF_FLAG_BAD, 0); + Judgment_Render_Verdict(0, block, NULL, NULL, SF_FLAG_BAD, 0); } return JUDGMENT_REASON_DONE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |