OSDN Git Service

Use accessor to read property serial numbers
authorColin Cross <ccross@android.com>
Mon, 4 Feb 2013 20:34:20 +0000 (12:34 -0800)
committerColin Cross <ccross@android.com>
Mon, 17 Jun 2013 23:58:58 +0000 (16:58 -0700)
Hide the implementation of the property structures by using
an accessor.

(cherry picked from commit 14c02f245e56687b765487d25a034d71196d33b6)

Change-Id: Id86ff99d8430fa73bbc745aaa0ff2b7713ca7885

wifi/wifi.c

index b905897..818c212 100644 (file)
@@ -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;
             }