projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d2a718
)
Make sure to create the caps structure for autocreated peers
author
Terry Wilson
<twilson@digium.com>
Tue, 26 Apr 2011 23:04:10 +0000
(23:04 +0000)
committer
Terry Wilson
<twilson@digium.com>
Tue, 26 Apr 2011 23:04:10 +0000
(23:04 +0000)
Because crashing is bad.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@315674
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
channels/chan_sip.c
patch
|
blob
|
history
diff --git
a/channels/chan_sip.c
b/channels/chan_sip.c
index
81cdce2
..
23a1949
100644
(file)
--- a/
channels/chan_sip.c
+++ b/
channels/chan_sip.c
@@
-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);