Skip to content

Commit

Permalink
Fix issue #1: multiple VNC servers at same address.
Browse files Browse the repository at this point in the history
"Valence does not allow multiple VNC servers to be configured on the same host"
  • Loading branch information
simmons committed Jul 12, 2012
1 parent 9005ad5 commit 44cb4dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/com/cafbit/valence/device/ValenceDevice.java
Expand Up @@ -101,4 +101,28 @@ public String toString() {
return "valence://"+address+"/";
}

// the superclass hashes address; we hash port
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + port;
return result;
}

// the superclass compares address; we compare port
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
ValenceDevice other = (ValenceDevice) obj;
if (port != other.port)
return false;
return true;
}

}
2 changes: 1 addition & 1 deletion src/com/cafbit/valence/device/ValenceDeviceSetupView.java
Expand Up @@ -212,7 +212,7 @@ private void createPhase2() {
TextView macAuthLabel = new TextView(context);
macAuthLabel.setText(
"Mac OS X authentication is required if you are " +
"connecting to a machine running Mac OS X 10.7 Lion."
"connecting to a machine running Mac OS X 10.7 Lion. (Or later updates to 10.6 Snow Leopard!)"
);
layout.addView(macAuthLabel);

Expand Down

0 comments on commit 44cb4dd

Please sign in to comment.