Skip to content

Commit

Permalink
JSON document size increased for topic registration. This was necessa…
Browse files Browse the repository at this point in the history
…ry for the ThreeIconPlugin.
  • Loading branch information
BlueAndi committed Dec 21, 2023
1 parent 1b65713 commit 7092f86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/TopicHandlerService/src/TopicHandlerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,18 @@ void TopicHandlerService::registerTopics(const String& deviceId, IPluginMaintena
if ((false == deviceId.isEmpty()) &&
(nullptr != plugin))
{
const size_t JSON_DOC_SIZE = 512U;
const size_t JSON_DOC_SIZE = 1024U;
DynamicJsonDocument topicsDoc(JSON_DOC_SIZE);
JsonArray jsonTopics = topicsDoc.createNestedArray("topics");

/* Get topics from plugin. */
plugin->getTopics(jsonTopics);

if (true == topicsDoc.overflowed())
{
LOG_ERROR("JSON document has less memory available.");
}

/* Handle each topic */
if (0U < jsonTopics.size())
{
Expand Down

0 comments on commit 7092f86

Please sign in to comment.