mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-13 03:50:16 +01:00
dhcp/nettools: first clear source before emitting event in dhcp4_event_cb()
A similar patch was done on master, but here the situation is different. I feel we should not allow for the possibility where we invoke an event that might mess with the source id. In practice there was no problem. But it feels cleaner to clear it first. Fixes:843d696e46('dhcp: clean source on dispatch failure') (cherry picked from commit0549351111)
This commit is contained in:
parent
7a004ef0bb
commit
beeb067c71
1 changed files with 1 additions and 1 deletions
|
|
@ -1073,8 +1073,8 @@ dhcp4_event_cb (GIOChannel *source,
|
|||
* a predefined number of times (possibly infinite).
|
||||
*/
|
||||
_LOGE ("error %d dispatching events", r);
|
||||
nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL);
|
||||
priv->event_id = 0;
|
||||
nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue