mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-17 10:30:31 +01:00
ndisc: first reschedule timeout before invoking change event in check_timestamps()
It's just ugly to invoke external code in the middel of an operation. You never know, whether the handler won' unref the ndisc instance. (cherry picked from commit1f856b7cb3) (cherry picked from commita3c73e783b)
This commit is contained in:
parent
391e298dfb
commit
6858e794f3
1 changed files with 3 additions and 3 deletions
|
|
@ -1132,9 +1132,6 @@ check_timestamps (NMNDisc *ndisc, gint32 now, NMNDiscConfigMap changed)
|
|||
clean_dns_servers (ndisc, now, &changed, &nextevent);
|
||||
clean_dns_domains (ndisc, now, &changed, &nextevent);
|
||||
|
||||
if (changed)
|
||||
nm_ndisc_emit_config_change (ndisc, changed);
|
||||
|
||||
if (nextevent != G_MAXINT32) {
|
||||
if (nextevent <= now)
|
||||
g_return_if_reached ();
|
||||
|
|
@ -1142,6 +1139,9 @@ check_timestamps (NMNDisc *ndisc, gint32 now, NMNDiscConfigMap changed)
|
|||
(int) (nextevent - now));
|
||||
priv->timeout_id = g_timeout_add_seconds (nextevent - now, timeout_cb, ndisc);
|
||||
}
|
||||
|
||||
if (changed)
|
||||
nm_ndisc_emit_config_change (ndisc, changed);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue