]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed a bug where --enable-useragent-log caused Squid to coredump unless
authorhno <>
Thu, 22 Jun 2000 02:34:37 +0000 (02:34 +0000)
committerhno <>
Thu, 22 Jun 2000 02:34:37 +0000 (02:34 +0000)
useragent_log was specified in squid.conf

src/useragent.cc

index be604f927b330a9ffadb5acda47d1dd7b8de0e88..3f978dd6902988b2a7d92e3a62e38ec757399e81 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: useragent.cc,v 1.20 2000/03/14 23:07:51 wessels Exp $
+ * $Id: useragent.cc,v 1.21 2000/06/21 20:34:37 hno Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey <ramey@csc.ti.com>
@@ -44,7 +44,7 @@ useragentOpenLog(void)
 {
 #if USE_USERAGENT_LOG
     assert(NULL == useragentlog);
-    if (0 == strcmp(Config.Log.useragent, "none")) {
+    if (!Config.Log.useragent || (0 == strcmp(Config.Log.useragent, "none"))) {
        debug(40, 1) ("User-Agent logging is disabled.\n");
        return;
     }