MCPcopy Create free account
hub / github.com/apache/trafficserver / ControlMatcher

Method ControlMatcher

src/proxy/ControlMatcher.cc:670–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

668
669template <class Data, class MatchResult>
670ControlMatcher<Data, MatchResult>::ControlMatcher(const char *file_var, const char *name, const matcher_tags *tags, int flags_in)
671{
672 flags = flags_in;
673 ink_assert(flags & (ALLOW_HOST_TABLE | ALLOW_REGEX_TABLE | ALLOW_URL_TABLE | ALLOW_IP_TABLE));
674
675 config_tags = tags;
676 ink_assert(config_tags != nullptr);
677
678 matcher_name = name;
679 config_file_path[0] = '\0';
680
681 if (!(flags & DONT_BUILD_TABLE)) {
682 ats_scoped_str config_path(RecConfigReadConfigPath(file_var));
683
684 ink_release_assert(config_path);
685 ink_strlcpy(config_file_path, config_path, sizeof(config_file_path));
686 }
687
688 reMatch = nullptr;
689 urlMatch = nullptr;
690 hostMatch = nullptr;
691 ipMatch = nullptr;
692 hrMatch = nullptr;
693
694 if (!(flags & DONT_BUILD_TABLE)) {
695 m_numEntries = this->BuildTable();
696 } else {
697 m_numEntries = 0;
698 }
699}
700
701template <class Data, class MatchResult> ControlMatcher<Data, MatchResult>::~ControlMatcher()
702{

Callers

nothing calls this directly

Calls 3

BuildTableMethod · 0.95
RecConfigReadConfigPathFunction · 0.85
ink_strlcpyFunction · 0.85

Tested by

no test coverage detected