Related to r276951
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@281760
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
char clen[10];
const char *max = NULL;
+ /* deadlock avoidance */
+ while (dialog->owner && ast_channel_trylock(dialog->owner)) {
+ sip_pvt_unlock(dialog);
+ usleep(1);
+ sip_pvt_lock(dialog);
+ }
+
if (dialog->owner) {
max = pbx_builtin_getvar_helper(dialog->owner, "SIP_MAX_FORWARDS");
+ ast_channel_unlock(dialog->owner);
}
/* The channel variable overrides the peer/channel value */