71 lines
2.8 KiB
Diff
71 lines
2.8 KiB
Diff
From a147b72df1ec150c1d733e882225db86142fb339 Mon Sep 17 00:00:00 2001
|
|
From: George Joseph <george.joseph@fairview5.com>
|
|
Date: Sun, 21 Feb 2016 10:01:53 -0700
|
|
Subject: [PATCH] Bump tcp/tls and transaction log levels from 1 to 3
|
|
|
|
sip_transport_tcp, sip_transport_tls and sip_transaction are printing messages
|
|
at log level 1 or 2 for things that are transient, recoverable, possibly
|
|
expected, or are handled with return codes. A good example of this is if we're
|
|
trying to send an OPTIONS message to a TCP client that has disappeared. Both
|
|
sip_transport_tcp and sip_transaction are printing "connection refused"
|
|
messages because the remote client isn't listening. This is generally expected
|
|
behavior and it should be up to the app caller to determine if an error message
|
|
is warranted.
|
|
---
|
|
pjsip/src/pjsip/sip_transaction.c | 4 ++--
|
|
pjsip/src/pjsip/sip_transport_tcp.c | 2 +-
|
|
pjsip/src/pjsip/sip_transport_tls.c | 2 +-
|
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c
|
|
index 46bd971..1b4fdb7 100644
|
|
--- a/pjsip/src/pjsip/sip_transaction.c
|
|
+++ b/pjsip/src/pjsip/sip_transaction.c
|
|
@@ -1898,7 +1898,7 @@ static void send_msg_callback( pjsip_send_state *send_state,
|
|
|
|
err =pj_strerror((pj_status_t)-sent, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(2,(tsx->obj_name,
|
|
+ PJ_LOG(3,(tsx->obj_name,
|
|
"Failed to send %s! err=%d (%s)",
|
|
pjsip_tx_data_get_info(send_state->tdata), -sent,
|
|
errmsg));
|
|
@@ -1938,7 +1938,7 @@ static void send_msg_callback( pjsip_send_state *send_state,
|
|
}
|
|
|
|
} else {
|
|
- PJ_PERROR(2,(tsx->obj_name, (pj_status_t)-sent,
|
|
+ PJ_PERROR(3,(tsx->obj_name, (pj_status_t)-sent,
|
|
"Temporary failure in sending %s, "
|
|
"will try next server",
|
|
pjsip_tx_data_get_info(send_state->tdata)));
|
|
diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c
|
|
index 222cb13..1bbb324 100644
|
|
--- a/pjsip/src/pjsip/sip_transport_tcp.c
|
|
+++ b/pjsip/src/pjsip/sip_transport_tcp.c
|
|
@@ -164,7 +164,7 @@ static void tcp_perror(const char *sender, const char *title,
|
|
|
|
pj_strerror(status, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
+ PJ_LOG(3,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
}
|
|
|
|
|
|
diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
|
|
index 617d7f5..a83ac32 100644
|
|
--- a/pjsip/src/pjsip/sip_transport_tls.c
|
|
+++ b/pjsip/src/pjsip/sip_transport_tls.c
|
|
@@ -170,7 +170,7 @@ static void tls_perror(const char *sender, const char *title,
|
|
|
|
pj_strerror(status, errmsg, sizeof(errmsg));
|
|
|
|
- PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
+ PJ_LOG(3,(sender, "%s: %s [code=%d]", title, errmsg, status));
|
|
}
|
|
|
|
|
|
--
|
|
2.5.0
|
|
|