of later merge.
/*
- * $Id: ExternalACLEntry.cc,v 1.1 2003/05/20 12:17:38 robertc Exp $
+ * $Id: ExternalACLEntry.cc,v 1.2 2003/06/27 20:54:45 hno Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
lru.next = lru.prev = NULL;
result = 0;
date = 0;
- user = NULL;
- error = NULL;
def = NULL;
}
ExternalACLEntry::~ExternalACLEntry()
{
safe_free(key);
- safe_free(user);
- safe_free(error);
}
void
{
date = squid_curtime;
result = someData.result;
- safe_free(user);
- safe_free(error);
-
- if (someData.user)
- user = xstrdup(someData.user);
-
- if (someData.error)
- error = xstrdup(someData.error);
+ user = someData.user;
+ message = someData.message;
tag = someData.tag;
}
/*
- * $Id: ExternalACLEntry.h,v 1.1 2003/05/20 12:17:38 robertc Exp $
+ * $Id: ExternalACLEntry.h,v 1.2 2003/06/27 20:54:45 hno Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
{
public:
- ExternalACLEntryData() : result (-1) , user(NULL) , error (NULL){}
+ ExternalACLEntryData() : result (-1) {}
- // ExternalACLEntryData(int anInt, char const *aUser, char const *anError) : result (anInt), user(aUser),error(anError) {}
int result;
- char const *user;
- char const *error;
+ String user;
+ String message;
String tag;
};
dlink_node lru;
int result;
time_t date;
- char *user;
- char *error;
+ String user;
+ String message;
String tag;
external_acl *def;
#
-# $Id: cf.data.pre,v 1.324 2003/06/19 21:28:50 wessels Exp $
+# $Id: cf.data.pre,v 1.325 2003/06/27 20:54:45 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
Defined keywords:
user= The users name (login)
- error= Error description (only defined for ERR results)
+ message= Message describing the reason
tag= Apply a tag to a request (for both ERR and OK results)
- Only sets a tag, does not alter existing tags.
+ Only sets a tag, does not alter existing tags.
Keyword values need to be enclosed in quotes if they may
contain whitespace, or the whitespace escaped using \. Any
/*
- * $Id: external_acl.cc,v 1.44 2003/06/19 19:07:21 hno Exp $
+ * $Id: external_acl.cc,v 1.45 2003/06/27 20:54:45 hno Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
* Register the username for logging purposes
*/
- if (entry->user) {
- xstrncpy(ch->rfc931, entry->user, USER_IDENT_SZ);
+ if (entry->user.size()) {
+ xstrncpy(ch->rfc931, entry->user.buf(), USER_IDENT_SZ);
if (cbdataReferenceValid(ch->conn()))
- xstrncpy(ch->conn()->rfc931, entry->user, USER_IDENT_SZ);
+ xstrncpy(ch->conn()->rfc931, entry->user.buf(), USER_IDENT_SZ);
}
if (ch->request && !ch->request->tag.size())
* Keywords:
*
* user= The users name (login)
- * error= Error description (only defined for ERR results)
+ * message= Message describing the reason
* tag= A string tag to be applied to the request that triggered the acl match.
* applies to both OK and ERR responses.
* Won't override existing request tags.
if (strcmp(token, "user") == 0)
entryData.user = value;
+ else if (strcmp(token, "message") == 0)
+ entryData.message = value;
else if (strcmp(token, "error") == 0)
- entryData.error = value;
+ entryData.message = value;
}
}
}