From 1ba5bbbc331c02682bf04bef4bb47187b681a9a5 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
Date: Fri, 23 Mar 2012 16:19:56 -0400
Subject: [PATCH] #8320: Use two different variables for status and return
 statement in stun's on_status_cb

---
 daemon/src/preferences.cpp     | 2 --
 daemon/src/sip/sipvoiplink.cpp | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/daemon/src/preferences.cpp b/daemon/src/preferences.cpp
index 75b26b2eb9..f169ef0c11 100644
--- a/daemon/src/preferences.cpp
+++ b/daemon/src/preferences.cpp
@@ -377,11 +377,9 @@ void AudioPreference::serialize(Conf::YamlEmitter *emitter)
     Conf::ScalarNode noise(noisereduce_);
     Conf::ScalarNode echo(echocancel_);
     std::stringstream tailstr;
-    DEBUG("************************************************** serialize echotail %d", echoCancelTailLength_);
     tailstr << echoCancelTailLength_;
     Conf::ScalarNode echotail(tailstr.str());
     std::stringstream delaystr;
-    DEBUG("************************************************** serialize echodelay %d", echoCancelTailLength_);
     delaystr << echoCancelDelay_;
     Conf::ScalarNode echodelay(delaystr.str());
 
diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp
index f54a1425c8..53d4dd4ce2 100644
--- a/daemon/src/sip/sipvoiplink.cpp
+++ b/daemon/src/sip/sipvoiplink.cpp
@@ -1233,13 +1233,13 @@ bool SIPVoIPLink::SIPNewIpToIpCall(const std::string& id, const std::string& to)
 pj_bool_t stun_sock_on_status_cb(pj_stun_sock *stun_sock UNUSED, pj_stun_sock_op op UNUSED, pj_status_t status)
 {
     // What ever is the status, we want the keep-alive timer to be rescheduled
-    status = PJ_TRUE;
+    pj_bool_t reschedule = PJ_TRUE;
 
     if(status != PJ_SUCCESS) {
         ERROR("Error STUN session failed because %s failed", pj_stun_sock_op_name(op));
     }
 
-    return status;
+    return reschedule;
 }
 
 pj_bool_t stun_sock_on_rx_data_cb(pj_stun_sock *stun_sock UNUSED, void *pkt UNUSED, unsigned pkt_len UNUSED, const pj_sockaddr_t *src_addr UNUSED, unsigned addr_len UNUSED)
-- 
GitLab