We need to be able to stop the dhcp client at any time, and the function appears to be written to handle this.
static int client_stop(sd_dhcp_client *client, int error)
{
assert_return(client, -EINVAL);
static int client_stop(sd_dhcp_client *client, int error)
{
assert_return(client, -EINVAL);
- assert_return(client->state != DHCP_STATE_INIT &&
- client->state != DHCP_STATE_INIT_REBOOT, -EALREADY);
client->receive_message =
sd_event_source_unref(client->receive_message);
client->receive_message =
sd_event_source_unref(client->receive_message);