summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-25 02:51:46 -0500
committerPeter Kozak <spag@golwen.net>2013-02-25 02:51:46 -0500
commit5dcdeb1c1f8c53fd80a0443d61a289e583091416 (patch)
treedd1fe01346586eec3ffdcf187d91ca6e6c1bcf6d /app/models
parent86a77e472a54f6091eebffae42d638c3c826c13d (diff)
logout if node ip and homebase ip differ on multi node setups only
Diffstat (limited to 'app/models')
-rw-r--r--app/models/sip_account.rb2
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