diff options
author | Peter Kozak <spag@golwen.net> | 2013-02-25 02:51:46 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-02-25 02:51:46 -0500 |
commit | 5dcdeb1c1f8c53fd80a0443d61a289e583091416 (patch) | |
tree | dd1fe01346586eec3ffdcf187d91ca6e6c1bcf6d /app | |
parent | 86a77e472a54f6091eebffae42d638c3c826c13d (diff) |
logout if node ip and homebase ip differ on multi node setups only
Diffstat (limited to 'app')
-rw-r--r-- | app/models/sip_account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb index 2b8e95f..420e395 100644 --- a/app/models/sip_account.rb +++ b/app/models/sip_account.rb @@ -206,7 +206,7 @@ class SipAccount < ActiveRecord::Base # log out phone if sip_account is not on this node def log_out_phone_if_not_local - if self.gs_node_id && ! GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS'), :id => self.gs_node_id).first + if self.gs_node_id && GsNode.count > 1 && ! GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS'), :id => self.gs_node_id).first self.phones.each do |phone| phone.user_logout; end |