From c2beb1994315ebd33bbdd186a3c97d62a194a9ec Mon Sep 17 00:00:00 2001
From: ctissot <ctissot@localhost>
Date: Thu, 20 Dec 2007 09:55:23 +0000
Subject: [PATCH] I use this bug id (138) as an umbrella for a list of  bugfixes/improvements for the DSML gateway.

---
 opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
index 6f218de..260d5d5 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
@@ -27,11 +27,14 @@
 package org.opends.dsml.protocol;
 
 import java.io.IOException;
+import org.opends.messages.Message;
 
 import org.opends.server.protocols.ldap.AbandonRequestProtocolOp;
 import org.opends.server.protocols.ldap.LDAPMessage;
+import org.opends.server.protocols.ldap.LDAPResultCode;
 import org.opends.server.protocols.ldap.ProtocolOp;
 import org.opends.server.tools.LDAPConnection;
+import org.opends.server.types.LDAPException;
 
 
 
@@ -66,13 +69,10 @@
    */
   public LDAPResult doOperation(ObjectFactory objFactory,
         AbandonRequest abandonRequest)
-    throws IOException
+    throws LDAPException, IOException
   {
     LDAPResult abandonResponse = objFactory.createLDAPResult();
 
-    // Set the id for the response.
-    abandonResponse.setRequestID(abandonRequest.getRequestID());
-
     String abandonIdStr = abandonRequest.getAbandonID();
     int abandonId = 0;
     try
@@ -80,7 +80,8 @@
       abandonId = Integer.parseInt(abandonIdStr);
     } catch (NumberFormatException nfe)
     {
-      throw new IOException(nfe.getMessage());
+      throw new LDAPException(LDAPResultCode.UNWILLING_TO_PERFORM,
+                              Message.raw(nfe.getMessage()));
     }
 
     // Create and send an LDAP request to the server.

--
Gitblit v1.10.0