diff -u -r -N squid-3.0.STABLE9/ChangeLog squid-3.0.STABLE10/ChangeLog
--- squid-3.0.STABLE9/ChangeLog	2008-09-10 04:06:36.000000000 +1200
+++ squid-3.0.STABLE10/ChangeLog	2008-10-15 00:22:20.000000000 +1300
@@ -1,3 +1,12 @@
+Changes to squid-3.0.STABLE10 (14 Oct 2008):
+
+	- Bug 2391: Regression: bad assert in forwarding
+	- Bug 2447: Segfault on failed TCP DNS query
+	- Bug 2393: DNS requests getting stuck in idns queue
+	- Bug 2433: FTP PUT gives bad gateway
+	- Bug 2465: Limited DragonflyBSD support
+	- ... and other minor bugs and documentation
+
 Changes to squid-3.0.STABLE9 (9 Sep 2008):
 
 	- Policy Enforcement: COSS is unusable in 3.0
diff -u -r -N squid-3.0.STABLE9/configure squid-3.0.STABLE10/configure
--- squid-3.0.STABLE9/configure	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/configure	2008-10-15 00:22:33.000000000 +1300
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.in Revision: 1.488.2.3 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for Squid Web Proxy 3.0.STABLE9.
+# Generated by GNU Autoconf 2.61 for Squid Web Proxy 3.0.STABLE10.
 #
 # Report bugs to <http://www.squid-cache.org/bugs/>.
 #
@@ -729,8 +729,8 @@
 # Identity of this package.
 PACKAGE_NAME='Squid Web Proxy'
 PACKAGE_TARNAME='squid'
-PACKAGE_VERSION='3.0.STABLE9'
-PACKAGE_STRING='Squid Web Proxy 3.0.STABLE9'
+PACKAGE_VERSION='3.0.STABLE10'
+PACKAGE_STRING='Squid Web Proxy 3.0.STABLE10'
 PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/'
 
 ac_unique_file="src/main.cc"
