From 64323f7d66dd9a631b86ff07732c3702933d3846 Mon Sep 17 00:00:00 2001 From: Shane Synan Date: Sat, 7 Nov 2020 22:11:39 -0500 Subject: [PATCH] core: In CoreNetwork, check Network::useSasl() In CoreNetwork, directly check the Network::useSasl() function instead of reaching into networkInfo(). All the other code within CoreNetwork checks the properties on Network, and useSasl() is already updated within Network::setNetworkInfo(). This provides consistency with atomic network information updates. --- src/core/corenetwork.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 438a42a7..17cf26d3 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -1086,8 +1086,9 @@ void CoreNetwork::serverCapAdded(const QString& capability) // Handle special cases first if (capability == IrcCap::SASL) { // Only request SASL if it's enabled - if (networkInfo().useSasl) + if (useSasl()) { queueCap(capability); + } } else if (IrcCap::knownCaps.contains(capability)) { // Handling for general known capabilities @@ -1367,7 +1368,7 @@ void CoreNetwork::sendNextCap() else { // No pending desired capabilities, capability negotiation finished // If SASL requested but not available, print a warning - if (networkInfo().useSasl && !capEnabled(IrcCap::SASL)) + if (useSasl() && !capEnabled(IrcCap::SASL)) showMessage(NetworkInternalMessage( Message::Error, BufferInfo::StatusBuffer, -- 2.20.1