mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
21.09.2007 c0b4060d4467969abf721756f1907653519b62b3
opends/src/server/org/opends/server/core/SearchOperation.java
@@ -1115,15 +1115,27 @@
    // Send the entry to the client.
    if (pluginResult.sendEntry())
    {
      clientConnection.sendSearchEntry(this, searchEntry);
      try
      {
        clientConnection.sendSearchEntry(this, searchEntry);
      // Log the entry sent to the client.
      logSearchResultEntry(this, searchEntry);
        // Log the entry sent to the client.
        logSearchResultEntry(this, searchEntry);
      entriesSent++;
        entriesSent++;
      }
      catch (DirectoryException de)
      {
        if (debugEnabled())
        {
          debugCaught(DebugLogLevel.ERROR, de);
        }
        setResponseData(de);
        return false;
      }
    }
    return pluginResult.continueSearch();
  }
@@ -1201,19 +1213,32 @@
    // to send any more.
    if (pluginResult.sendReference())
    {
      if (clientConnection.sendSearchReference(this, reference))
      try
      {
        // Log the entry sent to the client.
        logSearchResultReference(this, reference);
        referencesSent++;
        if (clientConnection.sendSearchReference(this, reference))
        {
          // Log the entry sent to the client.
          logSearchResultReference(this, reference);
          referencesSent++;
        // FIXME -- Should the size limit apply here?
          // FIXME -- Should the size limit apply here?
        }
        else
        {
          // We know that the client can't handle referrals, so we won't try to
          // send it any more.
          clientAcceptsReferrals = false;
        }
      }
      else
      catch (DirectoryException de)
      {
        // We know that the client can't handle referrals, so we won't try to
        // send it any more.
        clientAcceptsReferrals = false;
        if (debugEnabled())
        {
          debugCaught(DebugLogLevel.ERROR, de);
        }
        setResponseData(de);
        return false;
      }
    }