|
@@ -139,9 +139,10 @@ UA_SecureChannel_sendChunk(UA_ChunkInfo *ci, UA_ByteString *dst, size_t offset)
|
|
|
dst->length += UA_SECURE_MESSAGE_HEADER_LENGTH;
|
|
|
offset += UA_SECURE_MESSAGE_HEADER_LENGTH;
|
|
|
|
|
|
- if(++ci->chunksSoFar > connection->remoteConf.maxChunkCount ||
|
|
|
- ci->messageSizeSoFar + offset > connection->remoteConf.maxMessageSize)
|
|
|
- ci->errorCode = UA_STATUSCODE_BADTCPMESSAGETOOLARGE;
|
|
|
+ if(ci->messageSizeSoFar + offset > connection->remoteConf.maxMessageSize)
|
|
|
+ ci->errorCode = UA_STATUSCODE_BADRESPONSETOOLARGE;
|
|
|
+ if(++ci->chunksSoFar > connection->remoteConf.maxChunkCount && connection->remoteConf.maxChunkCount > 0)
|
|
|
+ ci->errorCode = UA_STATUSCODE_BADRESPONSETOOLARGE;
|
|
|
|
|
|
/* Prepare the chunk headers */
|
|
|
UA_SecureConversationMessageHeader respHeader;
|