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>
Fri, 14 Jun 2013 22:04:54 +0000 (15:04 -0700)
Hide the implementation of the property structures by using
an accessor.

Change-Id: Ic604935882f6085e3d082baa651bad9bafe0a54a

wifi/wifi.c

index cbf8303..6b4d32d 100644 (file)
@@ -553,7 +553,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);
@@ -570,7 +570,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;
             }