@@ -31,6 +31,15 @@ MatchHttpUriStartsWith(const char *http_uri,
31
31
StringStartsWith (http_uri, http_uri_starts_with));
32
32
}
33
33
34
+ inline bool
35
+ Filter::MatchMore (const Net::Log::Datagram &d) const noexcept
36
+ {
37
+ return http_status (static_cast <uint16_t >(d.http_status )) &&
38
+ MatchFilter (d.host , hosts) &&
39
+ MatchFilter (d.generator , generators) &&
40
+ MatchHttpUriStartsWith (d.http_uri , http_uri_starts_with);
41
+ }
42
+
34
43
inline bool
35
44
Filter::MatchMore (std::span<const std::byte> raw) const noexcept
36
45
{
@@ -39,13 +48,7 @@ Filter::MatchMore(std::span<const std::byte> raw) const noexcept
39
48
40
49
try {
41
50
const auto d = Net::Log::ParseDatagram (raw);
42
-
43
- if (!http_status (static_cast <uint16_t >(d.http_status )))
44
- return false ;
45
-
46
- return MatchFilter (d.host , hosts) &&
47
- MatchFilter (d.generator , generators) &&
48
- MatchHttpUriStartsWith (d.http_uri , http_uri_starts_with);
51
+ return MatchMore (d);
49
52
} catch (...) {
50
53
return false ;
51
54
}
@@ -67,9 +70,6 @@ Filter::operator()(const Net::Log::Datagram &d) const noexcept
67
70
return MatchFilter (d.site , sites) &&
68
71
(type == Net::Log::Type::UNSPECIFIED ||
69
72
type == d.type ) &&
70
- http_status (static_cast <uint16_t >(d.http_status )) &&
71
73
timestamp (d) &&
72
- MatchFilter (d.host , hosts) &&
73
- MatchFilter (d.generator , generators) &&
74
- MatchHttpUriStartsWith (d.http_uri , http_uri_starts_with);
74
+ MatchMore (d);
75
75
}
0 commit comments