aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-27 10:34:31 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-30 21:24:12 +0100
commit1997787c52292942280db28ad3a3fc2ac19f20ed (patch)
tree3ca50b743715e0080d9f4bd09cd0d0d1d0ee9d51 /src/tbf.cpp
parentb98dd9e24085bf6838b5f2a5717c3345d54acb51 (diff)
llc: Count timedout and silently dropped frames
A DL tbf can be discarded and then the already queued LLCs will be silently dropped. Count this event.
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index cdd80983..1fa7c6e3 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -324,8 +324,10 @@ void tbf_free(struct gprs_rlcmac_tbf *tbf)
"be sure not to free in this state. PLEASE FIX!\n");
tbf->stop_timer();
#warning "TODO: Could/Should generate bssgp_tx_llc_discarded"
- while ((msg = msgb_dequeue(&tbf->llc_queue)))
+ while ((msg = msgb_dequeue(&tbf->llc_queue))) {
+ tbf->bts->dropped_frame();
msgb_free(msg);
+ }
tbf_unlink_pdch(tbf);
llist_del(&tbf->list);
@@ -714,6 +716,7 @@ struct msgb *gprs_rlcmac_tbf::llc_dequeue(bssgp_bvc_ctx *bctx)
LOGP(DRLCMACDL, LOGL_NOTICE, "Discarding LLC PDU of "
"DL TBF=%d, because lifetime limit reached\n",
tfi);
+ bts->timedout_frame();
frames++;
octets += msg->len;
msgb_free(msg);