From 146fa009d2f082c959ffc63e3f9a0911eaba0afc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Tue, 23 Apr 2019 13:55:01 -0400
Subject: [PATCH] jamiaccount: make getTrackedBuddyPresence const

Change-Id: I4822ef1703f55bdddce9d80541b43df512e42457
---
 src/jamidht/jamiaccount.cpp | 2 +-
 src/jamidht/jamiaccount.h   | 2 +-
 src/sip/sippresence.h       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index b23b39611e..536038b29a 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -2059,7 +2059,7 @@ JamiAccount::trackPresence(const dht::InfoHash& h, BuddyInfo& buddy)
 }
 
 std::map<std::string, bool>
-JamiAccount::getTrackedBuddyPresence()
+JamiAccount::getTrackedBuddyPresence() const
 {
     std::lock_guard<std::mutex> lock(buddyInfoMtx);
     std::map<std::string, bool> presence_info;
diff --git a/src/jamidht/jamiaccount.h b/src/jamidht/jamiaccount.h
index 5d02f48c0b..60715fb7d6 100644
--- a/src/jamidht/jamiaccount.h
+++ b/src/jamidht/jamiaccount.h
@@ -161,7 +161,7 @@ class JamiAccount : public SIPAccountBase {
          *
          * @return map of buddy_uri to bool (online or not)
          */
-        std::map<std::string, bool> getTrackedBuddyPresence();
+        std::map<std::string, bool> getTrackedBuddyPresence() const;
 
         /**
          * Connect to the DHT.
diff --git a/src/sip/sippresence.h b/src/sip/sippresence.h
index 19f9ac23c8..11b618b962 100644
--- a/src/sip/sippresence.h
+++ b/src/sip/sippresence.h
@@ -200,7 +200,7 @@ class SIPPresence {
 
         bool isSupported(int function);
 
-        std::list< PresSubClient *> getClientSubscriptions() {
+        const std::list< PresSubClient *>& getClientSubscriptions() const {
             return sub_client_list_;
         }
 
-- 
GitLab