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