Browse Source

device: make sure to set the host if activating from device

bboozzoo/device-cache
Maciek Borzecki 10 years ago
parent
commit
5253bb9570
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/device.vala

+ 5
- 0
src/device.vala View File

@ -155,11 +155,16 @@ class Device : Object {
*/
public void activate_from_device(Device dev) {
if (host == null) {
host = dev.host;
tcp_port = dev.tcp_port;
activate();
} else if (dev.host.to_string() != host.to_string()) {
deactivate();
host = dev.host;
tcp_port = dev.tcp_port;
activate();
} else {
// same host, assuming no activation needed
debug("device %s already active", dev.to_string());
}
}


Loading…
Cancel
Save