diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-14 19:39:12 +0000 |
commit | f0424318479863edeed2a6a128e6d1ac926966e3 (patch) | |
tree | 4fd144260e58c9a66d331fc81b46473723452479 /main/callerid.c | |
parent | c8ca7d2f263f5161ce1b29ec2c9de835131fc950 (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: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/callerid.c')
-rw-r--r-- | main/callerid.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/main/callerid.c b/main/callerid.c index c870a462f..55e20d3da 100644 --- a/main/callerid.c +++ b/main/callerid.c @@ -180,7 +180,7 @@ void callerid_get_dtmf(char *cidstring, char *number, int *flags) number[0] = 0; if (strlen(cidstring) < 2) { - ast_log(LOG_DEBUG, "No cid detected\n"); + ast_debug(1, "No cid detected\n"); *flags = CID_UNKNOWN_NUMBER; return; } @@ -194,7 +194,7 @@ void callerid_get_dtmf(char *cidstring, char *number, int *flags) else if (code == 10) *flags = CID_PRIVATE_NUMBER; else - ast_log(LOG_DEBUG, "Unknown DTMF code %d\n", code); + ast_debug(1, "Unknown DTMF code %d\n", code); } else if (cidstring[0] == 'D' && cidstring[2] == '#') { /* .DK special code */ if (cidstring[1] == '1') @@ -209,7 +209,7 @@ void callerid_get_dtmf(char *cidstring, char *number, int *flags) if (isdigit(cidstring[i])) number[i-1] = cidstring[i]; else - ast_log(LOG_DEBUG, "Unknown CID digit '%c'\n", + ast_debug(1, "Unknown CID digit '%c'\n", cidstring[i]); } number[i-1] = 0; @@ -226,8 +226,7 @@ void callerid_get_dtmf(char *cidstring, char *number, int *flags) } number[i] = 0; } else { - if (option_debug) - ast_log(LOG_DEBUG, "Unknown CID protocol, start digit '%c'\n", cidstring[0]); + ast_debug(1, "Unknown CID protocol, start digit '%c'\n", cidstring[0]); *flags = CID_UNKNOWN_NUMBER; } } @@ -420,8 +419,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i case 0x06: /* short dial number */ case 0x07: /* reserved */ default: /* reserved */ - if (option_debug > 1) - ast_log(LOG_DEBUG, "cid info:#1=%X\n", cid->rawdata[x]); + ast_debug(2, "cid info:#1=%X\n", cid->rawdata[x]); break ; } x++; @@ -437,8 +435,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i case 0x09: /* private dial plan */ case 0x05: /* reserved */ default: /* reserved */ - if (option_debug > 1) - ast_log(LOG_DEBUG, "cid info:#2=%X\n", cid->rawdata[x]); + ast_debug(2, "cid info:#2=%X\n", cid->rawdata[x]); break ; } x++; @@ -453,8 +450,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i case 'C': /* pay phone */ case 'S': /* service congested */ cid->flags |= CID_UNKNOWN_NUMBER; - if (option_debug > 1) - ast_log(LOG_DEBUG, "no cid reason:%c\n",cid->rawdata[x]); + ast_debug(2, "no cid reason:%c\n",cid->rawdata[x]); break ; } x++; @@ -495,8 +491,7 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, i case 0x09: /* private dial plan */ case 0x05: /* reserved */ default: /* reserved */ - if (option_debug > 1) - ast_log(LOG_DEBUG, "did info:#2=%X\n", cid->rawdata[x]); + ast_debug(2, "did info:#2=%X\n", cid->rawdata[x]); break ; } x++; |