aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-02 14:09:01 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-08 10:20:18 +0200
commit146e30736dbf6922f8ea0457b7b8892578c1377a (patch)
treec541c11db9094e26c2cf9f094bf0c17f8723356c
parent1e65b0e7a138f9d4dff6746b0387319cc32571d9 (diff)
gbproxy: Show number of stored messages in VTY show
This patch extends the 'show gbproxy tllis' command to display the number of stored messages per tlli_info if there are any. Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/src/gprs/gb_proxy_vty.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index f19413339..b2b867c6e 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -451,6 +451,11 @@ DEFUN(show_gbproxy_tllis, show_gbproxy_tllis_cmd, "show gbproxy tllis",
llist_for_each_entry(tlli_info, &state->enabled_tllis, list) {
time_t age = now - tlli_info->timestamp;
+ int stored_msgs = 0;
+ struct llist_head *iter;
+ llist_for_each(iter, &tlli_info->stored_msgs)
+ stored_msgs++;
+
if (tlli_info->mi_data_len > 0) {
snprintf(mi_buf, sizeof(mi_buf), "(invalid)");
gsm48_mi_to_string(mi_buf, sizeof(mi_buf),
@@ -459,9 +464,13 @@ DEFUN(show_gbproxy_tllis, show_gbproxy_tllis_cmd, "show gbproxy tllis",
} else {
snprintf(mi_buf, sizeof(mi_buf), "(none)");
}
- vty_out(vty, " TLLI %08x, IMSI %s, AGE %d%s",
- tlli_info->tlli.current, mi_buf, (int)age,
- VTY_NEWLINE);
+ vty_out(vty, " TLLI %08x, IMSI %s, AGE %d",
+ tlli_info->tlli.current, mi_buf, (int)age);
+
+ if (stored_msgs)
+ vty_out(vty, ", STORED %d", stored_msgs);
+
+ vty_out(vty, "%s", VTY_NEWLINE);
}
}
return CMD_SUCCESS;