Skip to content

Commit

Permalink
Add debug log for successful write
Browse files Browse the repository at this point in the history
  • Loading branch information
ssahani committed May 10, 2024
1 parent e2e307c commit 819eca8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/netlog/netlog-dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ static ssize_t dtls_write(DTLSManager *m, const char *buf, size_t count) {
if (r <= 0)
return log_error_errno(r, "Failed to invoke SSL_write: %s", TLS_ERROR_STRING(SSL_get_error(m->ssl, r)));

if (r > 0)
return log_debug("Successful DTLS SSL_write: %d bytes", r);

return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions src/netlog/netlog-tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ static ssize_t tls_write(TLSManager *m, const char *buf, size_t count) {
if (r <= 0)
return log_error_errno(r, "Failed to invoke SSL_write: %s", TLS_ERROR_STRING(SSL_get_error(m->ssl, r)));

if (r > 0)
return log_debug("Successful TLS SSL_write: %d bytes", r);

return 0;
}

Expand Down

0 comments on commit 819eca8

Please sign in to comment.