Revert "dns: clear dnsmasq cache after an update"
We now pass the --clear-on-reload option to dnsmasq, so the manual
clear is no longer needed.
This reverts commit 4feb58b50b
.
This commit is contained in:
@@ -367,25 +367,6 @@ add_ip_config_data (NMDnsDnsmasq *self, GVariantBuilder *servers, const NMDnsIPC
|
|||||||
g_return_val_if_reached (FALSE);
|
g_return_val_if_reached (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
dnsmasq_clear_cache_done (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data)
|
|
||||||
{
|
|
||||||
NMDnsDnsmasq *self;
|
|
||||||
gs_free_error GError *error = NULL;
|
|
||||||
gs_unref_variant GVariant *response = NULL;
|
|
||||||
|
|
||||||
response = g_dbus_proxy_call_finish (proxy, res, &error);
|
|
||||||
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
|
|
||||||
return;
|
|
||||||
|
|
||||||
self = NM_DNS_DNSMASQ (user_data);
|
|
||||||
|
|
||||||
if (!response)
|
|
||||||
_LOGW ("dnsmasq cache clear failed: %s", error->message);
|
|
||||||
else
|
|
||||||
_LOGD ("dnsmasq update successful, cache cleared");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dnsmasq_update_done (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data)
|
dnsmasq_update_done (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -403,16 +384,8 @@ dnsmasq_update_done (GDBusProxy *proxy, GAsyncResult *res, gpointer user_data)
|
|||||||
|
|
||||||
if (!response)
|
if (!response)
|
||||||
_LOGW ("dnsmasq update failed: %s", error->message);
|
_LOGW ("dnsmasq update failed: %s", error->message);
|
||||||
else {
|
else
|
||||||
g_dbus_proxy_call (priv->dnsmasq,
|
_LOGD ("dnsmasq update successful");
|
||||||
"ClearCache",
|
|
||||||
NULL,
|
|
||||||
G_DBUS_CALL_FLAGS_NONE,
|
|
||||||
-1,
|
|
||||||
priv->update_cancellable,
|
|
||||||
(GAsyncReadyCallback) dnsmasq_clear_cache_done,
|
|
||||||
self);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user