From 1ce22ee24a078ace70ca7dc6ba9ab6fb611588db Mon Sep 17 00:00:00 2001 From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com> Date: Thu, 10 Jul 2014 17:35:01 -0400 Subject: [PATCH] sip: use getModId() instead of getMod()->id Refs #51555 Change-Id: I91411210977ce9046dcb6c92160089e2ea9c9474 --- daemon/src/sip/sipaccount.cpp | 2 +- daemon/src/sip/sipcall.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp index c7fffa189f..fa9acf2de9 100644 --- a/daemon/src/sip/sipaccount.cpp +++ b/daemon/src/sip/sipaccount.cpp @@ -444,7 +444,7 @@ SIPAccount::SIPStartCall(std::shared_ptr<SIPCall>& call) return false; } - call->inv->mod_data[link_.getMod()->id] = call.get(); + call->inv->mod_data[link_.getModId()] = call.get(); pjsip_tx_data *tdata; diff --git a/daemon/src/sip/sipcall.cpp b/daemon/src/sip/sipcall.cpp index d3ebc8afd6..111e324968 100644 --- a/daemon/src/sip/sipcall.cpp +++ b/daemon/src/sip/sipcall.cpp @@ -221,7 +221,7 @@ SIPCall::sendSIPInfo(const char *const body, const char *const subtype) if (tdata->msg->body == NULL) pjsip_tx_data_dec_ref(tdata); else - pjsip_dlg_send_request(inv->dlg, tdata, SIPVoIPLink::instance().getMod()->id, NULL); + pjsip_dlg_send_request(inv->dlg, tdata, SIPVoIPLink::instance().getModId(), NULL); } void @@ -327,7 +327,7 @@ SIPCall::hangup(int reason) auto& siplink = SIPVoIPLink::instance(); // Make sure user data is NULL in callbacks - inv->mod_data[siplink.getMod()->id] = NULL; + inv->mod_data[siplink.getModId()] = NULL; // Stop all RTP streams stopRtpIfCurrent(); @@ -354,7 +354,7 @@ SIPCall::refuse() auto& siplink = SIPVoIPLink::instance(); // Make sure the pointer is NULL in callbacks - inv->mod_data[siplink.getMod()->id] = NULL; + inv->mod_data[siplink.getModId()] = NULL; siplink.removeSipCall(getCallId()); } @@ -362,7 +362,7 @@ SIPCall::refuse() static void transfer_client_cb(pjsip_evsub *sub, pjsip_event *event) { - auto mod_ua_id = SIPVoIPLink::instance().getMod()->id; + auto mod_ua_id = SIPVoIPLink::instance().getModId(); switch (pjsip_evsub_get_state(sub)) { case PJSIP_EVSUB_STATE_ACCEPTED: @@ -457,7 +457,7 @@ SIPCall::transferCommon(pj_str_t *dst) * because after this function, we can no find the cooresponding * voiplink from the call any more. But the voiplink is useful! */ - pjsip_evsub_set_mod_data(sub, siplink.getMod()->id, this); + pjsip_evsub_set_mod_data(sub, siplink.getModId(), this); /* * Create REFER request. @@ -657,7 +657,7 @@ SIPCall::peerHungup() auto& siplink = SIPVoIPLink::instance(); // Make sure user data is NULL in callbacks - inv->mod_data[siplink.getMod()->id ] = NULL; + inv->mod_data[siplink.getModId()] = NULL; // Stop all RTP streams stopRtpIfCurrent(); -- GitLab