Module: sems Branch: master Commit: d194acbbdf957ee9d0ac9ca60b96cbb80cf9699c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=d194acbbdf957ee9d0ac9ca60b96cbb80cf9699c
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Tue Feb 7 16:43:29 2012 +0100 make AmSipDialog::oa and AmSipDialog::100rel private --- apps/sbc/SBC.cpp | 4 ++-- core/AmSipDialog.cpp | 13 +++++++++++++ core/AmSipDialog.h | 19 ++++++++++++------- core/plug-in/uac_auth/UACAuth.cpp | 4 ++-- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/apps/sbc/SBC.cpp b/apps/sbc/SBC.cpp index ba08062..5efe5a0 100644 --- a/apps/sbc/SBC.cpp +++ b/apps/sbc/SBC.cpp @@ -551,7 +551,7 @@ SBCDialog::SBCDialog(const SBCCallProfile& call_profile) cc_timer_id(SBC_TIMER_ID_CALL_TIMERS_START) { set_sip_relay_only(false); - dlg.rel100.setState(Am100rel::REL100_IGNORED); + dlg.setRel100State(Am100rel::REL100_IGNORED); memset(&call_connect_ts, 0, sizeof(struct timeval)); memset(&call_end_ts, 0, sizeof(struct timeval)); @@ -1583,7 +1583,7 @@ SBCCalleeSession::SBCCalleeSession(const AmB2BCallerSession* caller, call_profile(call_profile), AmB2BCalleeSession(caller) { - dlg.rel100.setState(Am100rel::REL100_IGNORED); + dlg.setRel100State(Am100rel::REL100_IGNORED); if (call_profile.sdpfilter_enabled) { b2b_mode = B2BMode_SDPFilter; diff --git a/core/AmSipDialog.cpp b/core/AmSipDialog.cpp index 1b90b4e..1f47e53 100644 --- a/core/AmSipDialog.cpp +++ b/core/AmSipDialog.cpp @@ -230,6 +230,19 @@ bool AmSipDialog::getSdpAnswer(const AmSdp& offer, AmSdp& answer) return hdl->getSdpAnswer(offer,answer); } +AmOfferAnswer::OAState AmSipDialog::getOAState() { + return oa.getState(); +} + +void AmSipDialog::setOAState(AmOfferAnswer::OAState n_st) { + oa.setState(n_st); +} + +void AmSipDialog::setRel100State(Am100rel::State rel100_state) { + DBG("setting 100rel state for '%s' to %i\n", local_tag.c_str(), rel100_state); + rel100.setState(rel100_state); +} + /** * Update dialog status from UAC Request that we send (e.g. INVITE) * (called only from AmSessionContainer) diff --git a/core/AmSipDialog.h b/core/AmSipDialog.h index 4d442da..42f8fd6 100644 --- a/core/AmSipDialog.h +++ b/core/AmSipDialog.h @@ -122,6 +122,12 @@ private: int flags, unsigned int req_cseq); + // Current offer/answer transaction + AmOfferAnswer oa; + + // Reliable provisional reply support + Am100rel rel100; + public: string user; // local user string domain; // local domain @@ -153,12 +159,6 @@ private: bool r_cseq_i; unsigned int r_cseq; // last remote CSeq - // Current offer/answer transaction - AmOfferAnswer oa; - - // Reliable provisional reply support - Am100rel rel100; - AmSipDialog(AmSipDialogEventHandler* h); ~AmSipDialog(); @@ -213,8 +213,13 @@ private: bool getSdpOffer(AmSdp& offer); bool getSdpAnswer(const AmSdp& offer, AmSdp& answer); + AmOfferAnswer::OAState getOAState(); + void setOAState(AmOfferAnswer::OAState n_st); + + void setRel100State(Am100rel::State rel100_state); + void uasTimeout(AmSipTimeoutEvent* to_ev); - + /** @return 0 on success (deprecated) */ int reply(const AmSipRequest& req, unsigned int code, diff --git a/core/plug-in/uac_auth/UACAuth.cpp b/core/plug-in/uac_auth/UACAuth.cpp index 1998bd1..86391d7 100644 --- a/core/plug-in/uac_auth/UACAuth.cpp +++ b/core/plug-in/uac_auth/UACAuth.cpp @@ -194,7 +194,7 @@ bool UACAuth::onSipReply(const AmSipReply& reply, AmSipDialog::Status old_dlg_st } // reset OA state to what is was before sending the failed request - dlg->oa.setState(ri->second.oa_state); + dlg->setOAState(ri->second.oa_state); // resend request if (dlg->sendRequest(ri->second.method, @@ -250,7 +250,7 @@ bool UACAuth::onSendRequest(const string& method, content_type, body, hdrs, - dlg->oa.getState()); + dlg->getOAState()); return false; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
