~chtsanti/squid/icap-max-connections

« back to all changes in this revision

Viewing changes to src/acl/SourceDomain.cc

  • Committer: Christos Tsantilas
  • Date: 2009-04-11 09:00:59 UTC
  • mfrom: (9294.1.333 trunk)
  • Revision ID: chtsanti@users.sourceforge.net-20090411090059-8n47p1kyy1cqfqkn
MergeĀ FromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 */
36
36
 
37
37
#include "squid.h"
38
 
#include "ACLSourceDomain.h"
39
 
#include "ACLChecklist.h"
40
 
#include "ACLRegexData.h"
41
 
#include "ACLDomainData.h"
 
38
#include "acl/SourceDomain.h"
 
39
#include "acl/Checklist.h"
 
40
#include "acl/RegexData.h"
 
41
#include "acl/DomainData.h"
42
42
 
43
43
SourceDomainLookup SourceDomainLookup::instance_;
44
44
 
52
52
SourceDomainLookup::checkForAsync(ACLChecklist *checklist) const
53
53
{
54
54
    checklist->asyncInProgress(true);
55
 
    fqdncache_nbgethostbyaddr(checklist->src_addr, LookupDone, checklist);
 
55
    fqdncache_nbgethostbyaddr(Filled(checklist)->src_addr, LookupDone, checklist);
56
56
}
57
57
 
58
58
void
63
63
 
64
64
    checklist->asyncInProgress(false);
65
65
    checklist->changeState (ACLChecklist::NullState::Instance());
66
 
    checklist->markSourceDomainChecked();
 
66
    Filled(checklist)->markSourceDomainChecked();
67
67
    checklist->check();
68
68
}
69
69
 
70
 
ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
71
 
ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
72
 
ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
73
 
ACLStrategised<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
74
70
 
75
71
int
76
 
ACLSourceDomainStrategy::match (ACLData<MatchType> * &data, ACLChecklist *checklist)
 
72
ACLSourceDomainStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist)
77
73
{
78
74
    const char *fqdn = NULL;
79
75
    fqdn = fqdncache_gethostbyaddr(checklist->src_addr, FQDN_LOOKUP_IF_MISS);