From 9c5db80544ff746581397a80b86873646543b72b Mon Sep 17 00:00:00 2001 From: Ivan Kluchnikov Date: Thu, 28 Mar 2013 21:19:09 +0400 Subject: [PATCH] Fixed CCCH serviceLoop(). We should use not blocking read from InterthreadQueue, because we should send idleFrame, when queue is empty. --- GSM/GSMLogicalChannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GSM/GSMLogicalChannel.cpp b/GSM/GSMLogicalChannel.cpp index f3a04c0..e8dc4a2 100644 --- a/GSM/GSMLogicalChannel.cpp +++ b/GSM/GSMLogicalChannel.cpp @@ -124,13 +124,13 @@ void CCCHLogicalChannel::serviceLoop() LogicalChannel::send(idleFrame); // run the loop while (true) { - L3Frame* frame = mQ.read(); + L3Frame* frame = mQ.readNoBlock(); if (frame) { LogicalChannel::send(*frame); OBJLOG(DEBUG) << "CCCHLogicalChannel::serviceLoop sending " << *frame; delete frame; } - if (mQ.size()==0) { + else { LogicalChannel::send(idleFrame); OBJLOG(DEBUG) << "CCCHLogicalChannel::serviceLoop sending idle frame"; }