本文整理汇总了C++中TransactionEntry::timerExpired方法的典型用法代码示例。如果您正苦于以下问题:C++ TransactionEntry::timerExpired方法的具体用法?C++ TransactionEntry::timerExpired怎么用?C++ TransactionEntry::timerExpired使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TransactionEntry
的用法示例。
在下文中一共展示了TransactionEntry::timerExpired方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateGSMSignalling
/**
Check GSM signalling.
Can block for up to 52 GSM L1 frames (240 ms) because LCH::send is blocking.
@param transaction The call's TransactionEntry.
@param LCH The call's logical channel (TCH/FACCH or SDCCH).
@return true If the call was cleared.
*/
bool updateGSMSignalling(TransactionEntry &transaction, LogicalChannel *LCH, unsigned timeout=0)
{
if (transaction.Q931State()==TransactionEntry::NullState) return true;
// Any Q.931 timer expired?
if (transaction.timerExpired()) {
// Cause 0x66, "recover on timer expiry"
abortCall(transaction,LCH,L3Cause(0x66));
return true;
}
// Look for a control message from MS side.
if (L3Frame *l3 = LCH->recv(timeout)) {
// Check for lower-layer error.
if (l3->primitive() == ERROR) return true;
// Parse and dispatch.
L3Message *l3msg = parseL3(*l3);
delete l3;
bool cleared = false;
if (l3msg) {
LOG(DEBUG) << "received " << *l3msg;
cleared = callManagementDispatchGSM(transaction, LCH, l3msg);
delete l3msg;
}
return cleared;
}
// If we are here, we have timed out, but assume the call is still running.
return false;
}