summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@android.com> 2011-11-08 17:27:03 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-11-08 17:27:03 -0800
commitccdeb428ef541bab1bbc6ee3e33c4fb6ccbec42a (patch)
tree71148ebfc5b92467408b8f1a7e5e37b464f481f3
parentbc0b010ecc7254b0e2c7a0268e5242557579b471 (diff)
parent38ddeaa67e52810da5db42895edb74b79111ec53 (diff)
Merge "Avoid inconsistent state when remove fails." into ics-mr1
-rw-r--r--services/java/com/android/server/NetworkManagementService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 6887de32e112..da960aeae5e3 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -1136,12 +1136,14 @@ public class NetworkManagementService extends INetworkManagementService.Stub
final StringBuilder command = new StringBuilder();
command.append("bandwidth removeiquota ").append(iface);
+ mActiveQuotaIfaces.remove(iface);
+ mActiveAlertIfaces.remove(iface);
+
try {
// TODO: support quota shared across interfaces
mConnector.doCommand(command.toString());
- mActiveQuotaIfaces.remove(iface);
- mActiveAlertIfaces.remove(iface);
} catch (NativeDaemonConnectorException e) {
+ // TODO: include current iptables state
throw new IllegalStateException("Error communicating to native daemon", e);
}
}