cmdmon: add refresh command

This command can be used to resolve the names of configured sources to
IP addresses again.
This commit is contained in:
Gautier PHILIPPON
2015-09-29 16:08:43 +02:00
committed by Miroslav Lichvar
parent 440c159217
commit 3eb43f4619
6 changed files with 49 additions and 1 deletions

View File

@@ -703,6 +703,23 @@ NSR_HandleBadSource(IPAddr *address)
/* ================================================== */
void
NSR_RefreshAddresses(void)
{
SourceRecord *record;
unsigned int i;
for (i = 0; i < ARR_GetSize(records); i++) {
record = get_record(i);
if (!record->remote_addr || !record->name)
continue;
resolve_source_replacement(record);
}
}
/* ================================================== */
static void remove_tentative_pool_sources(int pool)
{
SourceRecord *record;