summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-01-17 21:20:22 +0000
committerRussell Bryant <russell@russellbryant.com>2007-01-17 21:20:22 +0000
commitc56f9184e88e035c861e78fc80119d6103d1d5fd (patch)
tree57b6ee3392767fcf39c599051b456013161d2c77 /channels
parenta48fdb83a5957a6d978507eda0e59b5866c7e68a (diff)
Merged revisions 51198 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r51198 | russell | 2007-01-17 15:18:35 -0600 (Wed, 17 Jan 2007) | 11 lines Merged revisions 51197 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51197 | russell | 2007-01-17 15:17:21 -0600 (Wed, 17 Jan 2007) | 3 lines Move the check for a failure of ast_channel_alloc() to before locking the pvt structure again. Otherwise, on a failure, this will cause a deadlock. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0efd38377..e115cf1c9 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3850,11 +3850,11 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, "SIP/%s-%08x", my_name, (int)(long) i);
}
- sip_pvt_lock(i);
if (!tmp) {
ast_log(LOG_WARNING, "Unable to allocate AST channel structure for SIP channel\n");
return NULL;
}
+ sip_pvt_lock(i);
tmp->tech = &sip_tech;
/* Select our native format based on codec preference until we receive