]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix eCAP build failure with --disable-auth
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 10 Oct 2011 03:27:47 +0000 (21:27 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 10 Oct 2011 03:27:47 +0000 (21:27 -0600)
src/adaptation/ecap/XactionRep.cc

index f2a97267e2dd51e8a47a0c906fb2c4675e10593a..7e6888e041aa79514f6535c2bd81e9ae5ea1b3e0 100644 (file)
@@ -133,6 +133,7 @@ Adaptation::Ecap::XactionRep::clientIpValue() const
 const libecap::Area
 Adaptation::Ecap::XactionRep::usernameValue() const
 {
+#if USE_AUTH
     const HttpRequest *request = dynamic_cast<const HttpRequest*>(theCauseRep ?
                                  theCauseRep->raw().header : theVirginRep.raw().header);
     Must(request);
@@ -140,6 +141,7 @@ Adaptation::Ecap::XactionRep::usernameValue() const
         if (char const *name = request->auth_user_request->username())
             return libecap::Area::FromTempBuffer(name, strlen(name));
     }
+#endif
     return libecap::Area();
 }