summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-11-23 21:50:02 +0000
committerBenny Prijono <bennylp@teluu.com>2006-11-23 21:50:02 +0000
commit8cac85e9605766be1a5d062234b82fe22abb2105 (patch)
treefb7d91642fabd2118b131ecdec52dfca0330b573 /pjsip
parent67d4e56dc8a365871c3dca4f04fcf8b9c9f47ee6 (diff)
Updated Python project with base PJSUA API
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@824 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_core.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 7d9fa3b8..bb169c41 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -285,18 +285,19 @@ static pj_bool_t mod_pjsua_on_rx_response(pjsip_rx_data *rdata)
/* Log callback */
static void log_writer(int level, const char *buffer, int len)
{
- /* Write to stdout, file, and application callback. */
-
- if (level <= (int)pjsua_var.log_cfg.console_level)
- pj_log_write(level, buffer, len);
+ /* Write to file, stdout or application callback. */
if (pjsua_var.log_file) {
pj_ssize_t size = len;
pj_file_write(pjsua_var.log_file, buffer, &size);
}
- if (pjsua_var.log_cfg.cb)
- (*pjsua_var.log_cfg.cb)(level, buffer, len);
+ if (level <= (int)pjsua_var.log_cfg.console_level) {
+ if (pjsua_var.log_cfg.cb)
+ (*pjsua_var.log_cfg.cb)(level, buffer, len);
+ else
+ pj_log_write(level, buffer, len);
+ }
}