diff options
author | Michael Biebl <biebl@debian.org> | 2011-04-21 10:42:53 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2011-04-21 10:42:53 +0200 |
commit | 8baa1aca8dfd35e3190d7d5655eb83b5b901e263 (patch) | |
tree | a9ac1e67d0c22a48330c76f08fc5291f85307055 /src/dhcp-manager/nm-dhcp-client.c | |
parent | f75dd6fd1975146623052b843b182dc32c3fbe46 (diff) |
Imported Upstream version 0.8.4.0upstream/0.8.4.0
Diffstat (limited to 'src/dhcp-manager/nm-dhcp-client.c')
-rw-r--r-- | src/dhcp-manager/nm-dhcp-client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 3418bf3b2..4c19b300a 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -136,10 +136,10 @@ watch_cleanup (NMDHCPClient *self) } } -void -nm_dhcp_client_stop_pid (GPid pid, const char *iface, guint timeout_secs) +static void +stop_process (GPid pid, const char *iface) { - int i = (timeout_secs ? timeout_secs : 3) * 5; /* default 3 seconds */ + int i = 15; /* 3 seconds */ g_return_if_fail (pid > 0); @@ -183,7 +183,7 @@ nm_dhcp_client_stop_pid (GPid pid, const char *iface, guint timeout_secs) } static void -real_stop (NMDHCPClient *self, gboolean release) +real_stop (NMDHCPClient *self) { NMDHCPClientPrivate *priv; @@ -196,7 +196,7 @@ real_stop (NMDHCPClient *self, gboolean release) /* Clean up the watch handler since we're explicitly killing the daemon */ watch_cleanup (self); - nm_dhcp_client_stop_pid (priv->pid, priv->iface, 0); + stop_process (priv->pid, priv->iface); priv->info_only = FALSE; } @@ -376,7 +376,7 @@ nm_dhcp_client_stop_existing (const char *pid_file, const char *binary_name) exe = proc_contents; if (!strcmp (exe, binary_name)) - nm_dhcp_client_stop_pid ((GPid) tmp, NULL, 0); + stop_process ((GPid) tmp, NULL); } } @@ -387,7 +387,7 @@ nm_dhcp_client_stop_existing (const char *pid_file, const char *binary_name) } void -nm_dhcp_client_stop (NMDHCPClient *self, gboolean release) +nm_dhcp_client_stop (NMDHCPClient *self) { NMDHCPClientPrivate *priv; @@ -398,7 +398,7 @@ nm_dhcp_client_stop (NMDHCPClient *self, gboolean release) /* Kill the DHCP client */ if (!priv->dead) { - NM_DHCP_CLIENT_GET_CLASS (self)->stop (self, release); + NM_DHCP_CLIENT_GET_CLASS (self)->stop (self); priv->dead = TRUE; nm_log_info (LOGD_DHCP, "(%s): canceled DHCP transaction, DHCP client pid %d", |