diff --git a/src/plugin_manager.cpp b/src/plugin_manager.cpp index 8f3e9b3fbff5f125fecae884d10eaed2d3c2a4d6..ee1205d89dae2ff48f5e3562663b483089c242e6 100644 --- a/src/plugin_manager.cpp +++ b/src/plugin_manager.cpp @@ -184,8 +184,8 @@ PluginManager::createObject(const std::string& type) return {nullptr, nullptr}; RING_PluginObjectParams op = { - .pluginApi = &pluginApi_, - .type = type.c_str(), + /*.pluginApi = */&pluginApi_, + /*.type = */type.c_str(), }; // Try to find an exact match diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index a464713061bebaa767885579dce9ee327fdfb5b3..08c18f45a072a27a2f10540c3f78b061e174f503 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -1478,12 +1478,12 @@ RingAccount::handlePendingCall(PendingCall& pc, bool incoming) std::weak_ptr<RingAccount> w = std::static_pointer_cast<RingAccount>(shared_from_this()); tls::TlsParams tlsParams { - .ca_list = "", - .cert = identity_.second, - .cert_key = identity_.first, - .dh_params = dhParams_, - .timeout = std::chrono::duration_cast<decltype(tls::TlsParams::timeout)>(TLS_TIMEOUT), - .cert_check = [w,call,remote_h,incoming](unsigned status, const gnutls_datum_t* cert_list, unsigned cert_num) -> pj_status_t { + /*.ca_list = */"", + /*.cert = */identity_.second, + /*.cert_key = */identity_.first, + /*.dh_params = */dhParams_, + /*.timeout = */std::chrono::duration_cast<decltype(tls::TlsParams::timeout)>(TLS_TIMEOUT), + /*.cert_check = */[w,call,remote_h,incoming](unsigned status, const gnutls_datum_t* cert_list, unsigned cert_num) -> pj_status_t { try { if (auto sthis = w.lock()) { auto& this_ = *sthis; @@ -1799,9 +1799,9 @@ RingAccount::doRegister_() } if (req == this_.trustRequests_.end()) { this_.trustRequests_.emplace_back(TrustRequest{ - .from = v.from, - .received = std::chrono::system_clock::now(), - .payload = v.payload + /*.from = */v.from, + /*.received = */std::chrono::system_clock::now(), + /*.payload = */v.payload }); req = std::prev(this_.trustRequests_.end()); } @@ -2017,13 +2017,13 @@ RingAccount::replyToIncomingIceMsg(std::shared_ptr<SIPCall> call, { std::lock_guard<std::mutex> lock(callsMutex_); pendingCalls_.emplace_back(PendingCall { - .start = started_time, - .ice_sp = ice, - .call = wcall, - .listen_key = {}, - .call_key = {}, - .from = peer_ice_msg.from, - .from_cert = peer_cert }); + /*.start = */started_time, + /*.ice_sp = */ice, + /*.call = */wcall, + /*.listen_key = */{}, + /*.call_key = */{}, + /*.from = */peer_ice_msg.from, + /*.from_cert = */peer_cert }); } } diff --git a/src/ringdht/sips_transport_ice.cpp b/src/ringdht/sips_transport_ice.cpp index e3d8357e447a1f7e68ef9e0048c8c3ab869588da..9b7e78556a429a1eb9a3462aa6d16dde5204cd53 100644 --- a/src/ringdht/sips_transport_ice.cpp +++ b/src/ringdht/sips_transport_ice.cpp @@ -243,11 +243,11 @@ SipsIceTransport::SipsIceTransport(pjsip_endpoint* endpt, std::memset(&remoteCertInfo_, 0, sizeof(pj_ssl_cert_info)); TlsSession::TlsSessionCallbacks cbs = { - .onStateChange = [this](TlsSessionState state){ onTlsStateChange(state); }, - .onRxData = [this](std::vector<uint8_t>&& buf){ onRxData(std::move(buf)); }, - .onCertificatesUpdate = [this](const gnutls_datum_t* l, const gnutls_datum_t* r, + /*.onStateChange = */[this](TlsSessionState state){ onTlsStateChange(state); }, + /*.onRxData = */[this](std::vector<uint8_t>&& buf){ onRxData(std::move(buf)); }, + /*.onCertificatesUpdate = */[this](const gnutls_datum_t* l, const gnutls_datum_t* r, unsigned int n){ onCertificatesUpdate(l, r, n); }, - .verifyCertificate = [this](gnutls_session_t session){ return verifyCertificate(session); } + /*.verifyCertificate = */[this](gnutls_session_t session){ return verifyCertificate(session); } }; tls_.reset(new TlsSession(ice, comp_id, param, cbs)); diff --git a/src/sip/sipaccount.cpp b/src/sip/sipaccount.cpp index 544f3f201061a492150d943ec724ff89a3bdb35e..acbce0822cd04fa714c351b975f53e98a5bab6ba 100644 --- a/src/sip/sipaccount.cpp +++ b/src/sip/sipaccount.cpp @@ -1605,16 +1605,16 @@ void SIPAccount::setCredentials(const std::vector<std::map<std::string, std::str c.computePasswordHash(); cred_.emplace_back(pjsip_cred_info { - .realm = pj_str((char*) c.realm.c_str()), - .scheme = pj_str((char*) "digest"), - .username = pj_str((char*) c.username.c_str()), - .data_type = (c.password_h.empty() + /*.realm = */pj_str((char*) c.realm.c_str()), + /*.scheme = */pj_str((char*) "digest"), + /*.username = */pj_str((char*) c.username.c_str()), + /*.data_type = */(c.password_h.empty() ? PJSIP_CRED_DATA_PLAIN_PASSWD : PJSIP_CRED_DATA_DIGEST), - .data = pj_str((char*) (c.password_h.empty() + /*.data = */pj_str((char*) (c.password_h.empty() ? c.password.c_str() : c.password_h.c_str())), - .ext = {} + /*.ext = */{} }); } } diff --git a/src/sip/sipvoiplink.cpp b/src/sip/sipvoiplink.cpp index a16fcdea5e7269dbb745408aeb5929bba49f6cb4..213f28bcba910e7eba4871d680311cd8c41d27a8 100644 --- a/src/sip/sipvoiplink.cpp +++ b/src/sip/sipvoiplink.cpp @@ -1228,9 +1228,9 @@ SIPVoIPLink::resolveSrvName(const std::string &name, pjsip_transport_type_e type RING_DBG("try to resolve '%s' (port: %u)", name.c_str(), port); pjsip_host_info host_info { - .flag = 0, - .type = type, - .addr = {{(char*)name.c_str(), name_size}, port}, + /*.flag = */0, + /*.type = */type, + /*.addr = */{{(char*)name.c_str(), name_size}, port}, }; const auto token = std::hash<std::string>()(name + to_string(type));