aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-20 21:40:32 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-12-20 21:40:32 +0000
commitaaed0bf78cc56c4d68ec6b4d48132e9d13b204da (patch)
treed892c554af8f88cc9803870ef58a310e345435b3 /channels/chan_sip.c
parentc07e548f567c4069bb07f6c00d5a328e5e88bc5c (diff)
Merged revisions 299248 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r299248 | mmichelson | 2010-12-20 15:38:30 -0600 (Mon, 20 Dec 2010) | 20 lines Fix a couple of CCSS issues. * Make sure to allocate a cc_params structure when creating autopeers. * Use sip_uri_cmp when retrieving SIP CC agents and monitors in case parameters appear in the URI. (closes issue #18504) Reported by: kkm (closes issue #18338) Reported by: GeorgeKonopacki Patches: 18338.diff uploaded by mmichelson (license 60) Tested by: GeorgeKonopacki ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@299249 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c292d448a..d5747189e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -1639,7 +1639,7 @@ static int find_by_notify_uri_helper(void *obj, void *arg, int flags)
struct sip_cc_agent_pvt *agent_pvt = agent->private_data;
const char *uri = arg;
- return !strcmp(agent_pvt->notify_uri, uri) ? CMP_MATCH | CMP_STOP : 0;
+ return !sip_uri_cmp(agent_pvt->notify_uri, uri) ? CMP_MATCH | CMP_STOP : 0;
}
static struct ast_cc_agent *find_sip_cc_agent_by_notify_uri(const char * const uri)
@@ -1654,7 +1654,7 @@ static int find_by_subscribe_uri_helper(void *obj, void *arg, int flags)
struct sip_cc_agent_pvt *agent_pvt = agent->private_data;
const char *uri = arg;
- return !strcmp(agent_pvt->subscribe_uri, uri) ? CMP_MATCH | CMP_STOP : 0;
+ return !sip_uri_cmp(agent_pvt->subscribe_uri, uri) ? CMP_MATCH | CMP_STOP : 0;
}
static struct ast_cc_agent *find_sip_cc_agent_by_subscribe_uri(const char * const uri)
@@ -25876,6 +25876,11 @@ static struct sip_peer *temp_peer(const char *name)
ao2_t_ref(peer, -1, "failed to string_field_init, drop peer");
return NULL;
}
+
+ if (!(peer->cc_params = ast_cc_config_params_init())) {
+ ao2_t_ref(peer, -1, "failed to allocate cc_params for peer");
+ return NULL;
+ }
ast_atomic_fetchadd_int(&apeerobjs, 1);
set_peer_defaults(peer);