< Previous by Date | Date Index | Next by Date > |
Thread Index | Next in Thread > |
Hi, Scott: I define a class inherited
from AppDialogSet,and called end()
function of the class when I
want to end an invite session in my application. It will
get an assertion sometimes. Code: void ClientInviteSession::end(EndReason
reason) {
InfoLog (<< toData(mState) << ": end");
if (mEndReason ==
NotSpecified)
{
mEndReason = reason;
}
switch(mState)
{
case UAC_Early:
case
UAC_EarlyWithOffer:
case
UAC_EarlyWithAnswer:
case UAC_Answered:
case
UAC_SentUpdateEarly:
case
UAC_ReceivedUpdateEarly:
case UAC_SentAnswer:
case UAC_QueuedUpdate:
case UAC_Cancelled: // !jf! possibly incorrect to always BYE
in UAC_Cancelled
{
sendBye();
transition(Terminated);
mDum.mInviteSessionHandler->onTerminated(getSessionHandle(),
InviteSessionHandler::Ended);
break;
}
case UAC_Start:
WarningLog (<< "Try to
end when in state=" << toData(mState));
assert(0);
break;
case Terminated:
assert(0);
break;
default:
InviteSession::end(reason);
break;
} } Does
it matter in release version? How can I end an invite session properly? Thanks Haitao Xu |