mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #26839: sipvoiplink: cleanup
This commit is contained in:
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user