Examples of incrementSequenceNumber()


Examples of org.jscsi.parser.InitiatorMessageParser.incrementSequenceNumber()

        unit.write(socketChannel);

        LOGGER.debug("Sending this PDU: " + unit);

        // increment the Command Sequence Number
        if (parser.incrementSequenceNumber()) {
            connection.getSession().incrementCommandSequenceNumber();
        }

    }
View Full Code Here

Examples of org.jscsi.parser.InitiatorMessageParser.incrementSequenceNumber()

            // throw new InternetSCSIException("received ExpStatusSN != local StatusSN + 1");
        }

        // increment CmdSN if not immediate PDU (or Data-Out PDU)
        try {
            if (parser.incrementSequenceNumber()) session.getExpectedCommandSequenceNumber().increment();
        } catch (NullPointerException exc) {

        }

        return pdu;
View Full Code Here

Examples of org.jscsi.parser.TargetMessageParser.incrementSequenceNumber()

                session.setMaximumCommandSequenceNumber(parser.getMaximumCommandSequenceNumber());
            }

            // the PDU expCmdSN is greater than the local expCmdSN, so we
            // have to update the local one
            if (parser.incrementSequenceNumber()) {
                if (connection.getExpectedStatusSequenceNumber().compareTo(parser.getStatusSequenceNumber()) >= 0) {
                    connection.incrementExpectedStatusSequenceNumber();
                } else {
                    LOGGER.error("Status Sequence Number Mismatch (received, expected): " + parser.getStatusSequenceNumber() + ", " + (connection.getExpectedStatusSequenceNumber().getValue() - 1));
                }
View Full Code Here

Examples of org.jscsi.parser.TargetMessageParser.incrementSequenceNumber()

        // set sequence counters
        final TargetMessageParser parser = (TargetMessageParser) pdu.getBasicHeaderSegment().getParser();
        parser.setExpectedCommandSequenceNumber(session.getExpectedCommandSequenceNumber().getValue());
        parser.setMaximumCommandSequenceNumber(session.getMaximumCommandSequenceNumber().getValue());
        final boolean incrementSequenceNumber = parser.incrementSequenceNumber();
        if (incrementSequenceNumber) // set StatSN only if field is not reserved
        parser.setStatusSequenceNumber(connection.getStatusSequenceNumber().getValue());

        if (LOGGER.isDebugEnabled()) LOGGER.debug("Sending this PDU:\n" + pdu);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.