处理自定义域异常的拦截策略。

This commit is contained in:
zhengchao
2019-06-06 19:04:31 +08:00
parent e8a91604e7
commit 0eea8bd2a2

View File

@@ -38,8 +38,15 @@ struct intercept_param
void intercept_param_dup_cb(int table_id, MAAT_PLUGIN_EX_DATA* to, MAAT_PLUGIN_EX_DATA* from, long argl, void* argp)
{
struct intercept_param* param= (struct intercept_param*) *from;
param->ref_cnt++;
*to = param;
if(param==NULL)
{
*to=NULL;
}
else
{
param->ref_cnt++;
*to = param;
}
return;
}
void intercept_param_new_cb(int table_id, const char* key, const char* table_line, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp)
@@ -140,6 +147,10 @@ void intercept_param_free_cb(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, v
{
struct ssl_policy_enforcer* enforcer=(struct ssl_policy_enforcer*)argp;
struct intercept_param* param= (struct intercept_param*) *ad;
if(param==NULL)
{
return;
}
param->ref_cnt--;
if(param->ref_cnt==0)
{