* #26839: sipvoiplink: cleanup

This commit is contained in:
Tristan Matthews
2013-07-15 14:06:37 -04:00
parent 1e6a340407
commit a66e98ba74
2 changed files with 5 additions and 10 deletions

View File

@ -508,7 +508,7 @@ SIPVoIPLink::SIPVoIPLink() : sipTransport(endpt_, cp_, pool_), sipAccountMap_(),
TRY(pjlib_util_init()); TRY(pjlib_util_init());
#ifdef __ANDROID__ #ifdef __ANDROID__
setSipLogFunc(); setSipLogger();
#endif #endif
setSipLogLevel(); setSipLogLevel();
TRY(pjnath_init()); TRY(pjnath_init());
@ -653,9 +653,9 @@ SIPVoIPLink::getAccountIdFromNameAndServer(const std::string &userName,
void SIPVoIPLink::setSipLogLevel() void SIPVoIPLink::setSipLogLevel()
{ {
char *envvar = getenv(SIPLOGLEVEL); char *envvar = getenv(SIPLOGLEVEL);
int level = 0, result; int level = 0;
if(envvar != NULL) { if (envvar != NULL) {
std::string loglevel = envvar; std::string loglevel = envvar;
if ( ! (std::istringstream(loglevel) >> level) ) level = 0; if ( ! (std::istringstream(loglevel) >> level) ) level = 0;
@ -665,22 +665,17 @@ void SIPVoIPLink::setSipLogLevel()
} }
#ifdef __ANDROID__ #ifdef __ANDROID__
/* level = Manager::instance().getSipLogLevel(); */
level = 6; level = 6;
#endif #endif
// From 0 (min) to 6 (max) // From 0 (min) to 6 (max)
pj_log_set_level(level); pj_log_set_level(level);
DEBUG("SIP log level set to %d", level);
} }
#ifdef __ANDROID__ #ifdef __ANDROID__
void SIPVoIPLink::setSipLogFunc() void SIPVoIPLink::setSipLogger()
{ {
static pj_log_func *currentFunc = (pj_log_func*) pj_log_get_log_func(); static pj_log_func *currentFunc = (pj_log_func*) pj_log_get_log_func();
DEBUG("setting SIP log func");
pj_log_set_log_func(&showLog); pj_log_set_log_func(&showLog);
} }
#endif #endif

View File

@ -92,7 +92,7 @@ class SIPVoIPLink : public VoIPLink {
static void setSipLogLevel(); static void setSipLogLevel();
#ifdef __ANDROID__ #ifdef __ANDROID__
static void setSipLogFunc(); static void setSipLogger();
#endif #endif
/** /**