mgcp_ratectr: refactor rate counter and set group name
The rate counter group is currently only referenced by an index. In a
system with multiple trunks this makes it difficult to say which rate
counter group belongs to which trunk sinde the index that is used does
not necessarly corespond to a specific trunk.
Since rate counter groups can now get a human readable name assigned, we
should do that.
Also E1 specific rate counters only make sense for E1-trunks, so they
should not be present on the virtual trunk.
Change-Id: I5e7f0e9081a06af48e284afa5c36a095b2847704
diff --git a/src/libosmo-mgcp/mgcp_trunk.c b/src/libosmo-mgcp/mgcp_trunk.c
index 5c9a888..08f99b3 100644
--- a/src/libosmo-mgcp/mgcp_trunk.c
+++ b/src/libosmo-mgcp/mgcp_trunk.c
@@ -63,7 +63,7 @@
llist_add_tail(&trunk->entry, &cfg->trunks);
- mgcp_ratectr_trunk_alloc(cfg, &trunk->ratectr);
+ mgcp_ratectr_trunk_alloc(trunk);
return trunk;
}