diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp index 796f25c44b283aabf5cfe308965db7d4c0ffbf30..fab7291faba1e5228e618b487452d1cfc278330f 100644 --- a/daemon/src/sip/sipaccount.cpp +++ b/daemon/src/sip/sipaccount.cpp @@ -75,7 +75,6 @@ SIPAccount::SIPAccount(const std::string& accountID) , stunPort_(PJ_STUN_PORT) , dtmfType_(OVERRTP_STR) , tlsEnable_("false") - , tlsPort_(DEFAULT_SIP_TLS_PORT) , tlsCaListFile_() , tlsCertificateFile_() , tlsPrivateKeyFile_() @@ -154,7 +153,7 @@ void SIPAccount::serialize(Conf::YamlEmitter *emitter) ScalarNode notSuppWarning(zrtpNotSuppWarning_); portstr.str(""); - portstr << tlsPort_; + portstr << tlsListenerPort_; ScalarNode tlsport(portstr.str()); ScalarNode certificate(tlsCertificateFile_); ScalarNode calist(tlsCaListFile_); @@ -366,7 +365,9 @@ void SIPAccount::unserialize(const Conf::MappingNode *map) if (tlsMap) { tlsMap->getValue(TLS_ENABLE_KEY, &tlsEnable_); - tlsMap->getValue(TLS_PORT_KEY, &tlsPort_); + std::string tlsPort; + tlsMap->getValue(TLS_PORT_KEY, &tlsPort); + tlsListenerPort_ = atoi(tlsPort.c_str()); tlsMap->getValue(CERTIFICATE_KEY, &tlsCertificateFile_); tlsMap->getValue(CALIST_KEY, &tlsCaListFile_); tlsMap->getValue(CIPHERS_KEY, &tlsCiphers_); @@ -639,8 +640,6 @@ pjsip_ssl_method SIPAccount::sslMethodStringToPjEnum(const std::string& method) void SIPAccount::initTlsConfiguration() { // TLS listener is unique and should be only modified through IP2IP_PROFILE - tlsListenerPort_ = tlsPort_; - pjsip_tls_setting_default(&tlsSetting_); pj_cstr(&tlsSetting_.ca_list_file, tlsCaListFile_.c_str()); diff --git a/daemon/src/sip/sipaccount.h b/daemon/src/sip/sipaccount.h index a1c288cfbce1efc45d245cb0d4e3c94eec69d5f8..9fdf211aee70a0eff0c84bc2b4b394cb32ec5831 100644 --- a/daemon/src/sip/sipaccount.h +++ b/daemon/src/sip/sipaccount.h @@ -639,11 +639,6 @@ class SIPAccount : public Account { */ std::string tlsEnable_; - /** - * Specify the TLS port - */ - int tlsPort_; - /** * Certificate autority file */