From 7f53ac788156f327a9e0f92b288aaab279ece55a Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Thu, 30 Nov 2023 09:47:42 -0800 Subject: [PATCH] Fix dump --- servicetests/tests/JobsExecution/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/servicetests/tests/JobsExecution/main.cpp b/servicetests/tests/JobsExecution/main.cpp index c98807cd7..9df3010e3 100644 --- a/servicetests/tests/JobsExecution/main.cpp +++ b/servicetests/tests/JobsExecution/main.cpp @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) } // Create Mqtt5Client std::shared_ptr client5; - IotJobsClient *jobsClient; + IotJobsClient *jobsClient = nullptr; if (cmdData.input_mqtt_version == 5UL) { // Create the MQTT5 builder and populate it with data from cmdData. @@ -444,6 +444,8 @@ int main(int argc, char *argv[]) connectionClosedPromise.get_future().wait(); } } + delete jobsClient; + return 0; } @@ -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()) @@ -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"); }