Skip to content
Snippets Groups Projects
Commit aa339c8c authored by Daniel Salzman's avatar Daniel Salzman
Browse files

conf: update hostname from conf_new() only

This avoids problems with future changes and reduces overhead of conf_clone()
parent 153dba49
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,7 @@ class (\fI\%RFC 4892\fP). Set to an empty value to disable.
.sp
A DNS name server identifier (\fI\%RFC 5001\fP). Set to an empty value to disable.
.sp
\fIDefault:\fP FQDN hostname
\fIDefault:\fP FQDN hostname at the moment of the daemon start
.SS rundir
.sp
A path for storing run\-time data (PID file, unix sockets, etc.).
......
......@@ -184,7 +184,7 @@ nsid
A DNS name server identifier (:rfc:`5001`). Set to an empty value to disable.
*Default:* FQDN hostname
*Default:* FQDN hostname at the moment of the daemon start
.. _server_rundir:
......
......@@ -91,7 +91,7 @@ int conf_refresh_txn(
return conf->api->txn_begin(conf->db, &conf->read_txn, KNOT_DB_RDONLY);
}
void conf_refresh_hostname(
static void refresh_hostname(
conf_t *conf)
{
if (conf == NULL) {
......@@ -299,7 +299,7 @@ int conf_new(
// Cache the current hostname.
if (!(flags & CONF_FNOHOSTNAME)) {
conf_refresh_hostname(out);
refresh_hostname(out);
}
// Initialize cached values.
......
......@@ -193,15 +193,6 @@ int conf_refresh_txn(
conf_t *conf
);
/*!
* Refreshes cached hostname.
*
* \param[in] conf Configuration.
*/
void conf_refresh_hostname(
conf_t *conf
);
/*!
* Creates new or opens old configuration database.
*
......
......@@ -855,9 +855,6 @@ static int reload_conf(conf_t *new_conf)
log_error("failed to migrate configuration (%s)", knot_strerror(ret));
}
/* Refresh hostname. */
conf_refresh_hostname(new_conf);
return KNOT_EOK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment