From a1a165c48c5422d9b302a6abec51e706f7cda934 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Mon, 19 Apr 2021 23:57:14 +0200 Subject: [HICN-699] facemgr: cleaner logs for face interaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic0c941812f758868498e4d087e237047f91d452b Signed-off-by: Jordan Augé --- ctrl/facemgr/src/api.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ctrl/facemgr/src/api.c') diff --git a/ctrl/facemgr/src/api.c b/ctrl/facemgr/src/api.c index 9e029c5b7..dfbd24bcb 100644 --- a/ctrl/facemgr/src/api.c +++ b/ctrl/facemgr/src/api.c @@ -33,6 +33,11 @@ */ #define WITH_PRIORITY_CONTROLLER +/* + * Dump facelets (debug) + */ +//#define WITH_DUMP + /* * Allow priority setting before interface is actually created */ @@ -1789,7 +1794,9 @@ int facemgr_on_event(facemgr_t * facemgr, facelet_t * facelet_in) { bool remove_facelet = true; +#if WITH_DUMP bool dump = true; +#endif /* WITH_DUMP */ int ret = 0; int rc; assert(facelet_in); @@ -1879,7 +1886,9 @@ facemgr_on_event(facemgr_t * facemgr, facelet_t * facelet_in) rc = facemgr_process_facelet_get(facemgr, facelet_in); if (rc == 0) remove_facelet = false; +#if WITH_DUMP dump = false; +#endif if (rc == -1) { ERROR("[facemgr_on_event] Error processing GET event"); goto ERR; @@ -1987,7 +1996,9 @@ facemgr_on_event(facemgr_t * facemgr, facelet_t * facelet_in) //DEBUG("[facemgr_on_event] GET EXISTING %s", facelet_old_s); //DEBUG(" WITH %s", facelet_s); //ERROR("[facemgr_on_event] GET event for a face that already exists..."); +#ifdef WITH_DUMP dump = false; +#endif /* WITH_DUMP */ continue; case FACELET_EVENT_UPDATE: @@ -2068,7 +2079,7 @@ ERR: ret = -1; DUMP_CACHE: -#if 1 +#if WITH_DUMP if (dump) { DEBUG(" "); facelet_set_dump(facemgr->facelet_cache); @@ -2076,7 +2087,7 @@ DUMP_CACHE: DEBUG("", ret); DEBUG("----------------------------------"); } -#endif +#endif /* WITH_DUMP */ free(cached_facelets); -- cgit 1.2.3-korg