From daf9ac5b883cf981a163654d58932bfbdce619d9 Mon Sep 17 00:00:00 2001 From: cbdev Date: Tue, 17 Mar 2020 23:58:06 +0100 Subject: Output routing info to log --- configs/launchctl-sacn.cfg | 2 +- midimonster.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configs/launchctl-sacn.cfg b/configs/launchctl-sacn.cfg index dedfc0f..10a736a 100644 --- a/configs/launchctl-sacn.cfg +++ b/configs/launchctl-sacn.cfg @@ -7,7 +7,7 @@ name = MIDIMonster [backend sacn] -bind = 0.0.0.0 +bind = 0.0.0.0 5568 local [midi lc] read = Launch Control diff --git a/midimonster.c b/midimonster.c index 1691671..5109eab 100644 --- a/midimonster.c +++ b/midimonster.c @@ -456,6 +456,7 @@ static int core_loop(){ int main(int argc, char** argv){ int rv = EXIT_FAILURE; char* cfg_file = DEFAULT_CFG; + size_t u, n = 0, max = 0; //parse commandline arguments if(args_parse(argc, argv, &cfg_file)){ @@ -494,6 +495,14 @@ int main(int argc, char** argv){ signal(SIGINT, signal_handler); + //count and report mappings + for(u = 0; u < sizeof(routing.map) / sizeof(routing.map[0]); u++){ + n += routing.entries[u]; + max = max(max, routing.entries[u]); + } + LOGPF("Routing %" PRIsize_t " sources, largest bucket has %" PRIsize_t " entries", + n, max); + if(!fds){ fprintf(stderr, "No descriptors registered for multiplexing\n"); } -- cgit v1.2.3