summaryrefslogtreecommitdiffstats
path: root/libnetutils
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:54 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:54 -0800
commit1b8e5a6b14ca850920e19b3dfae41e6494475c1a (patch)
tree67bdeb039019f8a47d5cd607c18d99a7c8eb3141 /libnetutils
parent13f797da7f190e9ea52f2f3d235210b8a4963b21 (diff)
downloadcore-1b8e5a6b14ca850920e19b3dfae41e6494475c1a.tar.gz
core-1b8e5a6b14ca850920e19b3dfae41e6494475c1a.tar.bz2
core-1b8e5a6b14ca850920e19b3dfae41e6494475c1a.zip
auto import from //branches/cupcake/...@131421
Diffstat (limited to 'libnetutils')
-rw-r--r--libnetutils/dhcp_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libnetutils/dhcp_utils.c b/libnetutils/dhcp_utils.c
index ba9893351..bad2e2ffd 100644
--- a/libnetutils/dhcp_utils.c
+++ b/libnetutils/dhcp_utils.c
@@ -170,14 +170,19 @@ int dhcp_do_request(const char *interface,
*/
int dhcp_stop(const char *interface)
{
+ char result_prop_name[PROPERTY_KEY_MAX];
const char *ctrl_prop = "ctl.stop";
const char *desired_status = "stopped";
+ snprintf(result_prop_name, sizeof(result_prop_name), "%s.%s.result",
+ DHCP_PROP_NAME_PREFIX,
+ interface);
/* Stop the daemon and wait until it's reported to be stopped */
property_set(ctrl_prop, DAEMON_NAME);
if (wait_for_property(DAEMON_PROP_NAME, desired_status, 5) < 0) {
return -1;
}
+ property_set(result_prop_name, "failed");
return 0;
}