Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/admin-guide/plugins/access_control.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion doc/developer-guide/testing/blackbox-testing.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions iocore/dns/P_SplitDNSProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/* --------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion iocore/dns/SplitDNS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down
1 change: 0 additions & 1 deletion iocore/net/Socks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
61 changes: 0 additions & 61 deletions mgmt/ProxyConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,67 +29,6 @@

ConfigProcessor configProcessor;

void *
config_int_cb(void *data, void *value)
{
*static_cast<int *>(data) = *static_cast<int64_t *>(value);
return nullptr;
}

void *
config_float_cb(void *data, void *value)
{
*static_cast<float *>(data) = *static_cast<float *>(value);
return nullptr;
}

void *
config_long_long_cb(void *data, void *value)
{
*static_cast<int64_t *>(data) = *static_cast<int64_t *>(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<char *>(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<char *>(ats_malloc(len + 1));
memcpy(_new_value, _ss, len + 1);
}

char *_temp2 = *static_cast<char **>(data);
*static_cast<char **>(data) = _new_value;

// free old data
if (_temp2 != nullptr) {
new_Freer(_temp2, HRTIME_DAY);
}

return nullptr;
}

class ConfigInfoReleaser : public Continuation
{
public:
Expand Down
6 changes: 0 additions & 6 deletions mgmt/ProxyConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
30 changes: 3 additions & 27 deletions proxy/ControlMatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,10 @@ RegexMatcher<Data, MatchResult>::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);
Expand Down Expand Up @@ -796,6 +796,7 @@ ControlMatcher<Data, MatchResult>::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) {
Expand Down Expand Up @@ -912,8 +913,7 @@ ControlMatcher<Data, MatchResult>::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);
}
Expand Down Expand Up @@ -955,30 +955,6 @@ ControlMatcher<Data, MatchResult>::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<ParentRecord, ParentResult>;
Expand Down
14 changes: 1 addition & 13 deletions proxy/ControlMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,25 +336,13 @@ template <class Data, class MatchResult> class ControlMatcher
return reMatch;
}

UrlMatcher<Data, MatchResult> *
getUrlMatcher()
{
return urlMatch;
}

IpMatcher<Data, MatchResult> *
getIPMatcher()
{
return ipMatch;
}

HostRegexMatcher<Data, MatchResult> *
getHrMatcher()
{
return hrMatch;
}

// private:
// private
RegexMatcher<Data, MatchResult> *reMatch;
UrlMatcher<Data, MatchResult> *urlMatch;
HostMatcher<Data, MatchResult> *hostMatch;
Expand Down
3 changes: 0 additions & 3 deletions proxy/ParentSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down