import java.nio.charset.Charset;
import java.util.List;
-import org.opendaylight.controller.netconf.util.messages.NetconfMessageHeader;
+import org.opendaylight.controller.netconf.util.messages.NetconfMessageConstants;
import org.opendaylight.protocol.framework.DeserializerException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
if (chunkSize != -1 && isParsed) {
in.readBytes(byteBufMsg, chunkSize);
- logger.debug("Chunked data of size {} read.", chunkSize);
isParsed = false;
} else {
throw new DeserializerException("Unable to parse chunked data or header.");
}
} catch (Exception e) {
- logger.debug("Failed to decode chunked message.", e);
+ logger.error("Failed to decode chunked message.", e);
this.exceptionCaught(ctx, e);
}
}
}
private int readHeader(ByteBuf in) {
- ByteBuf chunkSize = Unpooled.buffer(NetconfMessageHeader.MIN_HEADER_LENGTH,
- NetconfMessageHeader.MAX_HEADER_LENGTH);
+ ByteBuf chunkSize = Unpooled.buffer(NetconfMessageConstants.MIN_HEADER_LENGTH,
+ NetconfMessageConstants.MAX_HEADER_LENGTH);
byte b = in.readByte();
if (b != 10)
return -1;