Continue on missing GPIOs in the monitor/presence
In some cases, if a GPIO is not found, the function returns -1 to exit
the process. To improve this, change the return value from -1 to
continue so each object can be handled separately. This ensures
the JSON file fully parses even if some GPIOs are missing.
Change-Id: I83763d56963e3d2ec9981a95a1a0da17d0882910
Signed-off-by: Yang Chen <yang.chen@quantatw.com>
diff --git a/multi-presence/main.cpp b/multi-presence/main.cpp
index 4b631d9..368f8bb 100644
--- a/multi-presence/main.cpp
+++ b/multi-presence/main.cpp
@@ -134,7 +134,7 @@
if (line == NULL)
{
lg2::error("Failed to find the {GPIO}", "GPIO", lineMsg);
- return -1;
+ continue;
}
/* Parse out inventory argument. */