增加Maat_feather函数对最大扫描线程数的判断。

This commit is contained in:
zhengchao
2017-04-23 13:19:02 +08:00
parent ad15c6ec50
commit 1f3d16e66f

View File

@@ -414,6 +414,13 @@ int detain_last_data(char* buff,int buff_size,int detained_len,const char* data,
} }
Maat_feather_t Maat_feather(int max_thread_num,const char* table_info_path,void* logger) Maat_feather_t Maat_feather(int max_thread_num,const char* table_info_path,void* logger)
{ {
if(max_thread_num<=0)
{
MESA_handle_runtime_log(logger,RLOG_LV_FATAL,maat_module ,
"Invalid max_thread_num=%d."
,max_thread_num);
return NULL;
}
_Maat_feather_t* feather=(_Maat_feather_t*)calloc(sizeof(struct _Maat_feather_t),1); _Maat_feather_t* feather=(_Maat_feather_t*)calloc(sizeof(struct _Maat_feather_t),1);
feather->table_cnt=read_table_info(feather->p_table_info, MAX_TABLE_NUM,table_info_path,max_thread_num,logger); feather->table_cnt=read_table_info(feather->p_table_info, MAX_TABLE_NUM,table_info_path,max_thread_num,logger);
feather->map_tablename2id=map_create(); feather->map_tablename2id=map_create();