Skip to content

Commit

Permalink
about 25% of implementing the 'skipping' of the encoder, relates to #492
Browse files Browse the repository at this point in the history
  • Loading branch information
Stasik0 committed Dec 25, 2015
1 parent b8e278d commit 4309d6e
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 107 deletions.
3 changes: 2 additions & 1 deletion src/client/ua_client.c
Expand Up @@ -455,7 +455,8 @@ static UA_StatusCode CloseSecureChannel(UA_Client *client) {
retval |= UA_SymmetricAlgorithmSecurityHeader_encodeBinary(&symHeader, &message, &offset);
retval |= UA_SequenceHeader_encodeBinary(&seqHeader, &message, &offset);
retval |= UA_NodeId_encodeBinary(&typeId, &message, &offset);
retval |= UA_encodeBinary(&request, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST], &message, &offset);
size_t skip = 0;
retval |= UA_encodeBinary(&request, &UA_TYPES[UA_TYPES_CLOSESECURECHANNELREQUEST], &message, &offset, &skip);

msgHeader.messageHeader.messageSize = offset;
offset = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/ua_securechannel.c
Expand Up @@ -135,7 +135,8 @@ UA_StatusCode UA_SecureChannel_sendBinaryMessage(UA_SecureChannel *channel, UA_U

size_t messagePos = 24; // after the headers
retval |= UA_NodeId_encodeBinary(&typeId, &message, &messagePos);
retval |= UA_encodeBinary(content, contentType, &message, &messagePos);
size_t skip = 0;
retval |= UA_encodeBinary(content, contentType, &message, &messagePos, &skip);

if(retval != UA_STATUSCODE_GOOD) {
connection->releaseSendBuffer(connection, &message);
Expand Down

0 comments on commit 4309d6e

Please sign in to comment.