diff options
-rw-r--r-- | plugins/dhcp.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/dhcp.c b/plugins/dhcp.c index 73c975de..e4dff18f 100644 --- a/plugins/dhcp.c +++ b/plugins/dhcp.c @@ -111,6 +111,15 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data) connman_dhcp_bound(dhcp); } +static gboolean start_dhcp(gpointer user_data) +{ + GDHCPClient *dhcp_client = user_data; + + g_dhcp_client_start(dhcp_client); + + return FALSE; +} + static int dhcp_request(struct connman_dhcp *dhcp) { GDHCPClient *dhcp_client; @@ -155,7 +164,9 @@ static int dhcp_request(struct connman_dhcp *dhcp) g_dhcp_client_ref(dhcp_client); - return g_dhcp_client_start(dhcp_client); + g_timeout_add_seconds(0, start_dhcp, dhcp_client); + + return 0; } static int dhcp_release(struct connman_dhcp *dhcp) |