From 01d5388b9a9e84f7c5ac4ebc0ef6669ebdcd6801 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Fri, 21 Dec 2012 13:49:32 +0000
Subject: [PATCH] Additional fix for OPENDJ-554. Stats from SSL connections were not showing up due to the inclusion of an invalid connection handler monitor.  Also tidy up some typos.

---
 opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java b/opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
index 085df2c..aad1f18 100644
--- a/opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
+++ b/opends/src/snmp/src/org/opends/server/snmp/SNMPMonitor.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock Inc.
  */
 package org.opends.server.snmp;
 
@@ -112,7 +113,7 @@
   /**
    * Gets the Connection Handlers Statistics MBean.
    * @return the Set of Connection Handlers Statistics.
-   *     If Statistics do not exixist then an empty Set is returned
+   *         If Statistics do not exist then an empty Set is returned
    */
   public Set<ObjectName> getConnectionHandlersStatistics() {
     Set<ObjectName> results = new HashSet<ObjectName>();
@@ -180,7 +181,8 @@
       for (Iterator iter = monitorObjects.iterator(); iter.hasNext();) {
         ObjectName name = (ObjectName) iter.next();
         if ((name.getCanonicalName().contains("Connection_Handler")) &&
-                (!(name.getCanonicalName().endsWith("_Statistics")))) {
+                (!(name.getCanonicalName().endsWith("_Statistics"))) &&
+                (name.getKeyProperty("Rdn3") == null)) {
           results.add(name);
         }
       }
@@ -197,8 +199,8 @@
    * Returns the ObjectName of the Statistics Connection Handler name.
    * corresponding to the Connection Handler name
    * @param connectionHandlerName The connection handler name
-   * @return the ObjectName of the statistics ObjectName, null if the statistics
-   * could not be found
+   * @return the ObjectName of the statistics ObjectName,
+   *         null if the statistics could not be found
    */
   public ObjectName getConnectionHandlerStatistics(
           ObjectName connectionHandlerName) {

--
Gitblit v1.10.0