From 80166c6de81bc173a7abb74e9a9d1c83f45badaa Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Sun, 24 Jun 2007 18:51:41 +0000 Subject: Conversions to ast_debug() (issue #9984, patches from eliel and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71338 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_meetme.c | 4 ++-- apps/app_minivm.c | 3 +-- apps/app_rpt.c | 4 ++-- apps/app_skel.c | 5 ++++- apps/app_test.c | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) (limited to 'apps') diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 1a8cb2e28..513cd7821 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -2165,8 +2165,8 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c } } else if (f->frametype == AST_FRAME_NULL) { /* Ignore NULL frames. It is perfectly normal to get these if the person is muted. */ - } else if (option_debug) { - ast_log(LOG_DEBUG, + } else { + ast_debug(1, "Got unrecognized frame on channel %s, f->frametype=%d,f->subclass=%d\n", chan->name, f->frametype, f->subclass); } diff --git a/apps/app_minivm.c b/apps/app_minivm.c index 73ef61b28..728e66b5c 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -941,8 +941,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, filename, format, newtmp, format); ast_safe_system(tmpcmd); finalfilename = newtmp; - if (option_debug > 2) - ast_log (LOG_DEBUG, "-- VOLGAIN: Stored at: %s.%s - Level: %.4f - Mailbox: %s\n", filename, format, vmu->volgain, vmu->username); + ast_debug(3, "-- VOLGAIN: Stored at: %s.%s - Level: %.4f - Mailbox: %s\n", filename, format, vmu->volgain, vmu->username); } else { finalfilename = ast_strdupa(filename); } diff --git a/apps/app_rpt.c b/apps/app_rpt.c index 40880dae2..cc979f6d3 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -805,8 +805,8 @@ static struct function_table_tag function_table[] = { {"ilink", function_ilink}, {"status", function_status}, {"remote", function_remote}, - {"macro", function_macro} - {"gosub", function_gosub} + {"macro", function_macro}, + {"gosub", function_gosub}, } ; /* diff --git a/apps/app_skel.c b/apps/app_skel.c index 230e952da..05897a264 100644 --- a/apps/app_skel.c +++ b/apps/app_skel.c @@ -127,7 +127,10 @@ static int unload_module(void) static int load_module(void) { - return ast_register_application(app, app_exec, synopsis, descrip); + if (ast_register_application(app, app_exec, synopsis, descrip)) + return AST_MODULE_LOAD_DECLINE; + + return AST_MODULE_LOAD_SUCCESS; } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application"); diff --git a/apps/app_test.c b/apps/app_test.c index 8bf7b9e8c..794135156 100644 --- a/apps/app_test.c +++ b/apps/app_test.c @@ -283,7 +283,7 @@ static int testclient_exec(struct ast_channel *chan, void *data) else res = -1; } - if (option_debug && !res ) { + if (!res) { /* Step 12: Hangup! */ ast_debug(1, "TestClient: 12. Hangup\n"); } -- cgit v1.2.3