diff options
| author | 2012-08-29 15:35:57 -0700 | |
|---|---|---|
| committer | 2012-08-29 15:35:57 -0700 | |
| commit | 6bfc88876ab575913299b477528225a4d7bf8232 (patch) | |
| tree | b0d3577fa9a3ba17766da54d930d51b066544d34 /services/java/com | |
| parent | 4bbb13976e54f6325cb013882891c02adea61ec5 (diff) | |
Fix DHCP handling at disconnect/reconnect
Wifi can have a quick disconnection followed by a reconnection. We used to
create a new DHCP state machine thread for every new connection and
never really waited until it quit after disconnect. This may have lead to
situations where repeated disconnect/reconnects resulted in multiple dhcp
start calls.
We now keep the statemachine after a disconnect and only shut it at supplicant
stop.
Bug: 6417686
Change-Id: Icf66efdc654be886e3eb46c81f09f8cce536f2f6
Diffstat (limited to 'services/java/com')
| -rw-r--r-- | services/java/com/android/server/WifiService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java index 84d670e3e163..6bc5e1074120 100644 --- a/services/java/com/android/server/WifiService.java +++ b/services/java/com/android/server/WifiService.java @@ -240,7 +240,7 @@ public class WifiService extends IWifiManager.Stub { switch (msg.what) { case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) { - Slog.d(TAG, "New client listening to asynchronous messages"); + if (DBG) Slog.d(TAG, "New client listening to asynchronous messages"); mClients.add((AsyncChannel) msg.obj); } else { Slog.e(TAG, "Client connection failure, error=" + msg.arg1); @@ -249,9 +249,9 @@ public class WifiService extends IWifiManager.Stub { } case AsyncChannel.CMD_CHANNEL_DISCONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SEND_UNSUCCESSFUL) { - Slog.d(TAG, "Send failed, client connection lost"); + if (DBG) Slog.d(TAG, "Send failed, client connection lost"); } else { - Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); + if (DBG) Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); } mClients.remove((AsyncChannel) msg.obj); break; |