mirror of
https://github.com/correl/mage.git
synced 2024-12-29 11:09:17 +00:00
Rename connection.password to connection.adminpassword.
This commit is contained in:
parent
d8060a76e4
commit
a42c415404
3 changed files with 8 additions and 8 deletions
|
@ -44,7 +44,7 @@ public class Connection {
|
|||
private String host;
|
||||
private int port;
|
||||
private String username;
|
||||
private String password;
|
||||
private String adminPassword;
|
||||
private ProxyType proxyType;
|
||||
private String proxyHost;
|
||||
private int proxyPort;
|
||||
|
@ -164,12 +164,12 @@ public class Connection {
|
|||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
public String getAdminPassword() {
|
||||
return adminPassword;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
public void setAdminPassword(String adminPassword) {
|
||||
this.adminPassword = adminPassword;
|
||||
}
|
||||
|
||||
public String getProxyHost() {
|
||||
|
|
|
@ -278,14 +278,14 @@ public class SessionImpl implements Session {
|
|||
|
||||
this.sessionId = callbackClient.getSessionId();
|
||||
boolean registerResult;
|
||||
if (connection.getPassword() == null) {
|
||||
if (connection.getAdminPassword() == null) {
|
||||
// for backward compatibility. don't remove twice call - first one does nothing but for version checking
|
||||
registerResult = server.registerClient(connection.getUsername(), sessionId, client.getVersion());
|
||||
if (registerResult) {
|
||||
server.setUserData(connection.getUsername(), sessionId, connection.getUserData());
|
||||
}
|
||||
} else {
|
||||
registerResult = server.registerAdmin(connection.getPassword(), sessionId, client.getVersion());
|
||||
registerResult = server.registerAdmin(connection.getAdminPassword(), sessionId, client.getVersion());
|
||||
}
|
||||
if (registerResult) {
|
||||
sessionState = SessionState.CONNECTED;
|
||||
|
|
|
@ -413,7 +413,7 @@ public class ConnectDialog extends JDialog {
|
|||
connection = new Connection();
|
||||
connection.setHost(this.txtServer.getText());
|
||||
connection.setPort(Integer.valueOf(this.txtPort.getText()));
|
||||
connection.setPassword(new String(txtPassword.getPassword()));
|
||||
connection.setAdminPassword(new String(txtPassword.getPassword()));
|
||||
connection.setUsername("Admin");
|
||||
connection.setProxyType((ProxyType) this.cbProxyType.getSelectedItem());
|
||||
if (!this.cbProxyType.getSelectedItem().equals(ProxyType.NONE)) {
|
||||
|
|
Loading…
Reference in a new issue