--------------------- PatchSet 3545 Date: 2002/01/06 13:48:40 Author: serassio Branch: nt-2_3 Tag: (none) Log: Backport of multiple little patches from HEAD Members: lib/rfc1035.c:1.1.1.1.4.3.2.1->1.1.1.1.4.3.2.2 snmplib/snmp_msg.c:1.1.1.1->1.1.1.1.70.1 src/dns_internal.c:1.1.1.1.4.6.2.7->1.1.1.1.4.6.2.8 src/enums.h:1.1.1.3.4.2.2.3->1.1.1.3.4.2.2.4 src/errorpage.c:1.1.1.3.4.3.2.2->1.1.1.3.4.3.2.3 src/ftp.c:1.1.1.3.4.3.2.4->1.1.1.3.4.3.2.5 src/snmp_core.c:1.1.1.3.4.1.2.5->1.1.1.3.4.1.2.6 src/url.c:1.1.1.3.4.4.2.5->1.1.1.3.4.4.2.6 Index: squid/lib/rfc1035.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/rfc1035.c,v retrieving revision 1.1.1.1.4.3.2.1 retrieving revision 1.1.1.1.4.3.2.2 diff -u -r1.1.1.1.4.3.2.1 -r1.1.1.1.4.3.2.2 --- squid/lib/rfc1035.c 6 Jan 2001 12:40:10 -0000 1.1.1.1.4.3.2.1 +++ squid/lib/rfc1035.c 6 Jan 2002 13:53:29 -0000 1.1.1.1.4.3.2.2 @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.1.1.1.4.3.2.1 2001/01/06 12:40:10 hno Exp $ + * $Id: rfc1035.c,v 1.1.1.1.4.3.2.2 2002/01/06 13:53:29 serassio Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -450,7 +450,10 @@ break; nr++; } - *records = recs; + if (nr > 0) + *records = recs; + else + free(recs); return nr; } Index: squid/snmplib/snmp_msg.c =================================================================== RCS file: /cvsroot/squid-sf//squid/snmplib/snmp_msg.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.70.1 diff -u -r1.1.1.1 -r1.1.1.1.70.1 --- squid/snmplib/snmp_msg.c 26 Jan 2000 03:21:47 -0000 1.1.1.1 +++ squid/snmplib/snmp_msg.c 6 Jan 2002 13:50:42 -0000 1.1.1.1.70.1 @@ -136,7 +136,7 @@ u_char *MsgPtr; int FakeArg = 1024; - snmplib_debug(4, "Buffer=%x BufLenP=%x, buflen=%d\n", Buffer, BufLenP, + snmplib_debug(4, "Buffer=%p BufLenP=%p, buflen=%d\n", Buffer, BufLenP, *BufLenP); /* Header for the entire thing, with a false, large length */ bufp = asn_build_header(Buffer, BufLenP, @@ -176,7 +176,7 @@ /* A nice header for this PDU. * Encoded with the wrong length. We'll fix it later. */ - snmplib_debug(8, "snmp_msg_Encode:Encoding PDU Header at 0x%x (fake len %d) (%d bytes so far)\n", + snmplib_debug(8, "snmp_msg_Encode:Encoding PDU Header at 0x%p (fake len %d) (%d bytes so far)\n", bufp, *BufLenP, *BufLenP); PDUHeaderPtr = bufp; bufp = asn_build_header(bufp, BufLenP, Index: squid/src/dns_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v retrieving revision 1.1.1.1.4.6.2.7 retrieving revision 1.1.1.1.4.6.2.8 diff -u -r1.1.1.1.4.6.2.7 -r1.1.1.1.4.6.2.8 --- squid/src/dns_internal.c 1 Sep 2001 15:08:11 -0000 1.1.1.1.4.6.2.7 +++ squid/src/dns_internal.c 6 Jan 2002 13:48:40 -0000 1.1.1.1.4.6.2.8 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.c,v 1.1.1.1.4.6.2.7 2001/09/01 15:08:11 serassio Exp $ + * $Id: dns_internal.c,v 1.1.1.1.4.6.2.8 2002/01/06 13:48:40 serassio Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -560,7 +560,7 @@ idnsSendQuery(q); } else { int v = cbdataValid(q->callback_data); - debug(78, 1) ("idnsCheckQueue: ID %x: giving up after %d tries and %5.1f seconds\n", + debug(78, 2) ("idnsCheckQueue: ID %x: giving up after %d tries and %5.1f seconds\n", (int) q->id, q->nsends, tvSubDsec(q->start_t, current_time)); cbdataUnlock(q->callback_data); @@ -594,15 +594,27 @@ { static int init = 0; if (DnsSocket < 0) { + int port; + struct in_addr addr; + if (Config.Addrs.udp_outgoing.s_addr != no_addr.s_addr) + addr = Config.Addrs.udp_outgoing; + else + addr = Config.Addrs.udp_incoming; DnsSocket = comm_open(SOCK_DGRAM, SQUID_IPPROTO_UDP, - Config.Addrs.udp_outgoing, + addr, 0, COMM_NONBLOCKING, "DNS Socket"); if (DnsSocket < 0) fatal("Could not create a DNS socket"); - debug(78, 1) ("DNS Socket created on FD %d\n", DnsSocket); + /* Ouch... we can't call functions using debug from a debug + * statement. Doing so messes up the internal _db_level + */ + port = comm_local_port(DnsSocket); + debug(78, 1) ("DNS Socket created at %s, port %d, FD %d\n", + inet_ntoa(addr), + port, DnsSocket); } assert(0 == nns); idnsParseNameservers(); Index: squid/src/enums.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/enums.h,v retrieving revision 1.1.1.3.4.2.2.3 retrieving revision 1.1.1.3.4.2.2.4 diff -u -r1.1.1.3.4.2.2.3 -r1.1.1.3.4.2.2.4 --- squid/src/enums.h 2 Dec 2001 20:36:47 -0000 1.1.1.3.4.2.2.3 +++ squid/src/enums.h 6 Jan 2002 13:48:40 -0000 1.1.1.3.4.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.1.1.3.4.2.2.3 2001/12/02 20:36:47 serassio Exp $ + * $Id: enums.h,v 1.1.1.3.4.2.2.4 2002/01/06 13:48:40 serassio Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -384,6 +384,7 @@ METHOD_BMOVE, METHOD_BDELETE, METHOD_BPROPFIND, + METHOD_BPROPPATCH, METHOD_SEARCH, METHOD_ENUM_END }; Index: squid/src/errorpage.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/errorpage.c,v retrieving revision 1.1.1.3.4.3.2.2 retrieving revision 1.1.1.3.4.3.2.3 diff -u -r1.1.1.3.4.3.2.2 -r1.1.1.3.4.3.2.3 --- squid/src/errorpage.c 29 Jul 2001 09:10:28 -0000 1.1.1.3.4.3.2.2 +++ squid/src/errorpage.c 6 Jan 2002 13:48:40 -0000 1.1.1.3.4.3.2.3 @@ -1,6 +1,6 @@ /* - * $Id: errorpage.c,v 1.1.1.3.4.3.2.2 2001/07/29 09:10:28 serassio Exp $ + * $Id: errorpage.c,v 1.1.1.3.4.3.2.3 2002/01/06 13:48:40 serassio Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -484,6 +484,7 @@ case 'L': if (Config.errHtmlText) { memBufPrintf(&mb, "%s", Config.errHtmlText); + do_quote = 0; } else p = "[not available]"; break; Index: squid/src/ftp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v retrieving revision 1.1.1.3.4.3.2.4 retrieving revision 1.1.1.3.4.3.2.5 diff -u -r1.1.1.3.4.3.2.4 -r1.1.1.3.4.3.2.5 --- squid/src/ftp.c 29 Sep 2001 07:58:59 -0000 1.1.1.3.4.3.2.4 +++ squid/src/ftp.c 6 Jan 2002 13:48:41 -0000 1.1.1.3.4.3.2.5 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.1.1.3.4.3.2.4 2001/09/29 07:58:59 serassio Exp $ + * $Id: ftp.c,v 1.1.1.3.4.3.2.5 2002/01/06 13:48:41 serassio Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -2533,7 +2533,7 @@ static void ftpAuthRequired(HttpReply * old_reply, request_t * request, const char *realm) { - ErrorState *err = errorCon(ERR_ACCESS_DENIED, HTTP_UNAUTHORIZED); + ErrorState *err = errorCon(ERR_CACHE_ACCESS_DENIED, HTTP_UNAUTHORIZED); HttpReply *rep; err->request = requestLink(request); rep = errorBuildReply(err); Index: squid/src/snmp_core.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/snmp_core.c,v retrieving revision 1.1.1.3.4.1.2.5 retrieving revision 1.1.1.3.4.1.2.6 diff -u -r1.1.1.3.4.1.2.5 -r1.1.1.3.4.1.2.6 --- squid/src/snmp_core.c 1 Sep 2001 15:08:12 -0000 1.1.1.3.4.1.2.5 +++ squid/src/snmp_core.c 6 Jan 2002 13:48:41 -0000 1.1.1.3.4.1.2.6 @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.c,v 1.1.1.3.4.1.2.5 2001/09/01 15:08:12 serassio Exp $ + * $Id: snmp_core.c,v 1.1.1.3.4.1.2.6 2002/01/06 13:48:41 serassio Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -724,7 +724,10 @@ *NextLen = mibTreeEntry->len; *Next = (*mibTreeEntry->instancefunction) (mibTreeEntry->name, NextLen, mibTreeEntry, &Fn); } - return (Fn); + if (*Next) + return (Fn); + else + return NULL; } static oid * Index: squid/src/url.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/url.c,v retrieving revision 1.1.1.3.4.4.2.5 retrieving revision 1.1.1.3.4.4.2.6 diff -u -r1.1.1.3.4.4.2.5 -r1.1.1.3.4.4.2.6 --- squid/src/url.c 2 Dec 2001 20:36:47 -0000 1.1.1.3.4.4.2.5 +++ squid/src/url.c 6 Jan 2002 13:48:41 -0000 1.1.1.3.4.4.2.6 @@ -1,6 +1,6 @@ /* - * $Id: url.c,v 1.1.1.3.4.4.2.5 2001/12/02 20:36:47 serassio Exp $ + * $Id: url.c,v 1.1.1.3.4.4.2.6 2002/01/06 13:48:41 serassio Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -57,6 +57,7 @@ "BMOVE", "BDELETE", "BPROPFIND", + "BPROPPATCH", "SEARCH", "ERROR" };