diff --git a/doc/admin-guide/plugins/access_control.en.rst b/doc/admin-guide/plugins/access_control.en.rst index 6a001c635b1..d06d5efc04b 100644 --- a/doc/admin-guide/plugins/access_control.en.rst +++ b/doc/admin-guide/plugins/access_control.en.rst @@ -446,7 +446,7 @@ Now let us send the same request again and since the object is in cache we get ` x-cache: hit-fresh -The previous activity should result in the following log (as defined in ``logging.config``) +The previous activity should result in the following log (as defined in ``logging.yaml``) .. code-block:: bash diff --git a/doc/developer-guide/testing/blackbox-testing.en.rst b/doc/developer-guide/testing/blackbox-testing.en.rst index f5238ef0fe3..b42744f4a4d 100644 --- a/doc/developer-guide/testing/blackbox-testing.en.rst +++ b/doc/developer-guide/testing/blackbox-testing.en.rst @@ -115,13 +115,13 @@ A number of file objects are also defined to help test TrafficServer. Files that - diags.log - records.config - cache.config -- congestion.config - hosting.config - ip_allow.yaml - logging.yaml - parent.config - plugin.config - remap.config +- sni.yaml - socks.config - splitdns.config - ssl_multicert.config diff --git a/iocore/dns/P_SplitDNSProcessor.h b/iocore/dns/P_SplitDNSProcessor.h index e8ab9980b79..ef20b0e245b 100644 --- a/iocore/dns/P_SplitDNSProcessor.h +++ b/iocore/dns/P_SplitDNSProcessor.h @@ -65,16 +65,9 @@ struct SplitDNSResult { ------------ */ DNSResultType r = DNS_SRVR_UNDEFINED; - DNSServer *get_dns_record(); - int get_dns_srvr_count(); - - /* ------------ - private - ------------ */ int m_line_number = 0; SplitDNSRecord *m_rec = nullptr; - bool m_wrap_around = false; }; /* -------------------------------------------------------------- diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc index 8af72da9209..cf6a9b9f4d1 100644 --- a/iocore/dns/SplitDNS.cc +++ b/iocore/dns/SplitDNS.cc @@ -218,7 +218,6 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result) result->m_rec = nullptr; result->m_line_number = 0xffffffff; - result->m_wrap_around = false; /* --------------------------- the 'alleged' fast path ... diff --git a/iocore/net/Socks.cc b/iocore/net/Socks.cc index 24964aaafe2..dbc2a02835a 100644 --- a/iocore/net/Socks.cc +++ b/iocore/net/Socks.cc @@ -514,7 +514,6 @@ loadSocksConfiguration(socks_conf_struct *socks_conf_stuff) } #ifdef SOCKS_WITH_TS tmp = Load_IpMap_From_File(&socks_conf_stuff->ip_map, socks_config_fd, "no_socks"); - // tmp = socks_conf_stuff->ip_range.read_table_from_file(socks_config_fd, "no_socks"); if (tmp) { Error("SOCKS Config: Error while reading ip_range: %s.", tmp); diff --git a/mgmt/ProxyConfig.cc b/mgmt/ProxyConfig.cc index e18fc64429e..d30d06544b5 100644 --- a/mgmt/ProxyConfig.cc +++ b/mgmt/ProxyConfig.cc @@ -29,67 +29,6 @@ ConfigProcessor configProcessor; -void * -config_int_cb(void *data, void *value) -{ - *static_cast(data) = *static_cast(value); - return nullptr; -} - -void * -config_float_cb(void *data, void *value) -{ - *static_cast(data) = *static_cast(value); - return nullptr; -} - -void * -config_long_long_cb(void *data, void *value) -{ - *static_cast(data) = *static_cast(value); - return nullptr; -} - -///////////////////////////////////////////////////////////// -// -// config_string_alloc_cb() -// -// configuration callback function. The function is called -// by the manager when a string configuration variable -// changed. It allocates new memory for the new data. -// the old variable is scheduled to be freed using -// ConfigFreerContinuation which will free the memory -// used for this variable after long time, assuming that -// during all this time all the users of this memory will -// disappear. -///////////////////////////////////////////////////////////// -void * -config_string_alloc_cb(void *data, void *value) -{ - char *_ss = static_cast(value); - char *_new_value = nullptr; - -#if defined(DEBUG_CONFIG_STRING_UPDATE) - printf("config callback [new, old] = [%s : %s]\n", (_ss) ? (_ss) : (""), (*(char **)data) ? (*(char **)data) : ("")); -#endif - - if (_ss) { - int len = strlen(_ss); - _new_value = static_cast(ats_malloc(len + 1)); - memcpy(_new_value, _ss, len + 1); - } - - char *_temp2 = *static_cast(data); - *static_cast(data) = _new_value; - - // free old data - if (_temp2 != nullptr) { - new_Freer(_temp2, HRTIME_DAY); - } - - return nullptr; -} - class ConfigInfoReleaser : public Continuation { public: diff --git a/mgmt/ProxyConfig.h b/mgmt/ProxyConfig.h index 8f837a3af92..493dec230e2 100644 --- a/mgmt/ProxyConfig.h +++ b/mgmt/ProxyConfig.h @@ -30,12 +30,6 @@ class ProxyMutex; -void *config_int_cb(void *data, void *value); -void *config_long_long_cb(void *data, void *value); -void *config_float_cb(void *data, void *value); -void *config_string511_cb(void *data, void *value); -void *config_string_alloc_cb(void *data, void *value); - // // Macros that spin waiting for the data to be bound // diff --git a/proxy/ControlMatcher.cc b/proxy/ControlMatcher.cc index 3ef5b52c934..3b51cb57d90 100644 --- a/proxy/ControlMatcher.cc +++ b/proxy/ControlMatcher.cc @@ -500,10 +500,10 @@ RegexMatcher::Match(RequestData *rdata, MatchResult *result) if (url_str == nullptr) { url_str = ats_strdup(""); } + // INKqa12980 // The function unescapifyStr() is already called in // HttpRequestData::get_string(); therefore, no need to call again here. - // unescapifyStr(url_str); for (int i = 0; i < num_el; i++) { r = pcre_exec(re_array[i], nullptr, url_str, strlen(url_str), 0, 0, nullptr, 0); @@ -796,6 +796,7 @@ ControlMatcher::BuildTableFromString(char *file_buf) // We have an empty file return 0; } + // First get the number of entries tmp = bufTok.iterFirst(&i_state); while (tmp != nullptr) { @@ -912,8 +913,7 @@ ControlMatcher::BuildTableFromString(char *file_buf) Result::failure("%s discarding %s entry with unknown type at line %d", matcher_name, config_file_path, current->line_num); } - // Check to see if there was an error in creating - // the NewEntry + // Check to see if there was an error in creating the NewEntry if (error.failed()) { SignalError(error.message(), alarmAlready); } @@ -955,30 +955,6 @@ ControlMatcher::BuildTable() /**************************************************************** * TEMPLATE INSTANTIATIONS GO HERE * - * We have to explicitly instantiate the templates so that - * everything works on with dec ccx, sun CC, and g++ - * - * Details on the different comipilers: - * - * dec ccx: Does not seem to instantiate anything automatically - * so it needs all templates manually instantiated - * - * sun CC: Automatic instantiation works but since we make - * use of the templates in other files, instantiation - * only occurs when those files are compiled, breaking - * the dependency system. Explict instantiation - * in this file causes the templates to be reinstantiated - * when this file changes. - * - * Also, does not give error messages about template - * compilation problems. Requires the -verbose=template - * flage to error messages - * - * g++: Requires instantiation to occur in the same file as the - * the implementation. Instantiating ControlMatcher - * automatically instatiatiates the other templates since - * ControlMatcher makes use of them - * ****************************************************************/ template class ControlMatcher; diff --git a/proxy/ControlMatcher.h b/proxy/ControlMatcher.h index 145e958e4f9..6c1a3cbdae7 100644 --- a/proxy/ControlMatcher.h +++ b/proxy/ControlMatcher.h @@ -336,25 +336,13 @@ template class ControlMatcher return reMatch; } - UrlMatcher * - getUrlMatcher() - { - return urlMatch; - } - IpMatcher * getIPMatcher() { return ipMatch; } - HostRegexMatcher * - getHrMatcher() - { - return hrMatch; - } - - // private: + // private RegexMatcher *reMatch; UrlMatcher *urlMatch; HostMatcher *hostMatch; diff --git a/proxy/ParentSelection.h b/proxy/ParentSelection.h index d9cf6e80942..010fcba509a 100644 --- a/proxy/ParentSelection.h +++ b/proxy/ParentSelection.h @@ -436,9 +436,6 @@ struct ParentConfig { // Helper Functions ParentRecord *createDefaultParent(char *val); -void reloadDefaultParent(char *val); -void reloadParentFile(); -int parentSelection_CB(const char *name, RecDataT data_type, RecData data, void *cookie); // Unit Test Functions void show_result(ParentResult *aParentResult); diff --git a/tests/README.md b/tests/README.md index 7a4439c2562..8dd8567fbd0 100644 --- a/tests/README.md +++ b/tests/README.md @@ -101,13 +101,13 @@ A number of file objects are defined to help with adding values to a given confi ##### config files * records.config * cache.config - * congestion.config * hosting.config - * ip_allow.config + * ip_allow.yaml * logging.yaml * parent.config * plugin.config * remap.config + * sni.yaml * socks.config * splitdns.config * ssl_multicert.config