--------------------- PatchSet 2352 Date: 2001/05/17 23:23:16 Author: rbcollins Branch: ntlm Tag: (none) Log: better code comments Members: src/helper.c:1.1.1.3.12.22->1.1.1.3.12.23 Index: squid/src/helper.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/helper.c,v retrieving revision 1.1.1.3.12.22 retrieving revision 1.1.1.3.12.23 diff -u -r1.1.1.3.12.22 -r1.1.1.3.12.23 --- squid/src/helper.c 23 Apr 2001 08:50:09 -0000 1.1.1.3.12.22 +++ squid/src/helper.c 17 May 2001 23:23:16 -0000 1.1.1.3.12.23 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.1.1.3.12.22 2001/04/23 08:50:09 rbcollins Exp $ + * $Id: helper.c,v 1.1.1.3.12.23 2001/05/17 23:23:16 rbcollins Exp $ * * DEBUG: section 29 Helper process maintenance * AUTHOR: Harvest Derived? @@ -235,6 +235,9 @@ debug(29, 9) ("helperSubmit: %s\n", buf); } +/* lastserver = "server last used as part of a deferred or reserved + * request sequence" + */ void helperStatefulSubmit(statefulhelper * hlp, const char *buf, HLPSCB * callback, void *data, helper_stateful_server * lastserver) { @@ -990,24 +993,22 @@ debug(29, 9) ("helperStatefulDispatch busying helper %s #%d\n", hlp->id_name, srv->index + 1); if (r->placeholder == 1) { /* a callback is needed before this request can _use_ a helper. */ - if (cbdataValid(r->data)) { - /* we don't care about releasing/deferring this helper. The request NEVER - * gets to the helper. So we throw away the return code */ - r->callback(r->data, srv, NULL); - /* throw away the placeholder */ - helperStatefulRequestFree(r); - /* and push the queue. Note that the callback may have call submit again - - * which is why we test for the request*/ - if (srv->request == NULL) { - if (srv->flags.shutdown) { - comm_close(srv->wfd); - srv->wfd = -1; - } else { - if (srv->queue.head) - helperStatefulServerKickQueue(srv); - else - helperStatefulKickQueue(hlp); - } + /* we don't care about releasing/deferring this helper. The request NEVER + * gets to the helper. So we throw away the return code */ + r->callback(r->data, srv, NULL); + /* throw away the placeholder */ + helperStatefulRequestFree(r); + /* and push the queue. Note that the callback may have submitted a new + * request to the helper which is why we test for the request*/ + if (srv->request == NULL) { + if (srv->flags.shutdown) { + comm_close(srv->wfd); + srv->wfd = -1; + } else { + if (srv->queue.head) + helperStatefulServerKickQueue(srv); + else + helperStatefulKickQueue(hlp); } } return;