mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -251,16 +251,14 @@ static int receive_dtmf_digits(struct ast_channel *chan, char *digit_string, int
|
||||
if(option_verbose >= 4)
|
||||
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: DTMF Digit Timeout on %s\n", chan->name);
|
||||
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG,"AlarmReceiver: DTMF timeout on chan %s\n",chan->name);
|
||||
ast_debug(1,"AlarmReceiver: DTMF timeout on chan %s\n",chan->name);
|
||||
|
||||
res = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((r = ast_waitfor(chan, -1) < 0)) {
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "Waitfor returned %d\n", r);
|
||||
ast_debug(1, "Waitfor returned %d\n", r);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -355,8 +353,7 @@ static int write_metadata( FILE *logfile, char *signalling_type, struct ast_chan
|
||||
if (option_verbose >= 3 )
|
||||
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: can't write metadata\n");
|
||||
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG,"AlarmReceiver: can't write metadata\n");
|
||||
ast_debug(1,"AlarmReceiver: can't write metadata\n");
|
||||
}
|
||||
else
|
||||
res = 0;
|
||||
@@ -407,8 +404,7 @@ static int log_events(struct ast_channel *chan, char *signalling_type, event_no
|
||||
if(fd == -1) {
|
||||
if (option_verbose >= 3)
|
||||
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: can't make temporary file\n");
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG,"AlarmReceiver: can't make temporary file\n");
|
||||
ast_debug(1,"AlarmReceiver: can't make temporary file\n");
|
||||
res = -1;
|
||||
}
|
||||
|
||||
@@ -529,8 +525,7 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
|
||||
|
||||
if (option_verbose >= 2)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Received Event %s\n", event);
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "AlarmReceiver: Received event: %s\n", event);
|
||||
ast_debug(1, "AlarmReceiver: Received event: %s\n", event);
|
||||
|
||||
/* Calculate checksum */
|
||||
|
||||
@@ -560,8 +555,7 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
|
||||
database_increment("checksum-errors");
|
||||
if (option_verbose >= 2)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "AlarmReceiver: Nonzero checksum\n");
|
||||
ast_debug(1, "AlarmReceiver: Nonzero checksum\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -572,8 +566,7 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
|
||||
database_increment("format-errors");
|
||||
if(option_verbose >= 2)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Wrong message type\n");
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG, "AlarmReceiver: Wrong message type\n");
|
||||
ast_debug(1, "AlarmReceiver: Wrong message type\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -715,8 +708,7 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
|
||||
*/
|
||||
|
||||
if((!res) && (!ast_strlen_zero(event_app)) && (event_head)){
|
||||
if (option_debug)
|
||||
ast_log(LOG_DEBUG,"Alarmreceiver: executing: %s\n", event_app);
|
||||
ast_debug(1,"Alarmreceiver: executing: %s\n", event_app);
|
||||
ast_safe_system(event_app);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user