aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 17:15:26 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-13 17:16:28 +0100
commitb1302b083e9d8f5dd60229570716f497ea61d26c (patch)
treedc3af06e33999dbc4fb270229418e17e9be03eec /src/tbf.cpp
parent32f9a59ab42f9c37908d3d4a9db341583ab516ac (diff)
llc: Move the decision if a frame has expired into the LLC
This way the generation of the expiry information and the check is at the same place. This should make reading the code more easy.
Diffstat (limited to 'src/tbf.cpp')
-rw-r--r--src/tbf.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 41a94bcd..63c8070d 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -689,10 +689,7 @@ struct msgb *gprs_rlcmac_tbf::llc_dequeue(bssgp_bvc_ctx *bctx)
tv = (struct timeval *)msg->data;
msgb_pull(msg, sizeof(*tv));
- /* Timeout is infinite */
- if (tv->tv_sec == 0 && tv->tv_usec == 0)
- break;
- if (timercmp(&tv_now, tv, >)) {
+ if (gprs_llc::is_frame_expired(&tv_now, tv)) {
LOGP(DRLCMACDL, LOGL_NOTICE, "%s Discarding LLC PDU "
"because lifetime limit reached\n",
tbf_name(this));