From cf4107b24d1f1bd634ad7fd935d6e08cb8b026cb Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Mon, 26 May 2008 14:16:50 +0000
Subject: [PATCH] Fixes :

---
 opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java b/opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
index 67e2120..8358769 100644
--- a/opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
+++ b/opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
@@ -97,8 +97,18 @@
    * @return an OID representing the connection handler:port
    */
   public String getDsApplIfProtocol() {
-//      return  new String("1.3.6.1..27.3.") + portNumber;
-      return DsApplIfProtocol;
+      String portNumber = (String)this.monitor.getAttribute
+              (this.connectionHandlerName, "ds-connectionhandler-listener");
+      if (portNumber==null) {
+          return this.DsApplIfProtocol;
+      }
+      else {
+          int index = portNumber.lastIndexOf(":");
+          if (index==-1) {
+              return this.DsApplIfProtocol;
+          }
+          return  new String("1.3.6.1..27.3.") + portNumber.substring(index+1);
+      }
   }
 
   /**

--
Gitblit v1.10.0