diff options
author | Steve Kondik <shade@chemlab.org> | 2012-06-10 13:48:07 +0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-06-10 13:48:07 +0400 |
commit | 6763aa2cb2a84285a8438b28e5ba38dcba9950c2 (patch) | |
tree | 4e8183398526c2f78f4c71217465e36f05df9465 | |
parent | 42d2cf55492bf0e013f13497786d0d100fb32854 (diff) | |
parent | 4f33e1f41c995b0cb2689716d0e8bf5324bb0bb7 (diff) | |
download | frameworks_base-6763aa2cb2a84285a8438b28e5ba38dcba9950c2.zip frameworks_base-6763aa2cb2a84285a8438b28e5ba38dcba9950c2.tar.gz frameworks_base-6763aa2cb2a84285a8438b28e5ba38dcba9950c2.tar.bz2 |
Merge "ipconfig.txt: fix a possible error in parsing" into ics
-rw-r--r-- | wifi/java/android/net/wifi/WifiConfigStore.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiConfigStore.java b/wifi/java/android/net/wifi/WifiConfigStore.java index 54b760f..434d272 100644 --- a/wifi/java/android/net/wifi/WifiConfigStore.java +++ b/wifi/java/android/net/wifi/WifiConfigStore.java @@ -740,6 +740,7 @@ class WifiConfigStore { in = new DataInputStream(new BufferedInputStream(new FileInputStream( ipConfigFile))); + int pos = 0; int version = in.readInt(); if (version != 2 && version != 1) { loge("Bad version on IP configuration file, ignore read"); @@ -796,6 +797,8 @@ class WifiConfigStore { } else if (key.equals(EXCLUSION_LIST_KEY)) { exclusionList = in.readUTF(); } else if (key.equals(EOS)) { + // an eos can be present after the version header + if (pos == 0) continue; break; } else { loge("Ignore unknown key " + key + "while reading"); @@ -803,6 +806,7 @@ class WifiConfigStore { } catch (IllegalArgumentException e) { loge("Ignore invalid address while reading" + e); } + pos++; } while (true); if (id != -1) { |