android: Change to CONNECTING state if CHILD_SA goes down
authorTobias Brunner <tobias@strongswan.org>
Mon, 14 Jul 2014 13:06:40 +0000 (15:06 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 22 Jul 2014 08:55:51 +0000 (10:55 +0200)
Unless we are disconnecting.  This currently triggers the connecting
dialog, perhaps just updating the status text would do too (when switching
from CONNECTED to CONNECTING, not from DISCONNECTED to CONNECTING).

src/frontends/android/src/org/strongswan/android/logic/CharonVpnService.java

index 31172ab..1302451 100644 (file)
@@ -354,7 +354,10 @@ public class CharonVpnService extends VpnService implements Runnable
                switch (status)
                {
                        case STATE_CHILD_SA_DOWN:
-                               /* we ignore this as we use closeaction=restart */
+                               if (!mIsDisconnecting)
+                               {
+                                       setState(State.CONNECTING);
+                               }
                                break;
                        case STATE_CHILD_SA_UP:
                                setState(State.CONNECTED);