From: hno <> Date: Thu, 22 Jun 2000 02:34:37 +0000 (+0000) Subject: Fixed a bug where --enable-useragent-log caused Squid to coredump unless X-Git-Tag: SQUID_3_0_PRE1~1927 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed9d3e92d6e588cd7af5f6a23cdcd10d9eb99c73;p=thirdparty%2Fsquid.git Fixed a bug where --enable-useragent-log caused Squid to coredump unless useragent_log was specified in squid.conf --- diff --git a/src/useragent.cc b/src/useragent.cc index be604f927b..3f978dd690 100644 --- a/src/useragent.cc +++ b/src/useragent.cc @@ -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 @@ -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; }