ast_softhangup_nolock(transferer->chan1, AST_SOFTHANGUP_DEV);
if (target->chan1)
ast_softhangup_nolock(target->chan1, AST_SOFTHANGUP_DEV);
- return -1;
+ return -2;
}
return 0;
}
if (targetcall_pvt->owner)
ast_channel_unlock(targetcall_pvt->owner);
/* Right now, we have to hangup, sorry. Bridge is destroyed */
- ast_hangup(transferer->owner);
+ if (res != -2)
+ ast_hangup(transferer->owner);
} else {
/* Transfer succeeded! */
be accessible after the transfer! */
*nounlock = 1;
ast_channel_unlock(current.chan1);
- ast_channel_unlock(current.chan2);
/* Connect the call */