Commit 2c714058 authored by Tristan Matthews's avatar Tristan Matthews

* #29736: presence: pass primitives by value, not const reference

parent 071661fa
......@@ -273,7 +273,7 @@ bool PresSubServer::matches(char *s)
return (!(strcmp(remote, s))) ;
}
void PresSubServer::approve(const bool& flag)
void PresSubServer::approve(bool flag)
{
approved_ = flag;
// attach the real status data
......
......@@ -85,7 +85,7 @@ class PresSubServer {
/*
* Allow the subscriber for being notified.
*/
void approve(const bool& flag);
void approve(bool flag);
/*
* Notify subscriber with the pres_status_date of the account
*/
......
......@@ -101,12 +101,12 @@ pj_pool_t* SIPPresence::getPool() const
return pool_;
}
void SIPPresence::enable(const bool& flag)
void SIPPresence::enable(bool flag)
{
enabled_ = flag;
}
void SIPPresence::updateStatus(const bool& status, const std::string &note)
void SIPPresence::updateStatus(bool status, const std::string &note)
{
//char* pj_note = (char*) pj_pool_alloc(pool_, "50");
......@@ -133,7 +133,7 @@ void SIPPresence::updateStatus(const bool& status, const std::string &note)
/* "contact" field is optionnal */
}
void SIPPresence::sendPresence(const bool& status, const std::string &note)
void SIPPresence::sendPresence(bool status, const std::string &note)
{
updateStatus(status, note);
......@@ -157,7 +157,7 @@ void SIPPresence::reportPresSubClientNotification(const std::string& uri, pjsip_
Manager::instance().getClient()->getPresenceManager()->newBuddySubscription(uri, status->info[0].basic_open, note);
}
void SIPPresence::subscribeClient(const std::string& uri, const bool& flag)
void SIPPresence::subscribeClient(const std::string& uri, bool flag)
{
/* Check if the buddy was already subscribed */
for (const auto &c : pres_sub_client_list_)
......@@ -208,7 +208,7 @@ void SIPPresence::reportnewServerSubscriptionRequest(PresSubServer *s)
Manager::instance().getClient()->getPresenceManager()->newServerSubscriptionRequest(s->remote);
}
void SIPPresence::approvePresSubServer(const std::string& uri, const bool& flag)
void SIPPresence::approvePresSubServer(const std::string& uri, bool flag)
{
for (const auto &s : pres_sub_server_list_)
if (s->matches((char *) uri.c_str())) {
......
......@@ -133,7 +133,7 @@ public:
/**
* Activate the module (PUBLISH/SUBSCRIBE)
*/
void enable(const bool& flag);
void enable(bool flag);
/**
* Fill xml document, the header and the body
*/
......@@ -142,12 +142,12 @@ public:
* Modify the presence data
* @param status is basically "open" or "close"
*/
void updateStatus(const bool& status, const std::string &note);
void updateStatus(bool status, const std::string &note);
/**
* Send the presence data in a PUBLISH to the PBX or in a NOTIFY
* to a remote subscriber (IP2IP)
*/
void sendPresence(const bool& status, const std::string &note);
void sendPresence(bool status, const std::string &note);
/**
* Send a signal to the client on DBus. The signal contain the status
* of a remote user.
......@@ -157,7 +157,7 @@ public:
* Send a SUBSCRIBE request to PBX/IP2IP
* @param buddyUri Remote user that we want to subscribe
*/
void subscribeClient(const std::string& uri, const bool& flag);
void subscribeClient(const std::string& uri, bool flag);
/**
* Add a buddy in the buddy list.
* @param b PresSubClient pointer
......@@ -181,7 +181,7 @@ public:
* @param flag client decision.
* @param uri uri of the remote subscriber
*/
void approvePresSubServer(const std::string& uri, const bool& flag);
void approvePresSubServer(const std::string& uri, bool flag);
/**
* IP2IP context.
* Add a server associated to a subscriber in the list.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment