Commit a66e98ba authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #26839: sipvoiplink: cleanup

parent 1e6a3404
......@@ -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
......
......@@ -92,7 +92,7 @@ class SIPVoIPLink : public VoIPLink {
static void setSipLogLevel();
#ifdef __ANDROID__
static void setSipLogFunc();
static void setSipLogger();
#endif
/**
......
Supports Markdown
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