From a0767cd6658135b793fa26dfa40f262fbc9c5093 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 17 Jan 2019 18:06:33 -0800 Subject: [PATCH] Added ability to merge AgentCapabilities from db --- meshcore/agentcore.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 68d0f61..775c72c 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -3235,6 +3235,17 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char ** } } + // Check to see if any capabilities are specified in the db + { + int dbCapabilities = 0; + if (ILibSimpleDataStore_Get(agentHost->masterDb, "AgentCapabilities", NULL, 0) == 4) + { + ILibSimpleDataStore_Get(agentHost->masterDb, "AgentCapabilities", &dbCapabilities, 4); + agentHost->capabilities |= dbCapabilities; + } + } + + #ifdef WIN32 // If running as a Windows service, set basic values to the registry, this allows other applications to know what the mesh agent is doing. {