summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2018-03-07 15:36:17 -0500
committerCorey Farrell <git@cfware.com>2018-03-07 16:03:01 -0600
commitc8a521b6c804d66abb367783dba75eecb16889a2 (patch)
treecd017f42216be9712f6b38cacffd8d6a67484844 /channels/chan_sip.c
parent9040057db38dbc3d8181a5405d13ed8c8083d438 (diff)
Replace direct checks of option_debug with DEBUG_ATLEAST macro.
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 85701634c..12d745b41 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -22475,7 +22475,7 @@ static void sip_dump_history(struct sip_pvt *dialog)
return;
}
- if (!option_debug && !sipdebug) {
+ if (!sipdebug && !DEBUG_ATLEAST(1)) {
if (!errmsg) {
ast_log(LOG_NOTICE, "You must have debugging enabled (SIP or Asterisk) in order to dump SIP history.\n");
errmsg = 1;
@@ -22483,20 +22483,20 @@ static void sip_dump_history(struct sip_pvt *dialog)
return;
}
- ast_debug(1, "\n---------- SIP HISTORY for '%s' \n", dialog->callid);
+ ast_log(LOG_DEBUG, "\n---------- SIP HISTORY for '%s' \n", dialog->callid);
if (dialog->subscribed) {
- ast_debug(1, " * Subscription\n");
+ ast_log(LOG_DEBUG, " * Subscription\n");
} else {
- ast_debug(1, " * SIP Call\n");
+ ast_log(LOG_DEBUG, " * SIP Call\n");
}
if (dialog->history) {
AST_LIST_TRAVERSE(dialog->history, hist, list)
- ast_debug(1, " %-3.3d. %s\n", ++x, hist->event);
+ ast_log(LOG_DEBUG, " %-3.3d. %s\n", ++x, hist->event);
}
if (!x) {
- ast_debug(1, "Call '%s' has no history\n", dialog->callid);
+ ast_log(LOG_DEBUG, "Call '%s' has no history\n", dialog->callid);
}
- ast_debug(1, "\n---------- END SIP HISTORY for '%s' \n", dialog->callid);
+ ast_log(LOG_DEBUG, "\n---------- END SIP HISTORY for '%s' \n", dialog->callid);
}