summaryrefslogtreecommitdiff
path: root/apps/app_alarmreceiver.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-06-14 19:39:12 +0000
committerRussell Bryant <russell@russellbryant.com>2007-06-14 19:39:12 +0000
commit055d82cbce5ad588f4d612c49f56cd76f4c8bab6 (patch)
tree4fd144260e58c9a66d331fc81b46473723452479 /apps/app_alarmreceiver.c
parent60b029aa8275ef7da70281b3791a2837ffba7930 (diff)
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
Diffstat (limited to 'apps/app_alarmreceiver.c')
-rw-r--r--apps/app_alarmreceiver.c24
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);
}