Skip to content

Commit

Permalink
Remove deprecated methods from generate corpus
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro committed Apr 12, 2018
1 parent d4f40c6 commit 4381a3a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions tests/fuzz/corpus_generator.c
Expand Up @@ -10,10 +10,6 @@
* corpus to the repository.
*/

#ifdef _MSC_VER
#pragma warning(disable:4996) // warning C4996: 'UA_Client_Subscriptions_manuallySendPublishRequest': was declared deprecated
#endif

#ifndef UA_DEBUG_DUMP_PKGS_FILE
#error UA_DEBUG_DUMP_PKGS_FILE must be defined
#endif
Expand All @@ -29,6 +25,7 @@
#include <unistd.h>
#include <ua_client_highlevel.h>
#include <ua_client_subscriptions.h>
#include <client/ua_client_internal.h>

#include "ua_config_default.h"

Expand Down Expand Up @@ -425,7 +422,16 @@ subscriptionRequests(UA_Client *client) {
monId = monResponse.monitoredItemId;

// publishRequest
ASSERT_GOOD(UA_Client_Subscriptions_manuallySendPublishRequest(client));
UA_PublishRequest publishRequest;
UA_PublishRequest_init(&publishRequest);
ASSERT_GOOD(UA_Client_preparePublishRequest(client, &publishRequest));
UA_PublishResponse publishResponse;
__UA_Client_Service(client, &publishRequest, &UA_TYPES[UA_TYPES_PUBLISHREQUEST],
&publishResponse, &UA_TYPES[UA_TYPES_PUBLISHRESPONSE]);
// here we don't care about the return value since it may be UA_STATUSCODE_BADMESSAGENOTAVAILABLE
// ASSERT_GOOD(publishResponse.responseHeader.serviceResult);
UA_PublishRequest_deleteMembers(&publishRequest);
UA_PublishResponse_deleteMembers(&publishResponse);

// republishRequest
UA_RepublishRequest republishRequest;
Expand Down

0 comments on commit 4381a3a

Please sign in to comment.