aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_multicast_rtp.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-08 22:08:07 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-08 22:08:07 +0000
commitc3c2e5edfd715b3a99aac1567623a0b1b7d49de0 (patch)
treec05335b563c3f7cb9a3edbf3e101d8e1b80e0be4 /channels/chan_multicast_rtp.c
parentaf344f1a5be5b43f1d10b95ea6e57ebfa761cf50 (diff)
Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses within Asterisk. While many files have been updated to make use of the API, chan_sip and the RTP code are the files which actually support IPv6 addresses at the time of this commit. The way has been paved for easier upgrading for other files in the near future, though. Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne for their hard work on this. (closes issue #17565) Reported by: russell Patches: asteriskv6-test-report.pdf uploaded by russell (license 2) Review: https://reviewboard.asterisk.org/r/743 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@274783 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_multicast_rtp.c')
-rw-r--r--channels/chan_multicast_rtp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/channels/chan_multicast_rtp.c b/channels/chan_multicast_rtp.c
index 24c073215..f385d4467 100644
--- a/channels/chan_multicast_rtp.c
+++ b/channels/chan_multicast_rtp.c
@@ -111,7 +111,8 @@ static struct ast_channel *multicast_rtp_request(const char *type, format_t form
{
char *tmp = ast_strdupa(data), *multicast_type = tmp, *destination, *control;
struct ast_rtp_instance *instance;
- struct sockaddr_in control_address = { .sin_family = AF_INET, }, destination_address = { .sin_family = AF_INET, };
+ struct ast_sockaddr control_address;
+ struct ast_sockaddr destination_address;
struct ast_channel *chan;
format_t fmt = ast_best_codec(format);
@@ -125,13 +126,15 @@ static struct ast_channel *multicast_rtp_request(const char *type, format_t form
}
*destination++ = '\0';
- if (ast_parse_arg(destination, PARSE_INADDR | PARSE_PORT_REQUIRE, &destination_address)) {
+ if (!ast_sockaddr_parse(&destination_address, destination,
+ PARSE_PORT_REQUIRE)) {
goto failure;
}
if ((control = strchr(destination, '/'))) {
*control++ = '\0';
- if (ast_parse_arg(control, PARSE_INADDR | PARSE_PORT_REQUIRE, &control_address)) {
+ if (!ast_sockaddr_parse(&control_address, control,
+ PARSE_PORT_REQUIRE)) {
goto failure;
}
}