20160525版本,1)运行回调表注册的start和finish函数为空;2)修复初始化时只有增量回调类配置,scanner未创建导致的段错误。

This commit is contained in:
zhengchao
2016-05-25 11:47:15 +08:00
parent 6e9c55289a
commit c5bea905b8
2 changed files with 24 additions and 6 deletions

View File

@@ -26,7 +26,7 @@
#include "mesa_fuzzy.h"
#include "great_index_engine.h"
int MAAT_FRAME_VERSION_1_7_20160510=1;
int MAAT_FRAME_VERSION_1_7_20160525=1;
const char *maat_module="MAAT Frame";
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
@@ -2441,7 +2441,10 @@ void maat_start_cb(unsigned int new_version,int update_type,void*u_para)
p_table_cb=p_table->cb_info;
for(j=0;j<p_table_cb->cb_plug_cnt;j++)
{
p_table_cb->cb_plug[j].start(update_type,p_table_cb->cb_plug[j].u_para);
if(p_table_cb->cb_plug[j].start!=NULL)
{
p_table_cb->cb_plug[j].start(update_type,p_table_cb->cb_plug[j].u_para);
}
}
}
return;
@@ -2471,7 +2474,10 @@ void maat_finish_cb(void* u_para)
p_table_cb=p_table->cb_info;
for(j=0;j<p_table_cb->cb_plug_cnt;j++)
{
p_table_cb->cb_plug[j].finish(p_table_cb->cb_plug[j].u_para);
if(p_table_cb->cb_plug[j].finish!=NULL)
{
p_table_cb->cb_plug[j].finish(p_table_cb->cb_plug[j].u_para);
}
}
}
if(feather->update_tmp_scanner!=NULL)
@@ -2485,7 +2491,7 @@ void maat_finish_cb(void* u_para)
"Full config version %u load %d entries complete.",
feather->update_tmp_scanner->version,feather->update_tmp_scanner->cfg_num);
}
else
else if(feather->scanner!=NULL)
{
feather->scanner->cfg_num=total;
feather->scanner->version=feather->maat_version;
@@ -2506,6 +2512,12 @@ void maat_finish_cb(void* u_para)
feather->scanner->version,feather->scanner->cfg_num);
}
}
else
{
MESA_handle_runtime_log(feather->logger,RLOG_LV_INFO,maat_module,
"Version %d have no valid scan rules, plugin callback complete.",
feather->maat_version);
}
return;
}
void maat_update_cb(const char* table_name,const char* line,void *u_para)