git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@333784
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
static int mbl_ast_hangup(struct mbl_pvt *pvt)
{
- int res = 0;
- for (;;) {
- if (pvt->owner) {
- if (ast_channel_trylock(pvt->owner)) {
- DEADLOCK_AVOIDANCE(&pvt->lock);
- } else {
- res = ast_hangup(pvt->owner);
- /* no need to unlock, ast_hangup() frees the
- * channel */
- break;
- }
- } else
- break;
+ if (pvt->owner) {
+ ast_hangup(pvt->owner);
}
- return res;
+ return 0;
}
/*!