From 1815f3ff74b2898b8c41a79a4e0466381d85a56e Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Wed, 23 Apr 2008 15:47:10 +0000
Subject: [PATCH] Fixes :

---
 opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java b/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java
index 5cf9d0b..669d545 100644
--- a/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java
+++ b/opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/SNMPInetAddressAcl.java
@@ -59,7 +59,7 @@
     private SortedSet<String> trapsDestinations;
     private String trapsCommunity;
 
-    private SortedSet<String> communitiesList;
+    private String communities;
 
 
     /**
@@ -68,6 +68,7 @@
      */
     public SNMPInetAddressAcl(SNMPConnectionHandlerCfg configuration) {
         super();
+        // Get the current configuration
         this.currentConfig = configuration;
 
         // hostsList
@@ -85,10 +86,12 @@
             }
         }
 
+        // Get the list of trap destinations
         this.trapsDestinations = this.currentConfig.getTrapsDestination();
-        this.communitiesList = this.currentConfig.getCommunity();
+        // Get the community string to accept
+        this.communities = this.currentConfig.getCommunity();
+        // Get the community string to set in the traps
         this.trapsCommunity = this.currentConfig.getTrapsCommunity();
-
     }
 
     /**
@@ -140,7 +143,7 @@
      * {@inheritDoc}
      */
     public boolean checkCommunity(String community) {
-        return this.communitiesList.contains(community);
+        return this.communities.equals(community);
     }
 
     /**

--
Gitblit v1.10.0