From 043f0ed1b0c9bca210c955f62248722bb0bf6164 Mon Sep 17 00:00:00 2001 From: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Date: Thu, 12 Sep 2013 17:34:53 -0400 Subject: [PATCH] sip: removed android logging --- daemon/src/sip/sipvoiplink.cpp | 41 ---------------------------------- 1 file changed, 41 deletions(-) diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 8c09422253..525ba3dfd2 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -124,11 +124,6 @@ void registration_cb(pjsip_regc_cbparam *param); pj_bool_t transaction_request_cb(pjsip_rx_data *rdata); pj_bool_t transaction_response_cb(pjsip_rx_data *rdata) ; -#ifdef __ANDROID__ -void showLog(int level, const char *data, int len); -void showMsg(const char *format, ...); -#endif - void transfer_client_cb(pjsip_evsub *sub, pjsip_event *event); /** @@ -198,26 +193,6 @@ pj_bool_t transaction_response_cb(pjsip_rx_data *rdata) return PJ_FALSE; } -#ifdef __ANDROID__ -void showMsg(const char *format, ...) -{ - va_list arg; - - va_start(arg, format); - __android_log_vprint(ANDROID_LOG_INFO, "apjsua", format, arg); - //vsnprintf(app_var.out_buf, sizeof(app_var.out_buf), format, arg); - va_end(arg); - - /* pj_sem_post(app_var.output_sem); - pj_sem_wait(app_var.out_print_sem); */ -} - -void showLog(int level, const char *data, int len) -{ - showMsg("%s", data); -} -#endif - void updateSDPFromSTUN(SIPCall &call, SIPAccount &account, const SipTransport &transport) { std::vector<long> socketDescriptors(call.getAudioRtp().getSocketDescriptors()); @@ -524,9 +499,6 @@ SIPVoIPLink::SIPVoIPLink() : sipTransport(endpt_, cp_, pool_), sipAccountMap_(), TRY(pjlib_util_init()); -#ifdef __ANDROID__ - setSipLogger(); -#endif setSipLogLevel(); TRY(pjnath_init()); @@ -686,23 +658,10 @@ void SIPVoIPLink::setSipLogLevel() level = level > 6 ? 6 : level; level = level < 0 ? 0 : level; } - -#ifdef __ANDROID__ - level = 6; -#endif - // From 0 (min) to 6 (max) pj_log_set_level(level); } -#ifdef __ANDROID__ -void SIPVoIPLink::setSipLogger() -{ - static pj_log_func *currentFunc = (pj_log_func*) pj_log_get_log_func(); - pj_log_set_log_func(&showLog); -} -#endif - // Called from EventThread::run (not main thread) bool SIPVoIPLink::getEvent() { -- GitLab