@@ -1509,7 +1509,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Squid Web Proxy 3.0.STABLE9 to adapt to many kinds of systems.
+\`configure' configures Squid Web Proxy 3.0.STABLE10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1579,7 +1579,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE9:";;
+     short | recursive ) echo "Configuration of Squid Web Proxy 3.0.STABLE10:";;
    esac
   cat <<\_ACEOF
 
@@ -1666,7 +1666,7 @@
   --enable-ssl            Enable ssl gatewaying support using OpenSSL
   --enable-forw-via-db    Enable Forw/Via database
   --enable-cache-digests  Use Cache Digests
-                          see http://www.squid-cache.org/FAQ/FAQ-16.html
+                          see http://wiki.squid-cache.org/SquidFaq/CacheDigests
   --enable-default-err-language=lang
                           Select default language for Error pages (see
                           errors directory)
@@ -1888,7 +1888,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Squid Web Proxy configure 3.0.STABLE9
+Squid Web Proxy configure 3.0.STABLE10
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1902,7 +1902,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Squid Web Proxy $as_me 3.0.STABLE9, which was
+It was created by Squid Web Proxy $as_me 3.0.STABLE10, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2576,7 +2576,7 @@
 
 # Define the identity of the package.
  PACKAGE='squid'
- VERSION='3.0.STABLE9'
+ VERSION='3.0.STABLE10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -45270,7 +45270,7 @@
 if test "$SQUID_MAXFD" -lt 512 ; then
     echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
     echo "         cache will be very busy.  Please see the FAQ page"
-    echo "         http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors"
+    echo "         http://wiki.squid-cache.org/SquidFaq/TroubleShooting"
     echo "         on how to increase your filedescriptor limit"
     sleep 10
 fi
@@ -46797,7 +46797,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Squid Web Proxy $as_me 3.0.STABLE9, which was
+This file was extended by Squid Web Proxy $as_me 3.0.STABLE10, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -46850,7 +46850,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-Squid Web Proxy config.status 3.0.STABLE9
+Squid Web Proxy config.status 3.0.STABLE10
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff -u -r -N squid-3.0.STABLE9/configure.in squid-3.0.STABLE10/configure.in
--- squid-3.0.STABLE9/configure.in	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/configure.in	2008-10-15 00:22:33.000000000 +1300
@@ -5,7 +5,7 @@
 dnl
 dnl
 dnl
-AC_INIT(Squid Web Proxy, 3.0.STABLE9, http://www.squid-cache.org/bugs/, squid)
+AC_INIT(Squid Web Proxy, 3.0.STABLE10, http://www.squid-cache.org/bugs/, squid)
 AC_PREREQ(2.52)
 AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
@@ -935,7 +935,7 @@
 
 AC_ARG_ENABLE(cache-digests,
 [  --enable-cache-digests  Use Cache Digests
-                          see http://www.squid-cache.org/FAQ/FAQ-16.html],
+                          see http://wiki.squid-cache.org/SquidFaq/CacheDigests],
 [ if test "$enableval" = "yes" ; then
     echo "USE_CACHE_DIGESTS enabled"
     AC_DEFINE(USE_CACHE_DIGESTS,1,[Use Cache Digests for locating objects in neighbor caches.  This code is still semi-experimental.])
@@ -3051,7 +3051,7 @@
 if test "$SQUID_MAXFD" -lt 512 ; then
     echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
     echo "         cache will be very busy.  Please see the FAQ page"
-    echo "         http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors"
+    echo "         http://wiki.squid-cache.org/SquidFaq/TroubleShooting"
     echo "         on how to increase your filedescriptor limit"
     sleep 10
 fi
diff -u -r -N squid-3.0.STABLE9/helpers/ntlm_auth/fakeauth/fakeauth_auth.c squid-3.0.STABLE10/helpers/ntlm_auth/fakeauth/fakeauth_auth.c
--- squid-3.0.STABLE9/helpers/ntlm_auth/fakeauth/fakeauth_auth.c	2008-09-10 04:06:41.000000000 +1200
+++ squid-3.0.STABLE10/helpers/ntlm_auth/fakeauth/fakeauth_auth.c	2008-10-15 00:22:29.000000000 +1300
@@ -428,7 +428,10 @@
 	    } else
 		SEND2("TT %s", data);
 	} else if (strncasecmp(buf, "KK ", 3) == 0) {
-	    if (!ntlmCheckHeader((ntlmhdr *) decoded, NTLM_AUTHENTICATE)) {
+            if(!decoded) {
+                SEND2("BH received KK with no data! user=%s", user);
+            }
+	    else if (!ntlmCheckHeader((ntlmhdr *) decoded, NTLM_AUTHENTICATE)) {
 		if (!ntlmDecodeAuth((struct ntlm_authenticate *) decoded, user, 256)) {
 		    lc(user);
 		    if (strip_domain_enabled) {
diff -u -r -N squid-3.0.STABLE9/include/config.h squid-3.0.STABLE10/include/config.h
--- squid-3.0.STABLE9/include/config.h	2008-09-10 04:06:41.000000000 +1200
+++ squid-3.0.STABLE10/include/config.h	2008-10-15 00:22:29.000000000 +1300
@@ -111,6 +111,9 @@
 #elif defined(__OpenBSD__)
 #define _SQUID_OPENBSD_
 
+#elif defined(__DragonFly__)
+#define _SQUID_DRAGONFLY_
+
 #elif defined(__CYGWIN32__)  || defined(__CYGWIN__)
 #define _SQUID_CYGWIN_
 #define _SQUID_WIN32_
@@ -340,7 +343,7 @@
 /* 
  * Don't allow inclusion of malloc.h on FreeBSD, Next and OpenBSD 
  */
-#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_))
+#if defined(HAVE_MALLOC_H) && (defined(_SQUID_FREEBSD_) || defined(_SQUID_NEXT_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_))
 #undef HAVE_MALLOC_H
 #endif
 
diff -u -r -N squid-3.0.STABLE9/include/version.h squid-3.0.STABLE10/include/version.h
--- squid-3.0.STABLE9/include/version.h	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/include/version.h	2008-10-15 00:22:33.000000000 +1300
@@ -9,5 +9,5 @@
  */
 
 #ifndef SQUID_RELEASE_TIME
-#define SQUID_RELEASE_TIME 1220976395
+#define SQUID_RELEASE_TIME 1223983338
 #endif
diff -u -r -N squid-3.0.STABLE9/RELEASENOTES.html squid-3.0.STABLE10/RELEASENOTES.html
--- squid-3.0.STABLE9/RELEASENOTES.html	2008-09-10 04:07:36.000000000 +1200
+++ squid-3.0.STABLE10/RELEASENOTES.html	2008-10-15 00:23:23.000000000 +1300
@@ -2,10 +2,10 @@
 <HTML>
 <HEAD>
  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
- <TITLE>Squid 3.0.STABLE8 release notes</TITLE>
+ <TITLE>Squid 3.0.STABLE10 release notes</TITLE>
 </HEAD>
 <BODY>
-<H1>Squid 3.0.STABLE8 release notes</H1>
+<H1>Squid 3.0.STABLE10 release notes</H1>
 
 <H2>Squid Developers</H2>$Id: release-3.0.sgml,v 1.30.2.5 2008/02/28 00:26:31 amosjeffries Exp $
 <HR>
@@ -15,7 +15,7 @@
 <HR>
 <H2><A NAME="s1">1. Notice</A></H2>
 
-<P>The Squid Team are pleased to announce the release of Squid-3.0.STABLE8.</P>
+<P>The Squid Team are pleased to announce the release of Squid-3.0.STABLE10.</P>
 <P>This new release is available for download from 
 <A HREF="http://www.squid-cache.org/Versions/v3/3.0/">http://www.squid-cache.org/Versions/v3/3.0/</A> or the 
 <A HREF="http://www.squid-cache.org/Mirrors/http-mirrors.html">mirrors</A>.</P>
diff -u -r -N squid-3.0.STABLE9/src/ACLARP.cc squid-3.0.STABLE10/src/ACLARP.cc
--- squid-3.0.STABLE9/src/ACLARP.cc	2008-09-10 04:06:42.000000000 +1200
+++ squid-3.0.STABLE10/src/ACLARP.cc	2008-10-15 00:22:30.000000000 +1300
@@ -67,7 +67,7 @@
 #endif
 #include <net/route.h>
 #include <net/if.h>
-#if defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_)
+#if defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_)
 #include <net/if_arp.h>
 #endif
 #if HAVE_NETINET_IF_ETHER_H
@@ -438,7 +438,7 @@
         return (0 == splayLastResult);
     }
 
-#elif defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_)
+#elif defined(_SQUID_FREEBSD_) || defined(_SQUID_NETBSD_) || defined(_SQUID_OPENBSD_) || defined(_SQUID_DRAGONFLY_)
 
     struct arpreq arpReq;
 
diff -u -r -N squid-3.0.STABLE9/src/cf.data.pre squid-3.0.STABLE10/src/cf.data.pre
--- squid-3.0.STABLE9/src/cf.data.pre	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/cf.data.pre	2008-10-15 00:22:31.000000000 +1300
@@ -871,6 +871,12 @@
 
 	If you set this parameter none (the default), there will be
 	no limit imposed.
+
+	Configuration Format is:
+		reply_body_max_size SIZE UNITS [acl ...]
+	ie.
+		reply_body_max_size 10 MB
+
 DOC_END
 
 COMMENT_START
diff -u -r -N squid-3.0.STABLE9/src/comm_select_win32.cc squid-3.0.STABLE10/src/comm_select_win32.cc
--- squid-3.0.STABLE9/src/comm_select_win32.cc	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/comm_select_win32.cc	2008-10-15 00:22:31.000000000 +1300
@@ -684,15 +684,6 @@
     statHistCount(&statCounter.comm_dns_incoming, nevents);
 }
 
-static void
-commSelectRegisterWithCacheManager(void)
-{
-    CacheManager::GetInstance()->
-            registerAction("comm_select_incoming",
-                           "comm_incoming() stats",
-                           commIncomingStats, 0, 1);
-}
-
 void
 comm_select_init(void)
 {
diff -u -r -N squid-3.0.STABLE9/src/dns_internal.cc squid-3.0.STABLE10/src/dns_internal.cc
--- squid-3.0.STABLE9/src/dns_internal.cc	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/dns_internal.cc	2008-10-15 00:22:32.000000000 +1300
@@ -105,8 +105,8 @@
     int need_vc;
 
     struct timeval start_t;
-
     struct timeval sent_t;
+    struct timeval queue_t;
     dlink_node lru;
     IDNSCB *callback;
     void *callback_data;
@@ -715,6 +715,7 @@
     nsvc * vc = (nsvc *)data;
 
     if (status != COMM_OK) {
+        debugs(78, 1, "idnsInitVCConnected: Failed to connect to nameserver " << inet_ntoa(nameservers[vc->ns].S.sin_addr) << " using TCP!");
         comm_close(fd);
         return;
     }
@@ -739,6 +740,7 @@
 {
     nsvc *vc = cbdataAlloc(nsvc);
     nameservers[ns].vc = vc;
+    vc->ns = ns;
 
     struct IN_ADDR addr;
 
@@ -776,6 +778,11 @@
 
     nsvc *vc = nameservers[ns].vc;
 
+    if (!vc) {
+        debugs(78, 1, "idnsSendQuery: Failed to initiate TCP connection to nameserver " << inet_ntoa(nameservers[ns].S.sin_addr) << "!");
+        return;
+    }
+
     vc->queue->reset();
 
     short head = htons(q->sz);
@@ -817,7 +824,7 @@
 
         q->nsends++;
 
-        q->sent_t = current_time;
+        q->queue_t = q->sent_t = current_time;
 
         if (x < 0)
             debugs(50, 1, "idnsSendQuery: FD " << DnsSocket << ": sendto: " << xstrerror());
@@ -830,6 +837,7 @@
     }
 
     nameservers[ns].nqueries++;
+    q->queue_t = current_time;
     dlinkAdd(q, &q->lru, &lru_list);
     idnsTickleQueue();
 }
@@ -1095,20 +1103,29 @@
     idns_query *q;
     event_queued = 0;
 
+    if (0 == nns)
+        /* name servers went away; reconfiguring or shutting down */
+        return;
+
     for (n = lru_list.tail; n; n = p) {
-        if (0 == nns)
-            /* name servers went away; reconfiguring or shutting down */
-            break;
 
-        q = (idns_query *)n->data;
+        p = n->prev;
+        q = static_cast<idns_query*>(n->data);
 
-        if (tvSubDsec(q->sent_t, current_time) < Config.Timeout.idns_retransmit * (1 << (q->nsends - 1) % nns))
-            break;
+        /* Anything to process in the queue? */
+        if (tvSubDsec(q->queue_t, current_time) < Config.Timeout.idns_retransmit )
+ 	    break;
+
+        /* Query timer expired? */
+        if (tvSubDsec(q->sent_t, current_time) < Config.Timeout.idns_retransmit * 1 << ((q->nsends - 1) / nns)) {
+            dlinkDelete(&q->lru, &lru_list);
+            q->queue_t = current_time;
+            dlinkAdd(q, &q->lru, &lru_list);
+            continue;
+        }
 
         debugs(78, 3, "idnsCheckQueue: ID 0x" << std::hex << std::setfill('0') << std::setw(4) << q->id << "timeout" );
 
-        p = n->prev;
-
         dlinkDelete(&q->lru, &lru_list);
 
         if (tvSubDsec(q->start_t, current_time) < Config.Timeout.idns_query) {
diff -u -r -N squid-3.0.STABLE9/src/forward.cc squid-3.0.STABLE10/src/forward.cc
--- squid-3.0.STABLE9/src/forward.cc	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/forward.cc	2008-10-15 00:22:32.000000000 +1300
@@ -697,7 +697,7 @@
 
         ErrorState *anErr = errorCon(ERR_DNS_FAIL, HTTP_SERVICE_UNAVAILABLE, request);
 
-        anErr->dnsserver_msg = xstrdup(dns_error_message);
+        anErr->dnsserver_msg = xstrdup(dns_error_message_safe());
 
         fail(anErr);
 
@@ -1205,12 +1205,9 @@
     FwdServer *fs = servers;
     assert(fs);
 
-    // some callers use one condition, some use the other; are they the same?
-    assert((fs->code == HIER_DIRECT) == !fs->_peer);
-
     const char *nextHop = NULL;
 
-    if (fs->_peer) { 
+    if (fs->_peer) {
         // went to peer, log peer host name
         nextHop = fs->_peer->name;
     } else {
@@ -1221,7 +1218,7 @@
         nextHop = fd_table[server_fd].ipaddr;
         if (!Config.onoff.log_ip_on_direct || !nextHop[0])
             nextHop = request->host; // domain name
-	}
+    }
 
     assert(nextHop);
     hierarchyNote(&request->hier, fs->code, nextHop);
diff -u -r -N squid-3.0.STABLE9/src/fqdncache.cc squid-3.0.STABLE10/src/fqdncache.cc
--- squid-3.0.STABLE9/src/fqdncache.cc	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/fqdncache.cc	2008-10-15 00:22:32.000000000 +1300
@@ -823,3 +823,14 @@
 }
 
 #endif /*SQUID_SNMP */
+
+/// XXX: a hack to work around the missing DNS error info
+// see http://www.squid-cache.org/bugs/show_bug.cgi?id=2459
+const char *
+dns_error_message_safe()
+{
+    if (dns_error_message)
+		return dns_error_message;
+	debugs(35,1, "Internal error: lost DNS error info");
+	return "lost DNS error";
+}
diff -u -r -N squid-3.0.STABLE9/src/ftp.cc squid-3.0.STABLE10/src/ftp.cc
--- squid-3.0.STABLE9/src/ftp.cc	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/ftp.cc	2008-10-15 00:22:32.000000000 +1300
@@ -3352,8 +3352,12 @@
 void
 FtpStateData::doneSendingRequestBody()
 {
-    debugs(9,3,HERE << "doneSendingRequestBody");
-    ftpWriteTransferDone(this);
+    debugs(9,3,HERE);
+    dataComplete();
+/* NP: RFC 959  3.3.  DATA CONNECTION MANAGEMENT
+ * if transfer type is 'stream' call dataComplete()
+ * otherwise leave open. (reschedule control channel read?)
+ */
 }
 
 // a hack to ensure we do not double-complete on the forward entry.
diff -u -r -N squid-3.0.STABLE9/src/protos.h squid-3.0.STABLE10/src/protos.h
--- squid-3.0.STABLE9/src/protos.h	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/src/protos.h	2008-10-15 00:22:32.000000000 +1300
@@ -135,6 +135,8 @@
 SQUIDCEXTERN void dnsInit(void);
 extern void dnsRegisterWithCacheManager(CacheManager & manager);
 SQUIDCEXTERN void dnsSubmit(const char *lookup, HLPCB * callback, void *data);
+/// XXX: a temporary hack to work around the missing DNS error info
+const char *dns_error_message_safe();
 
 /* dns_internal.c */
 SQUIDCEXTERN void idnsInit(void);
diff -u -r -N squid-3.0.STABLE9/src/store_client.cc squid-3.0.STABLE10/src/store_client.cc
--- squid-3.0.STABLE9/src/store_client.cc	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/src/store_client.cc	2008-10-15 00:22:32.000000000 +1300
@@ -143,13 +143,10 @@
 void
 store_client::callback(ssize_t sz, bool error)
 {
-    StoreIOBuffer result (sz, 0 ,copyInto.data);
+    StoreIOBuffer result(sz, 0 ,copyInto.data);
 
-    if (sz < 0) {
+    if (error) {
         result.flags.error = 1;
-        result.length = 0;
-    } else {
-        result.flags.error = error ? 1 : 0;
     }
 
     result.offset = cmp_offset;
diff -u -r -N squid-3.0.STABLE9/src/StoreIOBuffer.h squid-3.0.STABLE10/src/StoreIOBuffer.h
--- squid-3.0.STABLE9/src/StoreIOBuffer.h	2008-09-10 04:06:44.000000000 +1200
+++ squid-3.0.STABLE10/src/StoreIOBuffer.h	2008-10-15 00:22:31.000000000 +1300
@@ -43,12 +43,20 @@
 {
 
 public:
-    StoreIOBuffer():length(0), offset (0), data (NULL){flags.error = 0;}
+    StoreIOBuffer():length(0), offset (0), data (NULL) {flags.error = 0;}
 
     StoreIOBuffer(size_t aLength, int64_t anOffset, char *someData) :
-            length (aLength), offset (anOffset), data (someData)
+            offset (anOffset), data (someData)
     {
-        flags.error = 0;
+        /* maintain own state: detect size errors now */
+        if (aLength <0) {
+            flags.error = 1;
+            length = 0;
+        }
+        else {
+            flags.error = 0;
+            length = aLength;
+        }
     }
 
     /* Create a StoreIOBuffer from a MemBuf and offset */
diff -u -r -N squid-3.0.STABLE9/src/store_log.cc squid-3.0.STABLE10/src/store_log.cc
--- squid-3.0.STABLE9/src/store_log.cc	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/src/store_log.cc	2008-10-15 00:22:32.000000000 +1300
@@ -127,7 +127,7 @@
 void
 storeLogOpen(void)
 {
-    if (strcmp(Config.Log.store, "none") == 0) {
+    if (Config.Log.store == NULL || strcmp(Config.Log.store, "none") == 0) {
         debugs(20, 1, "Store logging disabled");
         return;
     }
diff -u -r -N squid-3.0.STABLE9/src/tunnel.cc squid-3.0.STABLE10/src/tunnel.cc
--- squid-3.0.STABLE9/src/tunnel.cc	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/src/tunnel.cc	2008-10-15 00:22:32.000000000 +1300
@@ -568,7 +568,7 @@
         debugs(26, 4, "tunnelConnect: Unknown host: " << tunnelState->host);
         err = errorCon(ERR_DNS_FAIL, HTTP_NOT_FOUND, request);
         *tunnelState->status_ptr = HTTP_NOT_FOUND;
-        err->dnsserver_msg = xstrdup(dns_error_message);
+        err->dnsserver_msg = xstrdup(dns_error_message_safe());
         err->callback = tunnelErrorComplete;
         err->callback_data = tunnelState;
         errorSend(tunnelState->client.fd(), err);
diff -u -r -N squid-3.0.STABLE9/src/url.cc squid-3.0.STABLE10/src/url.cc
--- squid-3.0.STABLE9/src/url.cc	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/src/url.cc	2008-10-15 00:22:32.000000000 +1300
@@ -647,7 +647,7 @@
 URLHostName::init(char const *aUrl)
 {
     Host[0] = '\0';
-    url = url;
+    url = aUrl;
 }
 
 void
diff -u -r -N squid-3.0.STABLE9/tools/Makefile.am squid-3.0.STABLE10/tools/Makefile.am
--- squid-3.0.STABLE9/tools/Makefile.am	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/tools/Makefile.am	2008-10-15 00:22:33.000000000 +1300
@@ -23,6 +23,8 @@
 libexec_PROGRAMS = \
 	cachemgr$(CGIEXT)
 
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
+
 squidclient_SOURCES = squidclient.cc
 cachemgr__CGIEXT__SOURCES = cachemgr.cc
 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
@@ -32,8 +34,6 @@
 EXTRA_DIST = \
 	cachemgr.conf
 
-DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
-
 $(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h
 
 install-data-local:
diff -u -r -N squid-3.0.STABLE9/tools/Makefile.in squid-3.0.STABLE10/tools/Makefile.in
--- squid-3.0.STABLE9/tools/Makefile.in	2008-09-10 04:06:45.000000000 +1200
+++ squid-3.0.STABLE10/tools/Makefile.in	2008-10-15 00:22:33.000000000 +1300
@@ -318,6 +318,7 @@
 	@SQUID_CPPUNIT_INC@ $(am__empty)
 TESTS = $(check_PROGRAMS)
 SUBDIRS = 
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
 squidclient_SOURCES = squidclient.cc
 cachemgr__CGIEXT__SOURCES = cachemgr.cc
 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
@@ -325,7 +326,6 @@
 EXTRA_DIST = \
 	cachemgr.conf
 
-DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
 
 # Don't automatically uninstall config files
 #	@if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \
