--------------------- PatchSet 11313 Date: 2007/03/08 11:37:45 Author: hno Branch: HEAD Tag: (none) Log: Handle bad results from concurrency enabled helpers in a better manner. was being misread as an invalid response on channel 0. Members: src/helper.c:1.62->1.63 Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid/squid/src/helper.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- squid/src/helper.c 8 Sep 2006 19:41:24 -0000 1.62 +++ squid/src/helper.c 8 Mar 2007 11:37:45 -0000 1.63 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.62 2006/09/08 19:41:24 serassio Exp $ + * $Id: helper.c,v 1.63 2007/03/08 11:37:45 hno Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -752,11 +752,17 @@ t[-1] = '\0'; *t++ = '\0'; if (hlp->concurrency) { + errno = 0; i = strtol(msg, &msg, 10); + if (errno) + i = -1; while (*msg && isspace((int) *msg)) msg++; } - r = srv->requests[i]; + if (i >= 0 && i < hlp->concurrency) + r = srv->requests[i]; + else + r = NULL; if (r) { srv->requests[i] = NULL; if (cbdataValid(r->data))