Merge "Avoid inconsistent state when remove fails." into ics-mr1
This commit is contained in:
@@ -1136,12 +1136,14 @@ public class NetworkManagementService extends INetworkManagementService.Stub
|
|||||||
final StringBuilder command = new StringBuilder();
|
final StringBuilder command = new StringBuilder();
|
||||||
command.append("bandwidth removeiquota ").append(iface);
|
command.append("bandwidth removeiquota ").append(iface);
|
||||||
|
|
||||||
|
mActiveQuotaIfaces.remove(iface);
|
||||||
|
mActiveAlertIfaces.remove(iface);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// TODO: support quota shared across interfaces
|
// TODO: support quota shared across interfaces
|
||||||
mConnector.doCommand(command.toString());
|
mConnector.doCommand(command.toString());
|
||||||
mActiveQuotaIfaces.remove(iface);
|
|
||||||
mActiveAlertIfaces.remove(iface);
|
|
||||||
} catch (NativeDaemonConnectorException e) {
|
} catch (NativeDaemonConnectorException e) {
|
||||||
|
// TODO: include current iptables state
|
||||||
throw new IllegalStateException("Error communicating to native daemon", e);
|
throw new IllegalStateException("Error communicating to native daemon", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user