From a66e98ba742ac57229cdce7ad2528e2e9cd54b45 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Mon, 15 Jul 2013 14:06:37 -0400 Subject: [PATCH] * #26839: sipvoiplink: cleanup --- daemon/src/sip/sipvoiplink.cpp | 13 ++++--------- daemon/src/sip/sipvoiplink.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 1002540b9..8dbe315a3 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -508,7 +508,7 @@ SIPVoIPLink::SIPVoIPLink() : sipTransport(endpt_, cp_, pool_), sipAccountMap_(), TRY(pjlib_util_init()); #ifdef __ANDROID__ - setSipLogFunc(); + setSipLogger(); #endif setSipLogLevel(); TRY(pjnath_init()); @@ -653,9 +653,9 @@ SIPVoIPLink::getAccountIdFromNameAndServer(const std::string &userName, void SIPVoIPLink::setSipLogLevel() { char *envvar = getenv(SIPLOGLEVEL); - int level = 0, result; + int level = 0; - if(envvar != NULL) { + if (envvar != NULL) { std::string loglevel = envvar; if ( ! (std::istringstream(loglevel) >> level) ) level = 0; @@ -665,22 +665,17 @@ void SIPVoIPLink::setSipLogLevel() } #ifdef __ANDROID__ - /* level = Manager::instance().getSipLogLevel(); */ level = 6; #endif // From 0 (min) to 6 (max) pj_log_set_level(level); - DEBUG("SIP log level set to %d", level); } #ifdef __ANDROID__ -void SIPVoIPLink::setSipLogFunc() +void SIPVoIPLink::setSipLogger() { static pj_log_func *currentFunc = (pj_log_func*) pj_log_get_log_func(); - - DEBUG("setting SIP log func"); - pj_log_set_log_func(&showLog); } #endif diff --git a/daemon/src/sip/sipvoiplink.h b/daemon/src/sip/sipvoiplink.h index 948771358..6748e3c76 100644 --- a/daemon/src/sip/sipvoiplink.h +++ b/daemon/src/sip/sipvoiplink.h @@ -92,7 +92,7 @@ class SIPVoIPLink : public VoIPLink { static void setSipLogLevel(); #ifdef __ANDROID__ - static void setSipLogFunc(); + static void setSipLogger(); #endif /**