Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9aed14ef authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 79c4ad17: am ccdeb428: Merge "Avoid inconsistent state when remove fails." into ics-mr1

* commit '79c4ad17':
  Avoid inconsistent state when remove fails.
parents 97c9e987 79c4ad17
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
            }
        }