From 83f8b6bd4109bae1c84c19ce0b2d711e65b12668 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Thu, 24 Dec 2015 18:18:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E5=B7=A5=E5=90=88=E5=B9=B6=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E8=A1=A8=E7=9A=84=E6=B3=A8=E5=86=8C=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=88=B0Maat=5Fapi.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_api.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/entry/Maat_api.cpp b/src/entry/Maat_api.cpp index 3f74b14..1822130 100644 --- a/src/entry/Maat_api.cpp +++ b/src/entry/Maat_api.cpp @@ -489,9 +489,11 @@ int Maat_table_callback_register(Maat_feather_t feather,short table_id, { return -1; } + pthread_mutex_lock(&(p_table->cb_info->plugin_mutex)); idx=p_table->cb_info->cb_plug_cnt; if(idx==MAX_PLUGING_NUM) { + pthread_mutex_unlock(&(p_table->cb_info->plugin_mutex)); return -1; } p_table->cb_info->cb_plug_cnt++; @@ -513,6 +515,7 @@ int Maat_table_callback_register(Maat_feather_t feather,short table_id, } finish(u_para); } + pthread_mutex_unlock(&(p_table->cb_info->plugin_mutex)); return 1; } int Maat_full_scan_string_detail(Maat_feather_t feather,int table_id