diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2021-04-19 23:57:14 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2021-04-19 23:57:14 +0200 |
commit | a1a165c48c5422d9b302a6abec51e706f7cda934 (patch) | |
tree | bef0fe413a040b23f7cb5cbafeca6959eb8ba8c7 /ctrl/facemgr/src/api.c | |
parent | e92e9e839ca2cf42b56322b2489ccc0d8bf767af (diff) |
[HICN-699] facemgr: cleaner logs for face interaction
Change-Id: Ic0c941812f758868498e4d087e237047f91d452b
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/facemgr/src/api.c')
-rw-r--r-- | ctrl/facemgr/src/api.c | 15 |
1 files changed, 13 insertions, 2 deletions
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 @@ -34,6 +34,11 @@ #define WITH_PRIORITY_CONTROLLER /* + * Dump facelets (debug) + */ +//#define WITH_DUMP + +/* * Allow priority setting before interface is actually created */ #define WITH_DEFAULT_PRIORITIES @@ -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(" <CACHE>"); facelet_set_dump(facemgr->facelet_cache); @@ -2076,7 +2087,7 @@ DUMP_CACHE: DEBUG("</EVENT ret=%d>", ret); DEBUG("----------------------------------"); } -#endif +#endif /* WITH_DUMP */ free(cached_facelets); |