3.1.5 Message Processing and Sequencing Rules
Whenever an error occurs during the processing of a message sent by a client, the server MUST report an error back to the client as follows:
Stop processing the message sent by the client.
Respond with the message header (only) of the message sent by the client, keeping _msg field intact.
Set the _status field to the error code value.
When a message arrives, the server MUST check the field value to determine whether it is a known type (see section 2.2.2). If the type is not known, the server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.
The server MUST then validate the _ulChecksum field value if the message type is one of the following:
To validate the _ulChecksum field value, the server MUST check the value that the client specified in the _iClientVersion field in the CPMConnectIn message.
If the _iClientVersion field is less than 0x00000008 and the _ulChecksum field is not set to 0x00000000, the server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error. The server MUST NOT validate the _ulChecksum field for clients that set the _iClientVersion field to a value less than 0x00000008.
If the _iClientVersion field value is 0x00000008 or greater, the server MUST validate that the _ulChecksum field was calculated as specified in section 3.2.4. If the _ulChecksum value is invalid, the server MUST report a STATUS_INVALID_PARAMETER (0xC000000D) error.
Next, the server checks which state it is in. If its state is "not initialized", the server MUST report a CI_E_NOT_INITIALIZED (0x8004180B) error. If its state is "shutting down", the server MUST report a CI_E_SHUTDOWN (0x80041812) error.
After a header has been determined to be valid and after the server has been determined to be in "running" state, further message-specific processing MUST be done as specified in the following subsections.
Some messages are valid only after a previous message has been sent. Typically, an ID or handle from the earlier message is required as input to the later message. These requirements are detailed in the following sections. The following table summarizes the relationship between messages.
Figure 6: Relationship between messages