From 7fbe85ded3b572d5929fbb5ce145150b08058b3a Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 22 Mar 2007 23:04:35 +0000
Subject: [PATCH] Update the ClientConnection.disconnect() method variant that takes a message ID and optional set of arguments so that it does not attempt to get the corresponding message string if the message ID is invalid (e.g., -1) and therefore no message is to be sent to the client or written to the server log.

---
 opends/src/server/org/opends/server/api/ClientConnection.java |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/api/ClientConnection.java b/opends/src/server/org/opends/server/api/ClientConnection.java
index b5dd809..4eaf510 100644
--- a/opends/src/server/org/opends/server/api/ClientConnection.java
+++ b/opends/src/server/org/opends/server/api/ClientConnection.java
@@ -521,9 +521,16 @@
                                boolean sendNotification,
                                int messageID, Object... arguments)
   {
-    String message = getMessage(messageID, arguments);
-    disconnect(disconnectReason, sendNotification, message,
-               messageID);
+    if (messageID <= 0)
+    {
+      disconnect(disconnectReason, sendNotification, null, -1);
+    }
+    else
+    {
+      String message = getMessage(messageID, arguments);
+      disconnect(disconnectReason, sendNotification, message,
+                 messageID);
+    }
   }
 
 

--
Gitblit v1.10.0