Skip to content
Snippets Groups Projects
Commit bd354a03 authored by Terry Wilson's avatar Terry Wilson
Browse files

Make sure to create the caps structure for autocreated peers

Because crashing is bad.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 8d2a7187
No related branches found
No related tags found
No related merge requests found
......@@ -26226,6 +26226,11 @@ static struct sip_peer *temp_peer(const char *name)
return NULL;
}
 
if (!(peer->caps = ast_format_cap_alloc_nolock())) {
ao2_t_ref(peer, -1, "failed to allocate format capabilities, drop peer");
return NULL;
}
ast_atomic_fetchadd_int(&apeerobjs, 1);
set_peer_defaults(peer);
 
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment