mesh: Validate application by comparing composition data
authorMichał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Fri, 26 Jul 2019 06:36:03 +0000 (08:36 +0200)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 16:24:20 +0000 (21:54 +0530)
commit11f42f523d664704cda856933cf2c308ee7cc6b3
tree74eea6a52b5d73a2e7d315a2da91065bbbfe9d2a
parent0ac51ef63c8dcf7a73705eaf5058386bc0b3eced
mesh: Validate application by comparing composition data

Instead of validating application by enumerating D-Bus objects, create a
temporary node instance and check if composition data generated for the
temporary matches the node loaded from storage.

This allows node validation logic (primary element, mandatory models etc)
to be confined in node_generate_comp() function.

This also streamlines code implementing Attach(), Join() and
CreateNetwork() calls.

Change-Id: I82c634a32a89c446937a7d58ff4f9a73da339aa3
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/mesh-defs.h
mesh/node.c