summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/VpnProfile.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-06-05 14:39:48 +0200
committerArne Schwabe <arne@rfc2549.org>2013-06-05 14:39:48 +0200
commit1e57ad0ef473917864ea1f5983e2ca79932b30c6 (patch)
tree7694f21563e50f95a75704758ea8752e69fabdb0 /src/de/blinkt/openvpn/VpnProfile.java
parent1c900c0ee6de4af5d5fb46ebdaf7ed1929804f5a (diff)
Add support for asking username/password if none is set (closes issue #174)
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index 03fcbc1b..dcca334c 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -659,9 +659,6 @@ public class VpnProfile implements Serializable{
if(mIPv4Address == null || cidrToIPAndNetmask(mIPv4Address) == null)
return R.string.ipv4_format_error;
}
- if(isUserPWAuth() && !nonNull(mUsername)) {
- return R.string.error_empty_username;
- }
if(!mUseDefaultRoute && getCustomRoutes()==null)
return R.string.custom_route_format_error;
@@ -757,10 +754,8 @@ public class VpnProfile implements Serializable{
}
}
- if(isUserPWAuth() && (mPassword.equals("") || mPassword == null)) {
- if(mTransientPW==null)
+ if (isUserPWAuth() && !(nonNull(mUsername) && (nonNull(mPassword) || mTransientPW!=null))) {
return R.string.password;
-
}
return 0;
}