增加从配置文件读取 service_cache_succ_as_app_not_pinning_cnt 配置项的功能
This commit is contained in:
@@ -4,10 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define FAIL_AS_PINNING_COUNT 4
|
||||
#define FAIL_TIME_WINDOW 30
|
||||
#define FAIL_AS_PROTO_ERR_COUNT 5
|
||||
#define SUCC_AS_APP_NOT_PINNING 3
|
||||
struct ssl_svc_client_st
|
||||
{
|
||||
time_t last_update_time;
|
||||
@@ -399,7 +395,7 @@ void ssl_service_cache_write(struct ssl_service_cache* svc_cache, const struct s
|
||||
MESA_htable_search_cb(svc_cache->app_st_hash, hash_key, (unsigned int) hash_key_sz, app_st_write_cb, &write_args, &svr_st_cb_ret);
|
||||
}
|
||||
}
|
||||
struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsigned int expire_seconds, int fail_as_pinning_cnt, int fail_as_proto_err_cnt, int fail_time_win)
|
||||
struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsigned int expire_seconds, int fail_as_pinning_cnt, int fail_as_proto_err_cnt, int succ_as_app_not_pinning_cnt, int fail_time_win)
|
||||
{
|
||||
struct ssl_service_cache * cache = ALLOC(struct ssl_service_cache, 1);
|
||||
unsigned max_num = slot_size * 4;
|
||||
@@ -409,7 +405,7 @@ struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsig
|
||||
cache->fail_as_cli_pinning_count=fail_as_pinning_cnt;
|
||||
cache->fail_as_proto_err_count=fail_as_proto_err_cnt;
|
||||
cache->fail_time_window=fail_time_win;
|
||||
cache->succ_as_app_not_pinning_count=SUCC_AS_APP_NOT_PINNING;//TODO: read from profile.
|
||||
cache->succ_as_app_not_pinning_count = succ_as_app_not_pinning_cnt;
|
||||
void (*free_func[])(void *)={ssl_svc_free_client_st, ssl_svc_free_server_st, ssl_svc_free_app_st};
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user