From 28429ee0d732a9dbb21dfc1bbf66ae0b01b2b9ce Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 4 Feb 2013 12:34:20 -0800 Subject: [PATCH] Use accessor to read property serial numbers Hide the implementation of the property structures by using an accessor. (cherry picked from commit 14c02f245e56687b765487d25a034d71196d33b6) Change-Id: Id86ff99d8430fa73bbc745aaa0ff2b7713ca7885 --- wifi/wifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifi/wifi.c b/wifi/wifi.c index b905897..818c212 100644 --- a/wifi/wifi.c +++ b/wifi/wifi.c @@ -571,7 +571,7 @@ int wifi_start_supplicant(int p2p_supported) */ pi = __system_property_find(supplicant_prop_name); if (pi != NULL) { - serial = pi->serial; + serial = __system_property_serial(pi); } #endif property_get("wifi.interface", primary_iface, WIFI_TEST_INTERFACE); @@ -588,7 +588,7 @@ int wifi_start_supplicant(int p2p_supported) __system_property_read(pi, NULL, supp_status); if (strcmp(supp_status, "running") == 0) { return 0; - } else if (pi->serial != serial && + } else if (__system_property_serial(pi) != serial && strcmp(supp_status, "stopped") == 0) { return -1; } -- 2.11.0