[Asterisk-cvs] asterisk/apps app_directed_pickup.c,1.2,1.3
markster
markster
Tue Oct 11 17:13:36 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv1098/apps
Modified Files:
app_directed_pickup.c
Log Message:
Fix directed pickup to a call that is up (bug #5425 with mods)
Index: app_directed_pickup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_directed_pickup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- app_directed_pickup.c 24 Sep 2005 14:22:12 -0000 1.2
+++ app_directed_pickup.c 11 Oct 2005 21:08:26 -0000 1.3
@@ -100,7 +100,6 @@
if (res) {
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
res = -1;
- ast_mutex_unlock(&target->lock);
goto out;
}
res = ast_queue_control(chan, AST_CONTROL_ANSWER);
@@ -108,24 +107,21 @@
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n",
chan->name);
res = -1;
- ast_mutex_unlock(&target->lock);
goto out;
}
res = ast_channel_masquerade(target, chan);
if (res) {
ast_log(LOG_WARNING, "Unable to masquerade '%s' into '%s'\n", chan->name, target->name);
res = -1;
- ast_mutex_unlock(&target->lock);
goto out;
}
- /* Done */
- ast_mutex_unlock(&target->lock);
} else {
ast_log(LOG_DEBUG, "No call pickup possible...\n");
res = -1;
}
-
+ /* Done */
out:
+ if (target) ast_mutex_unlock(&target->lock);
LOCAL_USER_REMOVE(u);
return res;
More information about the svn-commits
mailing list