/*
- * $Id: ACLMaxUserIP.cc,v 1.1 2003/02/25 12:16:55 robertc Exp $
+ * $Id: ACLMaxUserIP.cc,v 1.2 2003/03/10 20:12:43 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
return new ACLMaxUserIP(*this);
}
-ACLMaxUserIP::ACLMaxUserIP (char const *theClass) : class_ (theClass), max(0)
+ACLMaxUserIP::ACLMaxUserIP (char const *theClass) : class_ (theClass), maximum(0)
{}
-ACLMaxUserIP::ACLMaxUserIP (ACLMaxUserIP const & old) :class_ (old.class_), max (old.max), flags (old.flags)
+ACLMaxUserIP::ACLMaxUserIP (ACLMaxUserIP const & old) :class_ (old.class_), maximum (old.maximum), flags (old.flags)
{}
MemPool *ACLMaxUserIP::Pool(NULL);
bool
ACLMaxUserIP::valid () const
{
- return max != 0;
+ return maximum != 0;
}
void
ACLMaxUserIP::parse()
{
- if (max) {
+ if (maximum) {
debug(28, 1) ("Attempting to alter already set User max IP acl\n");
return;
}
if (!t)
fatal("aclParseUserMaxIP: Malformed ACL\n");
- max = atoi(t);
+ maximum = atoi(t);
- debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) max);
+ debug(28, 5) ("aclParseUserMaxIP: Max IP address's %d\n", (int) maximum);
return;
}
* one off is currently undecided (RBC)
*/
- if (authenticateAuthUserRequestIPCount(auth_user_request) <= max)
+ if (authenticateAuthUserRequestIPCount(auth_user_request) <= maximum)
return 0;
/* this is a match */
wordlist *
ACLMaxUserIP::dump() const
{
- if (!max)
+ if (!maximum)
return NULL;
wordlist *W = NULL;
char buf[128];
- snprintf(buf, sizeof(buf), "%lu", (unsigned long int) max);
+ snprintf(buf, sizeof(buf), "%lu", (unsigned long int) maximum);
wordlistAdd(&W, buf);
/*
- * $Id: DelayBucket.cc,v 1.4 2003/03/08 09:43:49 robertc Exp $
+ * $Id: DelayBucket.cc,v 1.5 2003/03/10 20:12:43 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
}
int
-DelayBucket::bytesWanted (int min, int max) const
+DelayBucket::bytesWanted (int minimum, int maximum) const
{
- int result = XMAX(min, XMIN(max, level()));
+ int result = max(minimum, min(maximum, level()));
return result;
}
/*
- * $Id: DelayId.cc,v 1.5 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayId.cc,v 1.6 2003/03/10 20:12:43 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
* into account bytes already buffered - that is up to the caller.
*/
int
-DelayId::bytesWanted(int min, int max) const
+DelayId::bytesWanted(int minimum, int maximum) const
{
/* unlimited */
if (! (*this) || markedAsNoDelay)
- return XMAX(min, max);
+ return max(minimum, maximum);
/* limited */
- int nbytes = XMAX(min, max);
+ int nbytes = max(minimum, maximum);
if (compositeId.getRaw())
- nbytes = compositeId->bytesWanted(min, nbytes);
+ nbytes = compositeId->bytesWanted(minimum, nbytes);
return nbytes;
}
/*
- * $Id: DelayVector.cc,v 1.4 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayVector.cc,v 1.5 2003/03/10 20:12:43 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
}
int
-DelayVector::Id::bytesWanted (int min, int max) const
+DelayVector::Id::bytesWanted (int minimum, int maximum) const
{
- int nbytes = max;
+ int nbytes = maximum;
const_iterator pos = ids.begin();
while (pos != ids.end()) {
- nbytes = XMIN (nbytes, (*pos)->bytesWanted(min, nbytes));
+ nbytes = min (nbytes, (*pos)->bytesWanted(minimum, nbytes));
++pos;
}
- nbytes = XMAX(min, nbytes);
+ nbytes = max(minimum, nbytes);
return nbytes;
}