Module: sip-router Branch: andrei/tcp_tls_changes Commit: 9318b4cbc6e78dd0f28860b0d89e649f9aa17125 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9318b4cb...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Sun Aug 15 18:10:42 2010 +0200
tls: verbose debugging for SSL_ERROR_WANT_WRITE
Debugging messages for partial write and SSL_ERROR_WANT_WRITE (enabled only if the tls module is compiled with -DTLS_WR_DEBUG and -DTLS_RD_DEBUG).
---
modules/tls/tls_server.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/tls/tls_server.c b/modules/tls/tls_server.c index a910767..5ccf545 100644 --- a/modules/tls/tls_server.c +++ b/modules/tls/tls_server.c @@ -787,6 +787,10 @@ redo_wr: /* this function should be called again => disallow immediate closing of the connection */ send_flags->f &= ~SND_F_CON_CLOSE; + TLS_WR_TRACE("(%p) SSL_ERROR_WANT_WRITE partial write" + " (written %p , %d, rest_buf=%p" + " rest_len=%d))\n", c, buf, offs, + *rest_buf, *rest_len); } break; /* or goto end */ case SSL_ERROR_SSL: @@ -1157,6 +1161,8 @@ ssl_read_skipped: /* something was written => buffer not big enough to hold everything => reset buffer & retry (the tcp_write already happened if we are here) */ + TLS_RD_TRACE("(%p) SSL_ERROR_WANT_WRITE partial write" + " (written %d), retrying\n", c, wr.used); goto continue_ssl_read; } /* else write buffer too small, nothing written */