summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArchit Aggarwal <architag@amazon.com>2020-11-24 17:13:11 -0800
committerGitHub <noreply@github.com>2020-11-24 17:13:11 -0800
commit152b7db2c1f146a181d75798d10e3840281c9fa5 (patch)
treee5a50e0e28ddf19f16d32c663316222c219c250b
parente2652a87112493e9a95e8ccbe0d3c2626b7be1f7 (diff)
downloadfreertos-git-152b7db2c1f146a181d75798d10e3840281c9fa5.tar.gz
Add "Demo completed successfully" log in Jobs demo (#421)
-rwxr-xr-xFreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c
index 055398dff..b7e3f97e0 100755
--- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c
+++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c
@@ -1,5 +1,5 @@
/*
- * FreeRTOS Kernel V10.3.0
+ * FreeRTOS V202011.00
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -19,8 +19,8 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * http://www.FreeRTOS.org
- * http://aws.amazon.com/freertos
+ * https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
*
*/
@@ -828,6 +828,7 @@ void prvJobsDemoTask( void * pvParameters )
NEXT_JOB_EXECUTION_CHANGED_TOPIC( democonfigTHING_NAME ),
sizeof( NEXT_JOB_EXECUTION_CHANGED_TOPIC( democonfigTHING_NAME ) ) - 1 ) != pdPASS )
{
+ xDemoStatus == pdFAIL;
LogError( ( "Failed to subscribe unsubscribe from the NextJobExecutionChanged API of AWS IoT Jobs service: "
"Topic=%s", NEXT_JOB_EXECUTION_CHANGED_TOPIC( democonfigTHING_NAME ) ) );
}
@@ -835,9 +836,15 @@ void prvJobsDemoTask( void * pvParameters )
/* Disconnect the MQTT and network connections with AWS IoT. */
if( xDisconnectMqttSession( &xMqttContext, &xNetworkContext ) != pdPASS )
{
+ xDemoStatus == pdFAIL;
LogError( ( "Disconnection from AWS Iot failed..." ) );
}
+ if( ( xDemoEncounteredError == pdFALSE ) && ( xDemoStatus == pdPASS ) )
+ {
+ LogInfo( ( "Demo completed successfully." ) );
+ }
+
/* Delete this demo task. */
LogInfo( ( "Deleting Jobs Demo task." ) );
vTaskDelete( NULL );