X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=openflow-protocol-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Fserialization%2Ffactories%2FPortModInputMessageFactory.java;h=03c39887f8e786d5365d37b30848183bd0384613;hb=95ebf4e412c17c30adca24757e3c5dc51e1ae492;hp=ded3af6d259b4a794f4cb96bfc8385dc7a75e3e6;hpb=37b396c43ec3d71120f0948016cdc7c278a8c6c8;p=openflowjava.git diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactory.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactory.java index ded3af6d..03c39887 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactory.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/factories/PortModInputMessageFactory.java @@ -33,6 +33,7 @@ public class PortModInputMessageFactory implements OFSerializer { @Override public void serialize(final PortMod message, final ByteBuf outBuffer) { + int index = outBuffer.writerIndex(); ByteBufUtils.writeOFHeader(MESSAGE_TYPE, message, outBuffer, EncodeConstants.EMPTY_LENGTH); outBuffer.writeInt(message.getPortNo().getValue().intValue()); outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_01); @@ -42,7 +43,7 @@ public class PortModInputMessageFactory implements OFSerializer { outBuffer.writeInt(createPortConfigBitmask(message.getMask())); outBuffer.writeInt(createPortFeaturesBitmask(message.getAdvertise())); outBuffer.writeZero(PADDING_IN_PORT_MOD_MESSAGE_03); - ByteBufUtils.updateOFHeaderLength(outBuffer); + ByteBufUtils.updateOFHeaderLength(outBuffer, index); } /**