sd-dhcp-client: add FIXME comment about the state callback
At least currently, it is a theoretical concern, as networkd does not change the client state in the callback.
This commit is contained in:
@@ -629,6 +629,8 @@ static void client_set_state(sd_dhcp_client *client, DHCPState state) {
|
||||
;
|
||||
}
|
||||
|
||||
// FIXME: If the state callback changes the state, we may not safely free/stop the client, and the
|
||||
// state machine diagram becomes needlessly complicated. Introduce a guard to avoid that. */
|
||||
if (client->state_callback)
|
||||
client->state_callback(client, state, client->state_userdata);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user