From 1f3d16e66fd0f45aa770c49e1932bba7d71e66da Mon Sep 17 00:00:00 2001 From: zhengchao Date: Sun, 23 Apr 2017 13:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Maat=5Ffeather=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E5=AF=B9=E6=9C=80=E5=A4=A7=E6=89=AB=E6=8F=8F=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=95=B0=E7=9A=84=E5=88=A4=E6=96=AD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 1eaf731..22adfaa 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -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) { + 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); 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();