--------------------- PatchSet 7123 Date: 2005/10/23 14:55:57 Author: adri Branch: tidyup_deferred_reads Tag: (none) Log: Exam avoidance! start working on refactoring the SSL code to test our delay pools + deferred read replacement. This modification just breaks the server read IO, which is the target of the Deferred read handler, into a seperate function. The code should behave the same as before the commit. Members: src/ssl.c:1.13.6.7.12.1->1.13.6.7.12.2 Index: squid/src/ssl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ssl.c,v retrieving revision 1.13.6.7.12.1 retrieving revision 1.13.6.7.12.2 diff -u -r1.13.6.7.12.1 -r1.13.6.7.12.2 --- squid/src/ssl.c 27 Sep 2005 04:57:14 -0000 1.13.6.7.12.1 +++ squid/src/ssl.c 23 Oct 2005 14:55:57 -0000 1.13.6.7.12.2 @@ -1,6 +1,6 @@ /* - * $Id: ssl.c,v 1.13.6.7.12.1 2005/09/27 04:57:14 adri Exp $ + * $Id: ssl.c,v 1.13.6.7.12.2 2005/10/23 14:55:57 adri Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -144,6 +144,21 @@ } #endif +/* + * The SSL stuff has a defer handler but only if delay pools + * is compiled in. This gives us the oppertunity to test out + * using the delayed read stuff to schedule/reschedule reads. + */ +static void +sslScheduleServerRead(SslStateData *sslState) +{ + commSetSelect(sslState->server.fd, + COMM_SELECT_READ, + sslReadServer, + sslState, + Config.Timeout.read); +} + static void sslSetSelect(SslStateData * sslState) { @@ -189,11 +204,7 @@ #endif if (sslState->server.len < read_sz) { /* Have room to read more */ - commSetSelect(sslState->server.fd, - COMM_SELECT_READ, - sslReadServer, - sslState, - Config.Timeout.read); + sslScheduleServerRead(sslState); } } else if (sslState->server.len == 0 && sslState->client.fd > -1) { comm_close(sslState->client.fd);