diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index daf8379e972a303e80c2e2655b405d450ad9e0d1..14e8e391a9406dc837a2dab8dcf17b8c7f185477 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -2761,7 +2761,7 @@ bool ManagerImpl::accountExists(const std::string& accountID) } Account* -ManagerImpl::getAccount(const std::string& accountID) const +ManagerImpl::getAccount(const std::string& accountID) { AccountMap::const_iterator iter = accountMap_.find(accountID); if (iter != accountMap_.end()) diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h index 90bb4baf802b549eae70bd843a1dd440ad5f3517..6370ee25dafcd7db7abab426d9d236f5881d66f9 100644 --- a/daemon/src/managerimpl.h +++ b/daemon/src/managerimpl.h @@ -1160,7 +1160,7 @@ class ManagerImpl { * @param accountID account ID to get * @return Account* The account pointer or 0 */ - Account* getAccount(const std::string& accountID) const; + Account* getAccount(const std::string& accountID); /** Return the std::string from a CallID * Protected by mutex @@ -1174,7 +1174,7 @@ class ManagerImpl { * @param accountID Account ID to get * @return VoIPLink* The voip link from the account pointer or 0 */ - VoIPLink* getAccountLink(const std::string& accountID="") const; + VoIPLink* getAccountLink(const std::string& accountID=""); std::string getAccountIdFromNameAndServer(const std::string& userName, const std::string& server) const; diff --git a/daemon/src/managerimpl_registration.cpp b/daemon/src/managerimpl_registration.cpp index 5d7b4a101a005e4d355fd61ab8197c34466a7ec2..dbccb44eb6b5fdd7c23ad0193e1b5b7cd5393e8e 100644 --- a/daemon/src/managerimpl_registration.cpp +++ b/daemon/src/managerimpl_registration.cpp @@ -63,7 +63,7 @@ ManagerImpl::registerAccounts() } -VoIPLink* ManagerImpl::getAccountLink(const std::string& accountID) const +VoIPLink* ManagerImpl::getAccountLink(const std::string& accountID) { if (not accountID.empty()) return getAccount(accountID)->getVoIPLink(); diff --git a/daemon/src/sip/sdp.cpp b/daemon/src/sip/sdp.cpp index 26301456a1d84c837639d3430881468e36d076f2..136515bb1cb4f8147e560083ddc17da7f62a0878 100644 --- a/daemon/src/sip/sdp.cpp +++ b/daemon/src/sip/sdp.cpp @@ -113,7 +113,7 @@ void Sdp::setActiveRemoteSdpSession(const pjmedia_sdp_session *sdp) ERROR("Sdp: Error: Could not found dtmf event from remote sdp"); } -std::string Sdp::getCodecName() const +std::string Sdp::getCodecName() { try { sfl::AudioCodec *codec = getSessionMedia(); @@ -123,12 +123,12 @@ std::string Sdp::getCodecName() const } } -sfl::AudioCodec* Sdp::getSessionMedia() const +sfl::AudioCodec* Sdp::getSessionMedia() { if (sessionAudioMedia_.size() < 1) throw SdpException("No codec description for this media"); - return static_cast<sfl::AudioCodec *>(sessionAudioMedia_[0]); + return dynamic_cast<sfl::AudioCodec *>(sessionAudioMedia_[0]); } diff --git a/daemon/src/sip/sdp.h b/daemon/src/sip/sdp.h index c6a9f78ca4cfea893d1df8cb71f10ff7fd316d53..586fb904aff629ea3d3b6e7d3a5186eeee46fe04 100644 --- a/daemon/src/sip/sdp.h +++ b/daemon/src/sip/sdp.h @@ -138,7 +138,7 @@ class Sdp { * Return the codec of the first media after negotiation * @throw SdpException */ - sfl::AudioCodec* getSessionMedia() const; + sfl::AudioCodec* getSessionMedia(); /* * On building an invite outside a dialog, build the local offer and create the @@ -271,7 +271,7 @@ class Sdp { void setMediaTransportInfoFromRemoteSdp(); - std::string getCodecName() const; + std::string getCodecName(); void receivingAnswerAfterInitialOffer(const pjmedia_sdp_session* remote); diff --git a/daemon/src/sip/sipaccount.h b/daemon/src/sip/sipaccount.h index 59075f5bf355e3cf8cf2c2e823e35bbaea82b2d8..1473ec97757501cda91bb7201a9c4f162aad3834 100644 --- a/daemon/src/sip/sipaccount.h +++ b/daemon/src/sip/sipaccount.h @@ -204,7 +204,7 @@ class SIPAccount : public Account { * @param void * @return pjsip_regc* A pointer to the registration structure */ - pjsip_regc* getRegistrationInfo() const { + pjsip_regc* getRegistrationInfo() { return regc_; } @@ -223,7 +223,7 @@ class SIPAccount : public Account { * file, that can be used directly by PJSIP to initialize * TLS transport. */ - const pjsip_tls_setting * getTlsSetting() const { + pjsip_tls_setting * getTlsSetting() { return &tlsSetting_; } diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 97b954990979510c22b85d1f7bf829cf45212657..48a5a577b8d1c008d841afa2f846a73dc14f0a2f 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -282,7 +282,7 @@ SIPVoIPLink::getEvent() void SIPVoIPLink::sendRegister(Account *a) { - SIPAccount *account = static_cast<SIPAccount*>(a); + SIPAccount *account = dynamic_cast<SIPAccount*>(a); createSipTransport(account); account->setRegister(true); diff --git a/plugins/addressbook/evolution/eds.c b/plugins/addressbook/evolution/eds.c index ca036ea4d4023dd73379aee9aaaefcbafc48c5f8..b1171fb4307d22d9c09ced1942bc23ad16fc6c62 100644 --- a/plugins/addressbook/evolution/eds.c +++ b/plugins/addressbook/evolution/eds.c @@ -41,7 +41,6 @@ #include <string.h> #include <pango/pango.h> #include "eds.h" -//#include <addressbook-config.h> #include <libedataserver/e-source.h> #include "config.h"