diff options
Diffstat (limited to 'apps/app_alarmreceiver.c')
-rw-r--r-- | apps/app_alarmreceiver.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c index 56f604f27..f74abb8a6 100644 --- a/apps/app_alarmreceiver.c +++ b/apps/app_alarmreceiver.c @@ -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); } |