From 9447cd5898d6b30411ed13d2ce6dbc1df191971d Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Tue, 03 Jun 2014 14:27:14 +0000
Subject: [PATCH] Fix OPENDJ-1488 control-panel: LDAPS connection handler should not be displayed in monitoring section when it is disabled

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java
index 9ac953a..a83a86b 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/ConnectionHandlerMonitoringPanel.java
@@ -22,6 +22,7 @@
  *
  *
  *      Copyright 2009-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2014 ForgeRock AS.
  */
 package org.opends.guitools.controlpanel.ui;
 
@@ -589,10 +590,12 @@
 
   private boolean protocolHasMonitoring(ConnectionHandlerDescriptor ch)
   {
-    return (ch.getProtocol() == Protocol.LDAP) ||
-    (ch.getProtocol() == Protocol.LDAPS) ||
-    (ch.getProtocol() == Protocol.LDAP_STARTTLS) ||
-    (ch.getProtocol() == Protocol.OTHER);
+    if (ch.getState() == State.DISABLED)
+      return false;
+    return ch.getProtocol() == Protocol.LDAP ||
+      ch.getProtocol() == Protocol.LDAPS ||
+      ch.getProtocol() == Protocol.LDAP_STARTTLS ||
+      ch.getProtocol() == Protocol.OTHER;
   }
 
   /**

--
Gitblit v1.10.0