aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-17 23:58:06 +0100
committercbdev <cb@cbcdn.com>2020-03-17 23:58:06 +0100
commitdaf9ac5b883cf981a163654d58932bfbdce619d9 (patch)
tree16d6ebd1a2ded4294d432c8767786ae56fffd67a /midimonster.c
parent636a9592eab1963c2b1a77bd59eaff317fa55b75 (diff)
downloadmidimonster-daf9ac5b883cf981a163654d58932bfbdce619d9.tar.gz
midimonster-daf9ac5b883cf981a163654d58932bfbdce619d9.tar.bz2
midimonster-daf9ac5b883cf981a163654d58932bfbdce619d9.zip
Output routing info to log
Diffstat (limited to 'midimonster.c')
-rw-r--r--midimonster.c9
1 files changed, 9 insertions, 0 deletions
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");
}