--------------------- PatchSet 5142 Date: 2002/09/26 13:44:40 Author: adri Branch: commloops Tag: (none) Log: Oops. I mis-read how the proxy connection stuff worked. Fix. :) Members: src/ssl.c:1.13.22.4->1.13.22.5 Index: squid/src/ssl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ssl.c,v retrieving revision 1.13.22.4 retrieving revision 1.13.22.5 diff -u -r1.13.22.4 -r1.13.22.5 --- squid/src/ssl.c 26 Sep 2002 13:34:25 -0000 1.13.22.4 +++ squid/src/ssl.c 26 Sep 2002 13:44:40 -0000 1.13.22.5 @@ -1,6 +1,6 @@ /* - * $Id: ssl.c,v 1.13.22.4 2002/09/26 13:34:25 adri Exp $ + * $Id: ssl.c,v 1.13.22.5 2002/09/26 13:44:40 adri Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -320,6 +320,27 @@ } } + +/* + * handle the write completion from a proxy request to an upstream proxy + */ +static void +sslProxyConnectedWriteDone(int fd, char *buf, size_t size, comm_err_t flag, void *data) +{ + SslStateData *sslState = data; + if (flag != COMM_OK) { + sslErrorComplete(fd, data, -1); + return; + } + if (cbdataReferenceValid(sslState)) { + assert(sslState->server.len == 0); + comm_read(sslState->server.fd, sslState->server.buf, SQUID_TCP_SO_RCVBUF, + sslReadServer, sslState); + comm_read(sslState->client.fd, sslState->client.buf, SQUID_TCP_SO_RCVBUF, + sslReadClient, sslState); + } +} + static void sslConnected(int fd, void *data) { @@ -514,9 +535,8 @@ packerClean(&p); memBufAppend(&mb, "\r\n", 2); - comm_write_mbuf(sslState->client.fd, mb, sslConnectedWriteDone, sslState); + comm_write_mbuf(sslState->server.fd, mb, sslProxyConnectedWriteDone, sslState); - memBufClean(&mb); commSetTimeout(sslState->server.fd, Config.Timeout.read, sslTimeout,