gtphub: tweak logging.
Less spaces in tunnel strings, adjust tests accordingly.
Use side_idx to remove code dup in rate counter output.
Sponsored-by: On-Waves ehi
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index 5736b89..eb463d7 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -986,15 +986,15 @@
if (!u->peer) {
if (c->peer) {
- APPEND(" / (uninitialized)");
+ APPEND("/(uninitialized)");
}
} else if ((!c->peer)
|| (!gsn_addr_same(&u->peer->peer_addr->addr,
&c->peer->peer_addr->addr))) {
- APPEND(" / %s", gsn_addr_to_str(&u->peer->peer_addr->addr));
+ APPEND("/%s", gsn_addr_to_str(&u->peer->peer_addr->addr));
}
- APPEND(" (TEI C %x=%x / U %x=%x)",
+ APPEND(" (TEI C %x=%x/U %x=%x)",
c->tei_orig, c->tei_repl,
u->tei_orig, u->tei_repl);
return buf;