Merge "Notify success before configuring the IP address." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d8a028af82
@@ -724,6 +724,7 @@ public class DhcpClient extends StateMachine {
|
|||||||
mOffer = null;
|
mOffer = null;
|
||||||
Log.d(TAG, "Confirmed lease: " + mDhcpLease);
|
Log.d(TAG, "Confirmed lease: " + mDhcpLease);
|
||||||
setDhcpLeaseExpiry(packet);
|
setDhcpLeaseExpiry(packet);
|
||||||
|
notifySuccess();
|
||||||
transitionTo(mConfiguringInterfaceState);
|
transitionTo(mConfiguringInterfaceState);
|
||||||
}
|
}
|
||||||
} else if (packet instanceof DhcpNakPacket) {
|
} else if (packet instanceof DhcpNakPacket) {
|
||||||
@@ -794,7 +795,6 @@ public class DhcpClient extends StateMachine {
|
|||||||
@Override
|
@Override
|
||||||
public void enter() {
|
public void enter() {
|
||||||
super.enter();
|
super.enter();
|
||||||
notifySuccess();
|
|
||||||
// TODO: DhcpStateMachine only supported renewing at 50% of the lease time,
|
// TODO: DhcpStateMachine only supported renewing at 50% of the lease time,
|
||||||
// and did not support rebinding. Now that the legacy DHCP client is gone, fix this.
|
// and did not support rebinding. Now that the legacy DHCP client is gone, fix this.
|
||||||
scheduleRenew();
|
scheduleRenew();
|
||||||
@@ -850,6 +850,7 @@ public class DhcpClient extends StateMachine {
|
|||||||
if (!isValidPacket(packet)) return;
|
if (!isValidPacket(packet)) return;
|
||||||
if ((packet instanceof DhcpAckPacket)) {
|
if ((packet instanceof DhcpAckPacket)) {
|
||||||
setDhcpLeaseExpiry(packet);
|
setDhcpLeaseExpiry(packet);
|
||||||
|
notifySuccess();
|
||||||
transitionTo(mDhcpBoundState);
|
transitionTo(mDhcpBoundState);
|
||||||
} else if (packet instanceof DhcpNakPacket) {
|
} else if (packet instanceof DhcpNakPacket) {
|
||||||
transitionTo(mDhcpInitState);
|
transitionTo(mDhcpInitState);
|
||||||
|
|||||||
Reference in New Issue
Block a user