From 5a1ecfba92d918563b0c5ac694fbdc7f0b649008 Mon Sep 17 00:00:00 2001 From: fengweihao Date: Thu, 17 Oct 2024 18:18:17 +0800 Subject: Adapt to the changes in the addition and deletion flags of the callback table. --- plugin/business/tsg-http/src/tsg_http.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'plugin') diff --git a/plugin/business/tsg-http/src/tsg_http.cpp b/plugin/business/tsg-http/src/tsg_http.cpp index 989889c..073140c 100644 --- a/plugin/business/tsg-http/src/tsg_http.cpp +++ b/plugin/business/tsg-http/src/tsg_http.cpp @@ -250,7 +250,6 @@ void trusted_CA_update_cert_cb(const char *table_name, const char *table_line, e } char *uuid_sring=NULL; - int is_valid=0; char cert_name[128]={0}, cert_file[1024]={0}; cJSON *uuid = cJSON_GetObjectItem(trust_ca_cert, "uuid"); @@ -268,13 +267,8 @@ void trusted_CA_update_cert_cb(const char *table_name, const char *table_line, e { memcpy(cert_file, item->valuestring, strlen(item->valuestring)); } - item = cJSON_GetObjectItem(trust_ca_cert, "is_valid"); - if(item && item->type==cJSON_Number) - { - is_valid=item->valueint; - } - if(is_valid==1) + if(op==MAAT_OP_ADD) { ret=tfe_proxy_ssl_add_trust_ca(cert_file); if(ret<0) -- cgit v1.2.3