diff --git a/src/jamidht/conversation.cpp b/src/jamidht/conversation.cpp index 53b1340418f604cc25da5b01f71e96e2fa44b8c9..0c16732129b9495c57734ee4b97a6de6106f6f86 100644 --- a/src/jamidht/conversation.cpp +++ b/src/jamidht/conversation.cpp @@ -2420,7 +2420,7 @@ Conversation::bootstrap(std::function<void()> onBootstraped, if (!isBanned(member)) devices.insert(devices.end(), memberDevices.begin(), memberDevices.end()); } - JAMI_DEBUG("{}[SwarmManager {}] Bootstrap with {} devices", + JAMI_DEBUG("{}[SwarmManager {}] Bootstrap with {} device(s)", pimpl_->toString(), fmt::ptr(pimpl_->swarmManager_), devices.size()); diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 61590eb5f6245a8de7624adbc124824463b35b49..c4c609a106305aafdb3aff5e6adefbda4e37d216 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -242,11 +242,11 @@ parseJamiUri(std::string_view toUrl) { auto sufix = stripPrefix(toUrl); if (sufix.length() < 40) - throw std::invalid_argument("id must be a Jami infohash"); + throw std::invalid_argument("ID must be a Jami infohash"); const std::string_view toUri = sufix.substr(0, 40); if (std::find_if_not(toUri.cbegin(), toUri.cend(), ::isxdigit) != toUri.cend()) - throw std::invalid_argument("id must be a Jami infohash"); + throw std::invalid_argument("ID must be a Jami infohash"); return toUri; } @@ -554,11 +554,11 @@ JamiAccount::handleIncomingConversationCall(const std::string& callId, Manager::instance().answerCall(*call, currentMediaList); if (isNotHosting) { - JAMI_DEBUG("Creating conference for swarm {} with id {}", conversationId, confId); + JAMI_DEBUG("Creating conference for swarm {} with ID {}", conversationId, confId); // Create conference and host it. convModule()->hostConference(conversationId, confId, callId); } else { - JAMI_DEBUG("Adding participant {} for swarm {} with id {}", callId, conversationId, confId); + JAMI_DEBUG("Adding participant {} for swarm {} with ID {}", callId, conversationId, confId); Manager::instance().addAudio(*call); conf->addSubCall(callId); emitSignal<libjami::CallSignal::ConferenceChanged>(getAccountID(), @@ -1925,7 +1925,7 @@ JamiAccount::doRegister_() }; context.statusChangedCallback = [this](dht::NodeStatus s4, dht::NodeStatus s6) { - JAMI_DBG("[Account %s] Dht status: IPv4 %s; IPv6 %s", + JAMI_DBG("[Account %s] DHT status: IPv4 %s; IPv6 %s", getAccountID().c_str(), dhtStatusStr(s4), dhtStatusStr(s6)); @@ -2369,7 +2369,7 @@ JamiAccount::doUnregister(std::function<void(bool)> released_cb) JAMI_WARN("[Account %s] Unregistering account %p", getAccountID().c_str(), this); dht_->shutdown( [&] { - JAMI_WARN("[Account %s] dht shutdown complete", getAccountID().c_str()); + JAMI_WARN("[Account %s] DHT shutdown complete", getAccountID().c_str()); std::lock_guard lock(mtx); shutdown_complete = true; cv.notify_all(); @@ -2633,7 +2633,7 @@ JamiAccount::loadCachedProxyServer(std::function<void(const std::string& proxy)> { const auto& conf = config(); if (conf.proxyEnabled and proxyServerCached_.empty()) { - JAMI_DEBUG("[Account {:s}] loading DHT proxy URL: {:s}", getAccountID(), conf.proxyListUrl); + JAMI_DEBUG("[Account {:s}] Loading DHT proxy URL: {:s}", getAccountID(), conf.proxyListUrl); if (conf.proxyListUrl.empty() or not conf.proxyListEnabled) { cb(getDhtProxyServer(conf.proxyServer)); } else { @@ -2709,7 +2709,7 @@ JamiAccount::matches(std::string_view userName, std::string_view server) const if (userName == accountManager_->getInfo()->accountId || server == accountManager_->getInfo()->accountId || userName == accountManager_->getInfo()->deviceId) { - JAMI_DBG("Matching account id in request with username %.*s", + JAMI_DBG("Matching account ID in request with username %.*s", (int) userName.size(), userName.data()); return MatchRank::FULL; @@ -2935,7 +2935,7 @@ JamiAccount::declineConversationRequest(const std::string& conversationId) if (req.find(libjami::Account::TrustRequest::CONVERSATIONID) != req.end() && req.at(libjami::Account::TrustRequest::CONVERSATIONID) == conversationId) { accountManager_->discardTrustRequest(peerId); - JAMI_DEBUG("[Account {:s}] declined trust request with {:s}", + JAMI_DEBUG("[Account {:s}] Declined trust request with {:s}", getAccountID(), peerId); } @@ -3177,7 +3177,7 @@ JamiAccount::sendMessage(const std::string& to, return value.asString(); } } else { - JAMI_WARNING("Unable to parse jsonData to get conversation id"); + JAMI_WARNING("Unable to parse jsonData to get conversation ID"); } return ""; }; @@ -3226,7 +3226,7 @@ JamiAccount::onSIPMessageSent(const std::shared_ptr<TextMessageCtx>& ctx, int co true, ctx->deviceId ? ctx->deviceId.toString() : ""); } else { - // Note: This can be called from pjsip's eventloop while + // Note: This can be called from PJSIP's eventloop while // sipConnsMtx_ is locked. So we should retrigger the shutdown. auto acc = ctx->acc.lock(); if (not acc) @@ -3349,14 +3349,14 @@ JamiAccount::startAccountDiscovery() std::lock_guard lc(discoveryMapMtx_); // Make sure that account itself will not be recorded if (v.accountId != id) { - // Create or Find the old one + // Create or find the old one auto& dp = discoveredPeers_[v.accountId]; dp.displayName = v.displayName; discoveredPeerMap_[v.accountId.toString()] = v.displayName; if (dp.cleanupTask) { dp.cleanupTask->cancel(); } else { - // Avoid Repeat Reception of Same peer + // Avoid repeat reception of same peer JAMI_LOG("Account discovered: {}: {}", v.displayName, v.accountId.to_c_str()); // Send Added Peer and corrsponding accoundID emitSignal<libjami::PresenceSignal::NearbyPeerNotification>(getAccountID(), @@ -3373,7 +3373,7 @@ JamiAccount::startAccountDiscovery() this_->discoveredPeers_.erase(p); this_->discoveredPeerMap_.erase(p.toString()); } - // Send Deleted Peer + // Send deleted peer emitSignal<libjami::PresenceSignal::NearbyPeerNotification>( this_->getAccountID(), p.toString(), 1, a); } @@ -3821,7 +3821,7 @@ JamiAccount::sendProfile(const std::string& convId, auto currentSha3 = fileutils::sha3File(accProfilePath); // VCard sync for peerUri if (not needToSendProfile(peerUri, deviceId, currentSha3)) { - JAMI_DEBUG("Peer {} already got an up-to-date vcard", peerUri); + JAMI_DEBUG("Peer {} already got an up-to-date vCard", peerUri); return; } // We need a new channel @@ -4340,7 +4340,7 @@ JamiAccount::askForFileChannel(const std::string& conversationId, channelName += fmt::format("?start={}&end={}", start, end); } // We can avoid to negotiate new sessions, as the file notif - // probably come from an online device or last connected device. + // probably came from an online device or last connected device. connectionManager_->connectDevice( did, channelName, @@ -4370,8 +4370,8 @@ JamiAccount::askForFileChannel(const std::string& conversationId, // Only ask for device tryDevice(DeviceId(deviceId)); } else { - // Only ask for connected devices. For others we will try - // on new peer online + // Only ask for connected devices. For others we will attempt + // with new peer online for (const auto& m : convModule()->getConversationMembers(conversationId)) { accountManager_->forEachDevice(dht::InfoHash(m.at("uri")), [tryDevice = std::move(tryDevice)]( @@ -4396,7 +4396,7 @@ JamiAccount::askForProfile(const std::string& conversationId, conversationId, memberUri); // We can avoid to negotiate new sessions, as the file notif - // probably come from an online device or last connected device. + // probably came from an online device or last connected device. connectionManager_->connectDevice( DeviceId(deviceId), channelName, diff --git a/src/manager.cpp b/src/manager.cpp index 9415dfe1be4eca78abfbdbd5773670af51f936d4..c73e2ff9de0acb9edc9e5d701ca2b4d3e5ab7c7a 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -467,7 +467,7 @@ Manager::ManagerPimpl::parseConfiguration() const int error_count = base_.loadAccountMap(parsedFile); if (error_count > 0) { - JAMI_WARN("Errors while parsing %s", path_.c_str()); + JAMI_WARN("Error while parsing %s", path_.c_str()); result = false; } } catch (const YAML::BadFile& e) { @@ -796,7 +796,7 @@ Manager::init(const std::filesystem::path& config_file, libjami::InitFlag flags) JAMI_LOG("Using FFmpeg version {:s}", av_version_info()); int git2_major = 0, git2_minor = 0, git2_rev = 0; if (git_libgit2_version(&git2_major, &git2_minor, &git2_rev) == 0) { - JAMI_LOG("Using Libgit2 version {:d}.{:d}.{:d}", git2_major, git2_minor, git2_rev); + JAMI_LOG("Using libgit2 version {:d}.{:d}.{:d}", git2_major, git2_minor, git2_rev); } setDhtLogLevel(); @@ -1360,7 +1360,7 @@ Manager::unHoldConference(const std::string& accountId, const std::string& confI if (const auto account = getAccount(accountId)) { if (auto conf = account->getConference(confId)) { - // Unhold conf only if it was in hold state otherwise... + // Unhold conf only if it was in hold state otherwise… // all participants are restarted if (conf->getState() == Conference::State::HOLD) { for (const auto& item : conf->getSubCalls()) @@ -1413,7 +1413,7 @@ Manager::addSubCall(Call& call, Conference& conference) return true; } - // TODO: remove this ugly hack => There should be different calls when double clicking + // TODO: remove this ugly hack → There should be different calls when double clicking // a conference to add main participant to it, or (in this case) adding a participant // to conference pimpl_->unsetCurrentCall(); @@ -1550,7 +1550,7 @@ Manager::createConfFromParticipantList(const std::string& accountId, // we must at least have 2 participant for a conference if (participantList.size() <= 1) { - JAMI_ERR("Participant number must be higher or equal to 2"); + JAMI_ERR("Participant number must be greater than or equal to 2"); return; } @@ -1777,7 +1777,7 @@ Manager::saveConfig(const std::shared_ptr<Account>& acc) void Manager::saveConfig() { - JAMI_DBG("Saving Configuration to XDG directory %s", pimpl_->path_.c_str()); + JAMI_DBG("Saving configuration to XDG directory %s", pimpl_->path_.c_str()); if (pimpl_->audiodriver_) { audioPreference.setVolumemic(pimpl_->audiodriver_->getCaptureGain()); @@ -1948,7 +1948,7 @@ Manager::incomingMessage(const std::string& accountId, from, messages); } else { - JAMI_ERR("no conference associated to ID %s", callId.c_str()); + JAMI_ERR("No conference associated to ID %s", callId.c_str()); } } else { emitSignal<libjami::CallSignal::IncomingMessage>(accountId, callId, from, messages); @@ -2522,7 +2522,7 @@ Manager::ManagerPimpl::initAudioDriver() void Manager::ManagerPimpl::stripSipPrefix(Call& incomCall) { - // strip sip: which is not required and bring confusion with ip to ip calls + // strip sip: which is not required and causes confusion with IP-to-IP calls // when placing new call from history. std::string peerNumber(incomCall.getPeerNumber()); @@ -2671,7 +2671,7 @@ Manager::audioFormatUsed(AudioFormat format) if (currentFormat == format) return format; - JAMI_DEBUG("Audio format changed: {} -> {}", currentFormat.toString(), format.toString()); + JAMI_DEBUG("Audio format changed: {} → {}", currentFormat.toString(), format.toString()); pimpl_->ringbufferpool_->setInternalAudioFormat(format); pimpl_->toneCtrl_.setSampleRate(format.sample_rate, format.sampleFormat); @@ -3062,7 +3062,7 @@ Manager::loadAccountAndConversation(const std::string& accountId, account->setConfig(std::move(config)); } } catch (const std::runtime_error& e) { - JAMI_WARN("Account loading failed: %s", e.what()); + JAMI_WARN("Failed to load account: %s", e.what()); return; } }