summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-10 09:52:26 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-10 09:52:26 +0200
commit1e240293009817680e715c1fada89d61836850eb (patch)
treeb67fdbad395cabc707c17b7d563e0e66d0adaddc /src/de/blinkt/openvpn
parent26ea32d922c24ff837e0a15c61e22b685b5651e5 (diff)
Fix duplicate inline tag (closes issue #51)
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/ConfigConverter.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/de/blinkt/openvpn/ConfigConverter.java b/src/de/blinkt/openvpn/ConfigConverter.java
index 9b97cf14..101c90b0 100644
--- a/src/de/blinkt/openvpn/ConfigConverter.java
+++ b/src/de/blinkt/openvpn/ConfigConverter.java
@@ -136,7 +136,7 @@ public class ConfigConverter extends ListActivity {
len = fis.read(buf);
}
fis.close();
- return filedata;
+ return VpnProfile.INLINE_TAG + filedata;
} catch (FileNotFoundException e) {
log(e.getLocalizedMessage());
} catch (IOException e) {
@@ -154,15 +154,16 @@ public class ConfigConverter extends ListActivity {
// This where I would like to have a c++ style
// void embedFile(std::string & option)
- mResult.mCaFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mCaFilename);
- mResult.mClientCertFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mClientCertFilename);
- mResult.mClientKeyFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mClientKeyFilename);
- mResult.mTLSAuthFilename = VpnProfile.INLINE_TAG + embedFile(mResult.mTLSAuthFilename);
+ mResult.mCaFilename = embedFile(mResult.mCaFilename);
+ mResult.mClientCertFilename = embedFile(mResult.mClientCertFilename);
+ mResult.mClientKeyFilename = embedFile(mResult.mClientKeyFilename);
+ mResult.mTLSAuthFilename = embedFile(mResult.mTLSAuthFilename);
if(mResult.mUsername != null && !mResult.mUsername.equals("")){
String data =embedFile(mResult.mUsername);
mResult.mName=null;
if(data!=null) {
+ data = data.replace(VpnProfile.INLINE_TAG, "");
String[] parts = data.split("\n");
if(parts.length >= 2) {
mResult.mName=parts[0];