Skip to content

Commit

Permalink
Client: Remove ackResponseCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Sep 21, 2018
1 parent 0072ed9 commit 43ac1ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/client/ua_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ receivePacketAsync(UA_Client *client) {
UA_StatusCode retval = UA_STATUSCODE_GOOD;
if (UA_Client_getState(client) == UA_CLIENTSTATE_DISCONNECTED ||
UA_Client_getState(client) == UA_CLIENTSTATE_WAITING_FOR_ACK) {
retval = UA_Connection_receiveChunksNonBlocking(
&client->connection, client, client->ackResponseCallback);
retval = UA_Connection_receiveChunksNonBlocking(&client->connection, client, processACKResponseAsync);
}
else if(UA_Client_getState(client) == UA_CLIENTSTATE_CONNECTED) {
retval = UA_Connection_receiveChunksNonBlocking(
Expand Down
3 changes: 1 addition & 2 deletions src/client/ua_client_connect_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static UA_StatusCode
requestGetEndpoints(UA_Client *client, UA_UInt32 *requestId);

/*receives hello ack, opens secure channel*/
static UA_StatusCode
UA_StatusCode
processACKResponseAsync(void *application, UA_Connection *connection,
UA_ByteString *chunk) {
UA_Client *client = (UA_Client*)application;
Expand Down Expand Up @@ -567,7 +567,6 @@ UA_Client_connect_async(UA_Client *client, const char *endpointUrl,
UA_ChannelSecurityToken_init(&client->channel.securityToken);
client->channel.state = UA_SECURECHANNELSTATE_FRESH;
/* Set up further callback function to handle secure channel and session establishment */
client->ackResponseCallback = processACKResponseAsync;
client->openSecureChannelResponseCallback = processOPNResponse;
client->endpointsHandshake = true;

Expand Down
5 changes: 4 additions & 1 deletion src/client/ua_client_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ struct UA_Client {
UA_NodeId authenticationToken;
UA_UInt32 requestHandle;
/* Connection Establishment (async) */
UA_Connection_processChunk ackResponseCallback;
UA_Connection_processChunk openSecureChannelResponseCallback;
UA_Boolean endpointsHandshake;

Expand Down Expand Up @@ -200,6 +199,10 @@ UA_Client_getEndpointsInternal(UA_Client *client,
UA_StatusCode
receivePacketAsync(UA_Client *client);

UA_StatusCode
processACKResponseAsync(void *application, UA_Connection *connection,
UA_ByteString *chunk);

UA_StatusCode
openSecureChannel(UA_Client *client, UA_Boolean renew);

Expand Down

0 comments on commit 43ac1ee

Please sign in to comment.