summaryrefslogtreecommitdiffstats
path: root/vpn/java/android/net
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2009-08-27 18:45:21 +0800
committerHung-ying Tyan <tyanh@google.com>2009-08-28 09:59:39 +0800
commitbe8b0fc7c1d76f0ed1fc8936a85e3dd47bed2949 (patch)
tree509e3359c3b6bd04c515245d60955644ed532d90 /vpn/java/android/net
parent734b2ba849ac94d789d127c20ffec0293922c893 (diff)
downloadframeworks_native-be8b0fc7c1d76f0ed1fc8936a85e3dd47bed2949.zip
frameworks_native-be8b0fc7c1d76f0ed1fc8936a85e3dd47bed2949.tar.gz
frameworks_native-be8b0fc7c1d76f0ed1fc8936a85e3dd47bed2949.tar.bz2
Simplifies err code propagation.
* Other changes + Re-assign err codes in VpnManager. + Add new err codes: REMOTE_PPP_HUNG_UP, PPP_NEGOTIATION_FAILED. + Delete the state file only if it exists (to prevent logging an unable-to-unlink error). + Extend timeout to 40 seconds.
Diffstat (limited to 'vpn/java/android/net')
-rw-r--r--vpn/java/android/net/vpn/VpnManager.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/vpn/java/android/net/vpn/VpnManager.java b/vpn/java/android/net/vpn/VpnManager.java
index f71bbea..6df612e 100644
--- a/vpn/java/android/net/vpn/VpnManager.java
+++ b/vpn/java/android/net/vpn/VpnManager.java
@@ -45,18 +45,25 @@ public class VpnManager {
/** Key to the error code of a connectivity broadcast event. */
public static final String BROADCAST_ERROR_CODE = "err";
/** Error code to indicate an error from authentication. */
- public static final int VPN_ERROR_AUTH = 1;
+ public static final int VPN_ERROR_AUTH = 51;
/** Error code to indicate the connection attempt failed. */
- public static final int VPN_ERROR_CONNECTION_FAILED = 2;
+ public static final int VPN_ERROR_CONNECTION_FAILED = 101;
/** Error code to indicate the server is not known. */
- public static final int VPN_ERROR_UNKNOWN_SERVER = 3;
+ public static final int VPN_ERROR_UNKNOWN_SERVER = 102;
/** Error code to indicate an error from challenge response. */
- public static final int VPN_ERROR_CHALLENGE = 4;
+ public static final int VPN_ERROR_CHALLENGE = 5;
/** Error code to indicate an error of remote server hanging up. */
- public static final int VPN_ERROR_REMOTE_HUNG_UP = 5;
+ public static final int VPN_ERROR_REMOTE_HUNG_UP = 7;
+ /** Error code to indicate an error of remote PPP server hanging up. */
+ public static final int VPN_ERROR_REMOTE_PPP_HUNG_UP = 48;
+ /** Error code to indicate a PPP negotiation error. */
+ public static final int VPN_ERROR_PPP_NEGOTIATION_FAILED = 42;
/** Error code to indicate an error of losing connectivity. */
- public static final int VPN_ERROR_CONNECTION_LOST = 6;
- private static final int VPN_ERROR_NO_ERROR = 0;
+ public static final int VPN_ERROR_CONNECTION_LOST = 103;
+ /** Largest error code used by VPN. */
+ public static final int VPN_ERROR_LARGEST = 200;
+ /** Error code to indicate a successful connection. */
+ public static final int VPN_ERROR_NO_ERROR = 0;
public static final String PROFILES_PATH = "/data/misc/vpn/profiles";