From 12f8dc4509e8905a35e6e20ba4bbd295d9218fa1 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Thu, 17 Jan 2019 15:06:16 -0800 Subject: [PATCH] Added MeshCommand_CoreOk. --- meshcore/agentcore.c | 6 ++++++ meshcore/agentcore.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 29bb3aa..2abc9a7 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -2345,6 +2345,12 @@ void MeshServer_ProcessCommand(ILibWebClient_StateObject WebStateObject, MeshAge break; } + case MeshCommand_CoreOk: // Message from the server indicating our meshcore is ok. No update needed. + { + // TODO: Start the core if we have not done it already. + //printf("CORE OK\r\n"); + break; + } case MeshCommand_AgentHash: { if (agent->disableUpdate != 0) { break; } diff --git a/meshcore/agentcore.h b/meshcore/agentcore.h index c4064ef..4f7386c 100644 --- a/meshcore/agentcore.h +++ b/meshcore/agentcore.h @@ -106,7 +106,8 @@ typedef enum MeshCommands_Binary MeshCommand_AgentHash = 12, // Request/return the SHA384 hash of the agent executable MeshCommand_AgentUpdate = 13, // Indicate the start and end of the mesh agent binary transfer MeshCommand_AgentUpdateBlock = 14, // Part of the mesh agent sent from the server to the agent, confirmation/flowcontrol from agent to server - MeshCommand_AgentTag = 15 // Send the mesh agent tag to the server + MeshCommand_AgentTag = 15, // Send the mesh agent tag to the server + MeshCommand_CoreOk = 16 // Sent by the server to indicate the meshcore is ok } MeshCommands_Binary; #pragma pack(push,1)