From: Christos Tsantilas Date: Mon, 4 Feb 2013 17:17:38 +0000 (+0200) Subject: Squid BIO related fixes X-Git-Tag: SQUID_3_5_0_1~89^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54f3b0328fb03338d99ffbf2dd81d1d54133a574;p=thirdparty%2Fsquid.git Squid BIO related fixes - Do not close the filedescriptor inside Ssl::Bio::~Bio() destructor The callers do conn->close() - Fix the BIO_CTRL_DUP control command to return 0. This command duplicates the current bio. It should be implemented if the SSL_dup OpenSSL function used anywhere inside squid. --- diff --git a/src/ssl/bio.cc b/src/ssl/bio.cc index f7a7be8086..1bee31cbb9 100644 --- a/src/ssl/bio.cc +++ b/src/ssl/bio.cc @@ -75,8 +75,6 @@ Ssl::Bio::Bio(const int anFd): fd_(anFd) Ssl::Bio::~Bio() { debugs(83, 7, "Bio destructing, this=" << this << " FD " << fd_); - // XXX: seems wrong: we do not own this fd and callers do conn->close()! - comm_close(fd_); } int Ssl::Bio::write(const char *buf, int size, BIO *table) @@ -215,7 +213,11 @@ squid_bio_ctrl(BIO *table, int cmd, long arg1, void *arg2) } return -1; - case BIO_CTRL_DUP: // XXX: Should this really do what FLUSH does? + case BIO_CTRL_DUP: + // Should implemented if the SSL_dup openSSL API function + // used anywhere in squid. + return 0; + case BIO_CTRL_FLUSH: if (table->init) { Ssl::Bio *bio = static_cast(table->ptr);