summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-04-29 11:44:11 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-04-29 11:44:11 -0500
commit1e41d148228ff1b8b8b7a7df452b5dee7f46550f (patch)
treecdf7cb158ff49021181488dc094d62b2c245a072 /channels
parente4b086939d6bc5916bc7bf87165152a41af9b327 (diff)
parent41ecf225876d518a01116fe66491ee018b487813 (diff)
Merge "chan_sip: Make autocreated peers send PeerStatus events"
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9e5a7fd83..7fde6f8f9 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17713,6 +17713,10 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sock
if (!peer && sip_cfg.autocreatepeer != AUTOPEERS_DISABLED) {
/* Create peer if we have autocreate mode enabled */
peer = temp_peer(name);
+ if (peer && !(peer->endpoint = ast_endpoint_create("SIP", name))) {
+ ao2_t_ref(peer, -1, "failed to allocate Stasis endpoint, drop peer");
+ peer = NULL;
+ }
if (peer) {
ao2_t_link(peers, peer, "link peer into peer table");
if (!ast_sockaddr_isnull(&peer->addr)) {