chiark / gitweb /
libsystemd-dhcp: don't assert on client_stop()
authorTom Gundersen <teg@jklm.no>
Fri, 3 Jan 2014 00:25:18 +0000 (01:25 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 3 Jan 2014 00:42:26 +0000 (01:42 +0100)
We need to be able to stop the dhcp client at any time, and the function appears to be written to handle this.

src/libsystemd-dhcp/dhcp-client.c

index b9492a5..f6a6211 100644 (file)
@@ -260,8 +260,6 @@ static int client_notify(sd_dhcp_client *client, int event)
 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);