--------------------- PatchSet 6117 Date: 2004/01/13 15:24:10 Author: rhorstmann Branch: icap-2_5 Tag: (none) Log: adjusted some debug statements to make it easier to track down icap server reachability-related problems. Members: src/icap_common.c:1.1.2.26->1.1.2.27 src/icap_opt.c:1.1.2.8->1.1.2.9 src/icap_respmod.c:1.1.2.29->1.1.2.30 Index: squid/src/icap_common.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_common.c,v retrieving revision 1.1.2.26 retrieving revision 1.1.2.27 diff -u -r1.1.2.26 -r1.1.2.27 --- squid/src/icap_common.c 5 Dec 2003 18:00:52 -0000 1.1.2.26 +++ squid/src/icap_common.c 13 Jan 2004 15:24:10 -0000 1.1.2.27 @@ -1,5 +1,5 @@ /* - * $Id: icap_common.c,v 1.1.2.26 2003/12/05 18:00:52 rhorstmann Exp $ + * $Id: icap_common.c,v 1.1.2.27 2004/01/13 15:24:10 rhorstmann Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -268,7 +268,7 @@ icapConnectTimeout(int fd, void *data) { IcapStateData *icap = data; - debug(17, 2) ("icapConnectTimeout: FD %d\n", fd); + debug(81, 3) ("icapConnectTimeout: FD %d, unreachable=1\n", fd); assert(fd == icap->icap_fd); icapOptSetUnreachable(icap->current_service); comm_close(fd); @@ -278,7 +278,7 @@ icapReadTimeout(int fd, void *data) { IcapStateData *icap = data; - debug(17, 2) ("icapReadTimeout: FD %d\n", fd); + debug(81, 3) ("icapReadTimeout: FD %d, unreachable=1\n", fd); assert(fd == icap->icap_fd); icapOptSetUnreachable(icap->current_service); comm_close(fd); Index: squid/src/icap_opt.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_opt.c,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -u -r1.1.2.8 -r1.1.2.9 --- squid/src/icap_opt.c 28 Nov 2003 13:47:18 -0000 1.1.2.8 +++ squid/src/icap_opt.c 13 Jan 2004 15:24:10 -0000 1.1.2.9 @@ -1,6 +1,6 @@ /* - * $Id: icap_opt.c,v 1.1.2.8 2003/11/28 13:47:18 rhorstmann Exp $ + * $Id: icap_opt.c,v 1.1.2.9 2004/01/13 15:24:10 rhorstmann Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client OPTIONS * AUTHOR: Ralf Horstmann @@ -97,6 +97,7 @@ icapOptSetUnreachable(icap_service * s) { s->unreachable = 1; + debug(81,5)("icapOptSetUnreachable: got called for %s\n", s->uri); /* * if there is an options request scheduled, delete it and add * it again to reset the time to the default check_interval. @@ -156,7 +157,7 @@ icapOptDataFree(i); s->opt = NULL; s->unreachable = 1; - debug(81, 8) ("icapOptConnectTimeout: unreachable=1, service=%s\n", s->uri); + debug(81, 3) ("icapOptConnectTimeout: unreachable=1, service=%s\n", s->uri); eventAdd("icapOptStart", icapOptStart, s, Config.icapcfg.check_interval, 1); } @@ -223,7 +224,7 @@ } if (errflag) { /* cancel this for now */ - debug(81, 5) ("icapOptWriteComplete: unreachable=1, service=%s\n", s->uri); + debug(81, 3) ("icapOptWriteComplete: unreachable=1, service=%s\n", s->uri); icapOptDataFree(i); s->opt = NULL; s->unreachable = 1; @@ -282,7 +283,7 @@ /* no more data, now we can parse the reply */ debug(81, 3) ("icapOptReadReply: FD %d: connection closed\n", fd); i->buf[i->offset] = '\0'; /* for string functions */ - debug(81, 3) ("icapOptReadReply: reachable=0, service=%s\n", s->uri); + debug(81, 3) ("icapOptReadReply: unreachable=0, service=%s\n", s->uri); s->unreachable = 0; if (icapOptParseReply(s, i->buf) && s->options_ttl > 0) { debug(81, 3) ("icapOptReadReply: OPTIONS request successful. scheduling again in %d seconds\n", s->options_ttl); Index: squid/src/icap_respmod.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_respmod.c,v retrieving revision 1.1.2.29 retrieving revision 1.1.2.30 diff -u -r1.1.2.29 -r1.1.2.30 --- squid/src/icap_respmod.c 1 Dec 2003 14:23:45 -0000 1.1.2.29 +++ squid/src/icap_respmod.c 13 Jan 2004 15:24:10 -0000 1.1.2.30 @@ -1,6 +1,6 @@ /* - * $Id: icap_respmod.c,v 1.1.2.29 2003/12/01 14:23:45 rhorstmann Exp $ + * $Id: icap_respmod.c,v 1.1.2.30 2004/01/13 15:24:10 rhorstmann Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -583,6 +583,7 @@ err->request = requestLink(icap->request); errorAppendEntry(icap->respmod.entry, err); comm_close(fd); + debug(81,3) ("icapConnectOver: status < 0, unreachable=1\n"); icapOptSetUnreachable(icap->current_service); return; }