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

ludovicp
31.23.2010 20715d1be348818b50f63391e97490e406a54719
Fix regression introduced when fixing issues #3395 and #3998
1 files modified
20 ■■■■ changed files
opends/src/server/org/opends/server/replication/protocol/EntryMsg.java 20 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/EntryMsg.java
@@ -115,15 +115,7 @@
      this.destination = Integer.valueOf(destinationString);
      pos += length +1;
      // entry
      length = getNextLength(in, pos);
      this.entryByteArray = new byte[length];
      for (int i=0; i<length; i++)
      {
        entryByteArray[i] = in[pos+i];
      }
      pos += length +1;
      // msgCnt
      if (version >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
      {
        // msgCnt
@@ -132,6 +124,14 @@
        this.msgId = Integer.valueOf(msgcntString);
        pos += length +1;
      }
      // data
      length = in.length - (pos + 1);
      this.entryByteArray = new byte[length];
      for (int i=0; i<length; i++)
      {
        entryByteArray[i] = in[pos+i];
      }
    }
    catch (UnsupportedEncodingException e)
    {
@@ -188,9 +188,9 @@
      pos = addByteArray(senderBytes, resultByteArray, pos);
      pos = addByteArray(destinationBytes, resultByteArray, pos);
      pos = addByteArray(entryBytes, resultByteArray, pos);
      if (version >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
        pos = addByteArray(msgCntBytes, resultByteArray, pos);
      pos = addByteArray(entryBytes, resultByteArray, pos);
      return resultByteArray;
    }