From 84093cf135ee688d1b737b91399307b8872530c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 30 Sep 2021 09:57:02 -0400 Subject: [PATCH] jamiaccount: cleanup log for tracking presence Change-Id: I30b7d9db2cbac84c6ae15d15b0fe8a0f93e3a271 --- src/jamidht/jamiaccount.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index dab5ac9f16..e1586cd6ca 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -1802,20 +1802,21 @@ JamiAccount::loadBootstrap() const void JamiAccount::trackBuddyPresence(const std::string& buddy_id, bool track) { - JAMI_DBG("[Account %s] Track buddy [%s] presence", getAccountID().c_str(), buddy_id.c_str()); - std::string buddyUri; - try { buddyUri = parseJamiUri(buddy_id); } catch (...) { - JAMI_ERR("[Account %s] Failed to track a buddy due to an invalid URI %s", + JAMI_ERR("[Account %s] Failed to track presence: invalid URI %s", getAccountID().c_str(), buddy_id.c_str()); return; } - auto h = dht::InfoHash(buddyUri); + JAMI_DBG("[Account %s] %s presence for %s", + getAccountID().c_str(), + track ? "Track" : "Untrack", + buddy_id.c_str()); + auto h = dht::InfoHash(buddyUri); std::lock_guard<std::mutex> lock(buddyInfoMtx); if (track) { auto buddy = trackedBuddies_.emplace(h, BuddyInfo {h}); -- GitLab