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"; }