From: Michal Polkorab Date: Tue, 25 Mar 2014 15:59:52 +0000 (-0700) Subject: ExperimenterAction length computation added X-Git-Tag: release/helium~96 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=7b1bc70b4a7f1ca62b0a6530ff2d4b48349e5620;p=openflowjava.git ExperimenterAction length computation added Signed-off-by: Michal Polkorab --- diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializer.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializer.java index 10cd78d7..5490bdbb 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializer.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ActionsSerializer.java @@ -335,6 +335,10 @@ public abstract class ActionsSerializer { if ((paddingRemainder) != 0) { lengthOfActions += EncodeConstants.PADDING - paddingRemainder; } + } else if (action.getType().isAssignableFrom(Experimenter.class)) { + ExperimenterAction experimenterAction = action.getAugmentation(ExperimenterAction.class); + lengthOfActions += experimenterAction.getData().length; + lengthOfActions += EncodeConstants.SIZE_OF_LONG_IN_BYTES; } else { lengthOfActions += LENGTH_OF_OTHER_ACTIONS; }