diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-11-02 21:26:30 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-11-02 21:26:30 +0000 |
commit | 83c10fd68ce5c05081d6d403229b5203ab26664d (patch) | |
tree | 39a3e16ab63fa071879e119914796c390b6bcdaf | |
parent | ca1e524b7660ce141452e514837eec0d7595ee76 (diff) |
Merged revisions 293639 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r293639 | rmudgett | 2010-11-02 16:24:13 -0500 (Tue, 02 Nov 2010) | 6 lines
Make warning message have more useful information in it.
Change "Unable to get index, and nullok is not asserted" to "Unable to get
index for '<channel-name>' on channel <number> (<function>(), line
<number>)".
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@293647 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_dahdi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 79078e7a6..e200ee17c 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -1502,7 +1502,8 @@ static struct dahdi_ring_cadence AS_RP_cadence = {{250, 10000}}; #define CANBUSYDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __DAHDI_SIG_FXO) */) #define CANPROGRESSDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __DAHDI_SIG_FXO) */) -static int dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok) +#define dahdi_get_index(ast, p, nullok) _dahdi_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__) +static int _dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line) { int res; if (p->subs[SUB_REAL].owner == ast) @@ -1514,7 +1515,9 @@ static int dahdi_get_index(struct ast_channel *ast, struct dahdi_pvt *p, int nul else { res = -1; if (!nullok) - ast_log(LOG_WARNING, "Unable to get index, and nullok is not asserted\n"); + ast_log(LOG_WARNING, + "Unable to get index for '%s' on channel %d (%s(), line %lu)\n", + ast ? ast->name : "", p->channel, fname, line); } return res; } |