diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_dahdi.c | 7 | ||||
-rw-r--r-- | channels/sig_analog.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 5ad97dfe7..0edcc8601 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; } 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; |