diff --git a/apps/app_dial.c b/apps/app_dial.c index 70a355513..85fab4b89 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1390,7 +1390,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags } strcpy(di->interface, interface); AST_LIST_INSERT_TAIL(dialed_interfaces, di, list); - } else { + } else if (dialed) { AST_LIST_UNLOCK(dialed_interfaces); ast_log(LOG_WARNING, "Skipping dialing interface '%s' again since it has already been dialed\n", di->interface); fulldial++; diff --git a/apps/app_queue.c b/apps/app_queue.c index eb652747d..9b667d69f 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2851,9 +2851,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce } strcpy(di->interface, cur->interface); AST_LIST_INSERT_TAIL(dialed_interfaces, di, list); - } else { - if (di) - ast_log(LOG_DEBUG, "Skipping dialing interface '%s' since it has already been dialed\n", di->interface); + } else if (dialed) { + ast_log(LOG_DEBUG, "Skipping dialing interface '%s' since it has already been dialed\n", di->interface); AST_LIST_UNLOCK(dialed_interfaces); free(tmp); continue;