diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-12 10:11:36 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-12 10:11:36 +0000 |
commit | 199ef7e3d8b7c1c8d5d34ad31ce1f0855f1a3c5b (patch) | |
tree | 277102fdb207ddd1fbfdc504e3c66c5a074cae77 /channels | |
parent | 593c44bc4355b2c4cc98b15d3a5ec7bb197100b5 (diff) |
Always specify which RTP engine is desired for a new RTP instance.
This fixes a crash reported in #asterisk-dev where chan_mgcp unexpectedly
allocated an RTP instance from res_rtp_multicast, since by not specifying an
engine, you get the first one in the list of engines.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211732 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_gtalk.c | 2 | ||||
-rw-r--r-- | channels/chan_h323.c | 2 | ||||
-rw-r--r-- | channels/chan_jingle.c | 2 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 2 | ||||
-rw-r--r-- | channels/chan_skinny.c | 4 | ||||
-rw-r--r-- | channels/chan_unistim.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 6ad6ed904..a0cc42408 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -947,7 +947,7 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const tmp->initiator = 1; } /* clear codecs */ - if (!(tmp->rtp = ast_rtp_instance_new(NULL, sched, &bindaddr, NULL))) { + if (!(tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr, NULL))) { ast_log(LOG_ERROR, "Failed to create a new RTP instance (possibly an invalid bindaddr?)\n"); ast_free(tmp); return NULL; diff --git a/channels/chan_h323.c b/channels/chan_h323.c index a4135a976..897416a42 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -958,7 +958,7 @@ static int __oh323_rtp_create(struct oh323_pvt *pvt) ast_log(LOG_ERROR, "Unable to locate local IP address for RTP stream\n"); return -1; } - pvt->rtp = ast_rtp_instance_new(NULL, sched, &our_addr, NULL); + pvt->rtp = ast_rtp_instance_new("asterisk", sched, &our_addr, NULL); if (!pvt->rtp) { ast_mutex_unlock(&pvt->lock); ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", strerror(errno)); diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index da98986eb..71113f621 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -772,7 +772,7 @@ static struct jingle_pvt *jingle_alloc(struct jingle *client, const char *from, ast_copy_string(tmp->them, idroster, sizeof(tmp->them)); tmp->initiator = 1; } - tmp->rtp = ast_rtp_instance_new(NULL, sched, &bindaddr, NULL); + tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr, NULL); tmp->parent = client; if (!tmp->rtp) { ast_log(LOG_WARNING, "Out of RTP sessions?\n"); diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index d74fc9daf..cc0125031 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -2614,7 +2614,7 @@ static void start_rtp(struct mgcp_subchannel *sub) sub->rtp = NULL; } /* Allocate the RTP now */ - sub->rtp = ast_rtp_instance_new(NULL, sched, &bindaddr, NULL); + sub->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr, NULL); if (sub->rtp && sub->owner) ast_channel_set_fd(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0)); if (sub->rtp) { diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index c289f3015..546c7eb5e 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3632,9 +3632,9 @@ static void start_rtp(struct skinny_subchannel *sub) ast_mutex_lock(&sub->lock); /* Allocate the RTP */ - sub->rtp = ast_rtp_instance_new(NULL, sched, &bindaddr, NULL); + sub->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr, NULL); if (hasvideo) - sub->vrtp = ast_rtp_instance_new(NULL, sched, &bindaddr, NULL); + sub->vrtp = ast_rtp_instance_new("asterisk", sched, &bindaddr, NULL); if (sub->rtp) { ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_RTCP, 1); diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index bb90301f9..8de4ada33 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -2061,7 +2061,7 @@ static void start_rtp(struct unistim_subchannel *sub) /* Allocate the RTP */ if (unistimdebug) ast_verb(0, "Starting RTP. Bind on %s\n", ast_inet_ntoa(sout.sin_addr)); - sub->rtp = ast_rtp_instance_new(NULL, sched, &sout, NULL); + sub->rtp = ast_rtp_instance_new("asterisk", sched, &sout, NULL); if (!sub->rtp) { ast_log(LOG_WARNING, "Unable to create RTP session: %s binaddr=%s\n", strerror(errno), ast_inet_ntoa(sout.sin_addr)); |