/*
- * DEBUG: section 28 Access Control
- * AUTHOR: Duane Wessels
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
+/* DEBUG: section 28 Access Control */
+
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "auth/Acl.h"
ACLFlag ACLMaxUserIP::SupportedFlags[] = {ACL_F_STRICT, ACL_F_END};
ACLMaxUserIP::ACLMaxUserIP(char const *theClass) :
- ACL(SupportedFlags),
- class_(theClass),
- maximum(0)
+ ACL(SupportedFlags),
+ class_(theClass),
+ maximum(0)
{}
ACLMaxUserIP::ACLMaxUserIP(ACLMaxUserIP const &old) :
- class_(old.class_),
- maximum(old.maximum)
+ class_(old.class_),
+ maximum(old.maximum)
{
flags = old.flags;
}
}
}
-wordlist *
+SBufList
ACLMaxUserIP::dump() const
{
+ SBufList sl;
if (!maximum)
- return NULL;
-
- wordlist *W = NULL;
-
- char buf[128];
-
- snprintf(buf, sizeof(buf), "%lu", (unsigned long int) maximum);
-
- wordlistAdd(&W, buf);
-
- return W;
+ return sl;
+ SBuf s;
+ s.Printf("%d", maximum);
+ sl.push_back(s);
+ return sl;
}
+