Skip to content

Commit

Permalink
Fix dump
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Nov 30, 2023
1 parent b6d545c commit 7f53ac7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions servicetests/tests/JobsExecution/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int main(int argc, char *argv[])
}
// Create Mqtt5Client
std::shared_ptr<Aws::Crt::Mqtt5::Mqtt5Client> client5;
IotJobsClient *jobsClient;
IotJobsClient *jobsClient = nullptr;
if (cmdData.input_mqtt_version == 5UL)
{
// Create the MQTT5 builder and populate it with data from cmdData.
Expand Down Expand Up @@ -444,6 +444,8 @@ int main(int argc, char *argv[])
connectionClosedPromise.get_future().wait();
}
}
delete jobsClient;


return 0;
}
Expand All @@ -463,7 +465,8 @@ void getAvailableJobs(Aws::Crt::String thingName, IotJobsClient &jobsClient)
{
fprintf(stderr, "Error %d occurred\n", ioErr);
}
if (response) {
if (response)
{
if (response->InProgressJobs.has_value())
{
for (JobExecutionSummary job : response->InProgressJobs.value())
Expand Down Expand Up @@ -524,6 +527,7 @@ void getAvailableJobs(Aws::Crt::String thingName, IotJobsClient &jobsClient)
jobsClient.PublishGetPendingJobExecutions(publishRequest, AWS_MQTT_QOS_AT_LEAST_ONCE, publishHandler);
publishDescribeJobExeCompletedPromise.get_future().wait();

fprintf(stderr, "get available jobs waiting iot core answer\n");
getResponse.get_future().wait();
fprintf(stderr, "get available jobs returning\n");
}

0 comments on commit 7f53ac7

Please sign in to comment.