Skip to content

Commit

Permalink
Fix #10
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Apr 28, 2024
1 parent 44b02ef commit 8fca59b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/overtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef int (*p_over_tls_client_run)(const char* config_path,
void (*callback)(int listen_port, void* ctx),
void* ctx);
typedef int (*p_over_tls_client_stop)(void);
typedef void (*p_overtls_set_log_callback)(void (*callback)(ArgVerbosity verbosity, const char* log, void* ctx), void* ctx);
typedef void (*p_overtls_set_log_callback)(bool set_logger, void (*callback)(ArgVerbosity verbosity, const char* log, void* ctx), void* ctx);

const char* get_temp_json_file_path(char json_file_name[MAX_PATH * 2]);
bool write_content_to_file(const char* content, const char* file_path);
Expand All @@ -55,7 +55,7 @@ bool overtls_run_loop_begin(const struct server_config* cf,
return false;
}
// enable overtls log dumping
overtls_set_log_callback(callback, (void*)data);
overtls_set_log_callback(true, callback, (void*)data);

content = config_convert_to_overtls_json(cf, &malloc);
if (content == NULL) {
Expand All @@ -75,7 +75,7 @@ bool overtls_run_loop_begin(const struct server_config* cf,
res = over_tls_client_run(json_file_name, Trace, listen_port_callback, ctx);
assert(res == 0);

overtls_set_log_callback(NULL, NULL);
overtls_set_log_callback(false, NULL, NULL);

return true;
}
Expand Down

0 comments on commit 8fca59b

Please sign in to comment.