MXS-2208 Move trim-functions from maxscale to maxbase

log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh.
This commit is contained in:
Johan Wikman
2018-12-05 14:54:41 +02:00
parent 60cbeaf287
commit 1b5b789342
25 changed files with 352 additions and 339 deletions

View File

@ -1781,11 +1781,11 @@ json_t* Dbfw::diagnostics_json() const
}
extern "C"
void dbfilter_log_warning(const char* file, int line, const char* function,
const char* format, const char* what)
void log_warning(const char* module, const char* file, int line, const char* function,
const char* format, const char* what)
{
char buffer[strlen(format) + strlen(what) + 1];
sprintf(buffer, format, what);
mxb_log_message(LOG_WARNING, file, line, function, "%s", buffer);
mxb_log_message(LOG_WARNING, module, file, line, function, "%s", buffer);
}

View File

@ -905,7 +905,7 @@ void RegexHintFilter::set_source_addresses(const std::string& input_host_names,
for (auto host : mxs::strtok(host_names, ","))
{
char* trimmed_host = trim((char*)host.c_str());
char* trimmed_host = mxb::trim((char*)host.c_str());
if (!add_source_address(trimmed_host, source_hosts))
{