aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-01-15 17:40:28 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2014-01-15 17:41:45 +0100
commit80367aae175dbd171a77d1cde85924db68642e1b (patch)
tree2e1089f16ee8830a21cf9e8865955d754f4573c2 /src/tbf.cpp
parent772415fd8a30472b28ac7d1e56c97a0d70307835 (diff)
tbf: Save a timestamp at tbf allocation and print it in the VTY
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 14fbad16..fa9d2638 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -508,6 +508,7 @@ struct gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts,
if (!tbf)
return NULL;
+ tbf->m_create_ts = time(NULL);
tbf->bts = bts->bts;
tbf->direction = dir;
tbf->m_tfi = tfi;
@@ -1762,10 +1763,11 @@ void tbf_print_vty_info(struct vty *vty, llist_head *ltbf)
tbf->tlli(), tbf->is_tlli_valid() ? "valid" : "invalid",
tbf->direction == GPRS_RLCMAC_UL_TBF ? "UL" : "DL",
tbf->imsi(), VTY_NEWLINE);
- vty_out(vty, " state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d "
+ vty_out(vty, " created=%lu state=%08x 1st_TS=%d 1st_cTS=%d ctrl_TS=%d "
"MS_CLASS=%d%s",
- tbf->state_flags, tbf->first_ts, tbf->first_common_ts,
- tbf->control_ts, tbf->ms_class, VTY_NEWLINE);
+ tbf->create_ts(), tbf->state_flags, tbf->first_ts,
+ tbf->first_common_ts, tbf->control_ts, tbf->ms_class,
+ VTY_NEWLINE);
vty_out(vty, " TS_alloc=");
for (int i = 0; i < 8; i++) {
if (tbf->pdch[i])