From d9af8ba6ff64a074f89aeab5a7dd679f90e715f3 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Thu, 3 Aug 2017 18:37:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=87=8D=E8=A6=81Bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E5=BB=B6=E8=BF=9F=E5=88=A0=E9=99=A4=E6=9C=BA?= =?UTF-8?q?=E5=88=B6=E4=B8=8ERulescan=E5=BB=B6=E8=BF=9F=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=9C=BA=E5=88=B6=E5=8F=91=E7=94=9F=E5=86=B2=E7=AA=81=E3=80=82?= =?UTF-8?q?=E5=BD=93=E4=B8=A4=E6=AC=A1=E5=88=A0=E9=99=A4=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=97=B4=E9=9A=94=E5=B0=8F=E4=BA=8Erulescan?= =?UTF-8?q?=E5=BB=B6=E8=BF=9F=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BC=9A=E5=AF=BC=E8=87=B4=E6=89=AB=E6=8F=8F=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E8=AE=BF=E9=97=AE=E5=B7=B2=E9=87=8A=E6=94=BE=E7=9A=84?= =?UTF-8?q?group=5Frule=EF=BC=8C=E8=BD=BB=E5=88=99=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E5=88=99=E6=80=9D=E7=B4=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_rule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index dd9afb8..2c5d9d3 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -2623,7 +2623,7 @@ void garbage_bagging(enum maat_garbage_type type,void *p,MESA_lqueue_head garbag MESA_lqueue_join_tail(garbage_q,&bag,sizeof(void*)); return; } -void garbage_bury(MESA_lqueue_head garbage_q,void *logger) +void garbage_bury(MESA_lqueue_head garbage_q,int timeout,void *logger) { MESA_queue_errno_t q_ret=MESA_QUEUE_RET_OK; _maat_garbage_t* bag=NULL; @@ -2638,7 +2638,7 @@ void garbage_bury(MESA_lqueue_head garbage_q,void *logger) data_size=sizeof(void*); q_ret=(MESA_queue_errno_t)MESA_lqueue_get_head(garbage_q,&bag,&data_size); assert(data_size==sizeof(void*)&&q_ret==MESA_QUEUE_RET_OK); - if(now-bag->create_time<10) + if(now-bag->create_timescanner->version,feather->scanner->cfg_num); } } - garbage_bury(feather->garbage_q,feather->logger); + garbage_bury(feather->garbage_q,feather->effect_interval_ms/1000+10,feather->logger); if(feather->stat_on==1&&scan_dir_cnt%2==0)//output every 2 seconds { maat_stat_output(feather); @@ -3051,7 +3051,7 @@ void *thread_rule_monitor(void *arg) MESA_htable_destroy(feather->map_tablename2id,free); destroy_maat_scanner(feather->scanner); - garbage_bury(feather->garbage_q,feather->logger); + garbage_bury(feather->garbage_q,feather->effect_interval_ms/1000+10,feather->logger); MESA_lqueue_destroy(feather->garbage_q,lqueue_destroy_cb,NULL); FS_stop(&(feather->stat_handle));