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

Method check

src/proxy/ControlBase.cc:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 this->name(), static_cast<long>(start_time), static_cast<long>(end_time));
103}
104bool
105TimeMod::check(HttpRequestData *req) const
106{
107 struct tm cur_time;
108 time_t timeOfDay = req->xact_start;
109 // Use this to account for daylight savings time.
110 ink_localtime_r(&timeOfDay, &cur_time);
111 timeOfDay = cur_time.tm_hour * (60 * 60) + cur_time.tm_min * 60 + cur_time.tm_sec;
112 return start_time <= timeOfDay && timeOfDay <= end_time;
113}
114
115TimeMod *
116TimeMod::make(char *value, const char **error)

Callers 15

ink_cache_initFunction · 0.45
ink_split_dns_initFunction · 0.45
ink_dns_initFunction · 0.45
RegressionConfigMethod · 0.45
~RegressionConfigMethod · 0.45
ink_event_system_initFunction · 0.45
ink_net_initFunction · 0.45

Calls 11

ink_localtime_rFunction · 0.85
ats_ip_addr_cmpFunction · 0.85
strcmpFunction · 0.85
scheme_get_wksidxMethod · 0.80
url_getMethod · 0.80
method_getMethod · 0.80
memcmpFunction · 0.50
port_getMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
path_getMethod · 0.45