From: Wouter Wijngaards Date: Thu, 22 Jul 2010 11:50:28 +0000 (+0000) Subject: more error details on failed remote control connection. X-Git-Tag: release-1.4.6^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21477ad68a33156d99c9c736b10d58cb8e381c51;p=thirdparty%2Funbound.git more error details on failed remote control connection. git-svn-id: file:///svn/unbound/trunk@2201 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/remote.c b/daemon/remote.c index b9391499f..73e8729ef 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1802,8 +1802,8 @@ int remote_control_callback(struct comm_point* c, void* arg, int err, ERR_clear_error(); r = SSL_do_handshake(s->ssl); if(r != 1) { - r = SSL_get_error(s->ssl, r); - if(r == SSL_ERROR_WANT_READ) { + int r2 = SSL_get_error(s->ssl, r); + if(r2 == SSL_ERROR_WANT_READ) { if(s->shake_state == rc_hs_read) { /* try again later */ return 0; @@ -1811,7 +1811,7 @@ int remote_control_callback(struct comm_point* c, void* arg, int err, s->shake_state = rc_hs_read; comm_point_listen_for_rw(c, 1, 0); return 0; - } else if(r == SSL_ERROR_WANT_WRITE) { + } else if(r2 == SSL_ERROR_WANT_WRITE) { if(s->shake_state == rc_hs_write) { /* try again later */ return 0; @@ -1820,6 +1820,10 @@ int remote_control_callback(struct comm_point* c, void* arg, int err, comm_point_listen_for_rw(c, 0, 1); return 0; } else { + if(r == 0) + log_err("remote control connection closed prematurely"); + log_addr(1, "failed connection from", + &s->c->repinfo.addr, s->c->repinfo.addrlen); log_crypto_err("remote control failed ssl"); clean_point(rc, s); return 0; diff --git a/doc/Changelog b/doc/Changelog index 6353fd8da..a5aa2a0ed 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +22 July 2010: Wouter + - more error details on failed remote control connection. + 15 July 2010: Wouter - rlimit adjustments for select and ulimit can happen at the same time.