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

Jean-Noel Rouvignac
04.03.2014 aafa7e2dce3d0bb59184c2b4db5bad92ab467bd5
opendj3-server-dev/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -29,6 +29,7 @@
import java.io.Closeable;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.*;
import java.security.cert.Certificate;
@@ -468,11 +469,6 @@
      SocketChannel clientChannel, String protocol) throws DirectoryException
  {
    this.connectionHandler = connectionHandler;
    if (connectionHandler.isAdminConnectionHandler())
    {
      setNetworkGroup(NetworkGroup.getAdminNetworkGroup());
    }
    this.clientChannel = clientChannel;
    timeoutClientChannel = new TimeoutWriteByteChannel();
    opsInProgressLock = new Object();
@@ -486,15 +482,14 @@
    keepStats = connectionHandler.keepStats();
    this.protocol = protocol;
    writeSelector = new AtomicReference<Selector>();
    clientAddress =
        clientChannel.socket().getInetAddress().getHostAddress();
    clientPort = clientChannel.socket().getPort();
    serverAddress =
        clientChannel.socket().getLocalAddress().getHostAddress();
    serverPort = clientChannel.socket().getLocalPort();
    statTracker =
            this.connectionHandler.getStatTracker();
    final Socket socket = clientChannel.socket();
    clientAddress = socket.getInetAddress().getHostAddress();
    clientPort = socket.getPort();
    serverAddress = socket.getLocalAddress().getHostAddress();
    serverPort = socket.getLocalPort();
    statTracker = this.connectionHandler.getStatTracker();
    if (keepStats)
    {
@@ -519,6 +514,17 @@
    connectionID = DirectoryServer.newConnectionAccepted(this);
  }
  /** {@inheritDoc} */
  @Override
  public NetworkGroup getNetworkGroup()
  {
    if (connectionHandler.isAdminConnectionHandler())
    {
      return NetworkGroup.getAdminNetworkGroup();
    }
    return NetworkGroup.getDefaultNetworkGroup();
  }
  /**
   * Retrieves the connection ID assigned to this connection.
   *