< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

[reSIProcate] InviteSession::getLocalSdp undefined return if mCurrentLocalSdp not set?


Hi,

 

Calling getLocalSdp on an InviteSession returns a de-referenced auto_ptr, but if it hasn’t been set to anything yet errors will occur (also would occur for getRemoteSdp).

 

Would something like this fix this situation, or am I missing something?

 

InviteSession::InviteSession(DialogUsageManager& dum, Dialog& dialog)

   : DialogUsage(dum, dialog),

     mState(Undefined),

     mNitState(NitComplete),

     mCurrentRetransmit200(0),

     mSessionInterval(0),

     mMinSE(90),

     mSessionRefresher(false),

     mSessionTimerSeq(0),

     mSentRefer(false),

     mCurrentEncryptionLevel(DialogUsageManager::None),

     mProposedEncryptionLevel(DialogUsageManager::None),

       mCurrentLocalSdp(auto_ptr<SdpContents>(new SdpContents()),

mCurrentRemoteSdp(auto_ptr<SdpContents>(new SdpContents()))

 

Thanks,

 

-Justin