summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_agent.c2
-rw-r--r--channels/chan_dahdi.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 01938396d..49f85635e 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -779,7 +779,7 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da
if (p->chan && !ast_check_hangup(p->chan)) {
while (ast_channel_trylock(p->chan)) {
if ((res = ast_channel_unlock(ast))) {
- ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", strerror(res));
+ ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", res > 0 ? strerror(res) : "Bad ao2obj data");
ast_mutex_unlock(&p->lock);
return -1;
}
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index d420695e3..2e537f870 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -8819,7 +8819,9 @@ static struct ast_frame *__dahdi_exception(struct ast_channel *ast)
int usedindex = -1;
struct dahdi_pvt *p = ast_channel_tech_pvt(ast);
- idx = dahdi_get_index(ast, p, 1);
+ if ((idx = dahdi_get_index(ast, p, 0)) < 0) {
+ idx = SUB_REAL;
+ }
p->subs[idx].f.frametype = AST_FRAME_NULL;
p->subs[idx].f.datalen = 0;