Skip to content

Commit

Permalink
ssl: Refactoring sender
Browse files Browse the repository at this point in the history
Some minor optimizations
  • Loading branch information
dgud committed Jan 15, 2025
1 parent 4670b9a commit 5d0e209
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 154 deletions.
15 changes: 7 additions & 8 deletions lib/ssl/src/ssl_internal.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,13 @@

-define(SSL_LOG(Level, Descr, Reason),
fun() ->
case get(log_level) of
undefined ->
%% Use debug here, i.e. log everything and let loggers
%% log_level decide if it should be logged
ssl_logger:log(Level, debug,
#{description => Descr, reason => Reason},
?LOCATION);
__LogLevel__ ->
__LogLevel__ = case get(log_level) of
undefined -> debug;
Lvl -> Lvl
end,
case logger:compare_levels(__LogLevel__, Level) of
gt -> ok;
_ ->
ssl_logger:log(Level, __LogLevel__,
#{description => Descr, reason => Reason},
?LOCATION)
Expand Down
2 changes: 1 addition & 1 deletion lib/ssl/src/ssl_trace.erl
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ trace_profiles() ->
fun(M, F, A) -> dbg:tpl(M, F, A, x) end,
fun(M, F, A) -> dbg:ctpl(M, F, A) end,
[{tls_gen_connection_1_3, [{handle_key_update, 2}]},
{tls_sender, [{init, 3}, {time_to_rekey, 6},
{tls_sender, [{init, 3}, {time_to_rekey, 5},
{send_post_handshake_data, 4}]},
{tls_v1, [{update_traffic_secret, 2}]}]},
{rle, %% role
Expand Down
Loading

0 comments on commit 5d0e209

Please sign in to comment.