Fix auth info edition

This commit is contained in:
Sylvain Berfini 2013-11-05 11:42:26 +01:00
parent f08c1c4e11
commit e40cf3bbc4
2 changed files with 7 additions and 12 deletions

View file

@ -123,18 +123,13 @@ public class LinphonePreferences {
* Useful to edit a authInfo (you should call saveAuthInfo after the modifications to save them). * Useful to edit a authInfo (you should call saveAuthInfo after the modifications to save them).
*/ */
private LinphoneAuthInfo getClonedAuthInfo(int n) { private LinphoneAuthInfo getClonedAuthInfo(int n) {
LinphoneProxyConfig prxCfg = getProxyConfig(n); LinphoneAuthInfo authInfo = getAuthInfo(n);
try { if (authInfo == null)
LinphoneAddress addr = LinphoneCoreFactory.instance().createLinphoneAddress(prxCfg.getIdentity()); return null;
LinphoneAuthInfo authInfo = getLc().findAuthInfo(addr.getUserName(), null, addr.getDomain());
LinphoneAuthInfo cloneAuthInfo = authInfo.clone();
getLc().removeAuthInfo(authInfo);
return cloneAuthInfo;
} catch (LinphoneCoreException e) {
e.printStackTrace();
}
return null; LinphoneAuthInfo cloneAuthInfo = authInfo.clone();
getLc().removeAuthInfo(authInfo);
return cloneAuthInfo;
} }
/** /**

@ -1 +1 @@
Subproject commit 120fbea39e56c4fe8b81f67512de43c5113aa267 Subproject commit 263364ac7c4057817f1bb5bcb87f2b69653b749c