From ed500a9e99c6dffb045248dbe42e251e535598ef Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 2 Nov 2010 21:31:17 +0000 Subject: Merged revisions 293648 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r293648 | rmudgett | 2010-11-02 16:29:25 -0500 (Tue, 02 Nov 2010) | 20 lines Merged revisions 293647 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293647 | rmudgett | 2010-11-02 16:26:30 -0500 (Tue, 02 Nov 2010) | 13 lines 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 '' on channel ((), line )". ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293649 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_dahdi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'channels/chan_dahdi.c') diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index e44d0d975..934e977af 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3539,7 +3539,8 @@ static struct analog_callback dahdi_analog_callbacks = /*! Round robin search locations. */ static struct dahdi_pvt *round_robin[32]; -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) @@ -3551,7 +3552,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; } -- cgit v1.2.3