summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-05-05 15:34:43 -0300
committerJoshua Colp <jcolp@digium.com>2015-05-05 17:01:31 -0300
commitbebf0b9b27e06f45c87162abae9efd822a9630a5 (patch)
tree149b0af45ba9941e4ab3d208d89635c05192ec90
parentbc8dcbdfbce48424e407ad19cb2b87dcbb0ddde5 (diff)
chan_unistim: Fix build failure due to ACL changes.
Change-Id: I57081045c72b9fcf12d5c84493278f9272c31b32
-rw-r--r--channels/chan_unistim.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index 51f811c02..82b3fced9 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -6399,6 +6399,7 @@ static void delete_device(struct unistim_device *d)
{
struct unistim_line *l;
struct unistim_subchannel *sub;
+ struct unistimsession *s;
if (unistimdebug) {
ast_verb(0, "Removing device '%s'\n", d->name);
@@ -6406,25 +6407,20 @@ static void delete_device(struct unistim_device *d)
AST_LIST_LOCK(&d->subs);
AST_LIST_TRAVERSE_SAFE_BEGIN(&d->subs, sub, list){
if (sub->subtype == SUB_REAL) {
- if (!sub) {
- ast_log(LOG_ERROR, "Device '%s' without a subchannel !, aborting\n",
- d->name);
- ast_config_destroy(cfg);
- return 0;
- }
if (sub->owner) {
ast_log(LOG_WARNING,
"Device '%s' was not deleted : a call is in progress. Try again later.\n",
d->name);
- d = d->next;
- continue;
+ AST_LIST_UNLOCK(&d->subs);
+ return;
}
}
if (sub->subtype == SUB_THREEWAY) {
ast_log(LOG_WARNING,
"Device '%s' with threeway call subchannels allocated, aborting.\n",
d->name);
- break;
+ AST_LIST_UNLOCK(&d->subs);
+ return;
}
AST_LIST_REMOVE_CURRENT(list);
ast_mutex_destroy(&sub->lock);