aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_analog.c
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-02 21:31:17 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-11-02 21:31:17 +0000
commit263f0f8efcb34adfffe5d344803f25d21ff62b24 (patch)
treeb182f90c8f509dfe9bcd070c18499ef827c83c97 /channels/sig_analog.c
parentdcf9232b741eea525a86ce8350813d0bc599597b (diff)
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 '<channel-name>' on channel <number> (<function>(), line <number>)". ........ ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@293649 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sig_analog.c')
-rw-r--r--channels/sig_analog.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index 546a56069..18753270b 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -373,7 +373,8 @@ static int analog_send_callerid(struct analog_pvt *p, int cwcid, struct ast_part
return 0;
}
-static int analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int nullok)
+#define analog_get_index(ast, p, nullok) _analog_get_index(ast, p, nullok, __PRETTY_FUNCTION__, __LINE__)
+static int _analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int nullok, const char *fname, unsigned long line)
{
int res;
if (p->subs[ANALOG_SUB_REAL].owner == ast) {
@@ -385,7 +386,9 @@ static int analog_get_index(struct ast_channel *ast, struct analog_pvt *p, int n
} 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;