Fix calls of ast_sockaddr_from_sin() from IPv6 integration.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
9d81fc3273
commit
c0fd67750b
|
@ -813,7 +813,7 @@ static int gtalk_create_candidates(struct gtalk *client, struct gtalk_pvt *p, ch
|
||||||
|
|
||||||
ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
|
ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
|
||||||
ast_sockaddr_to_sin(&sin_tmp, &sin);
|
ast_sockaddr_to_sin(&sin_tmp, &sin);
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
ast_find_ourip(&us, &bindaddr_tmp);
|
ast_find_ourip(&us, &bindaddr_tmp);
|
||||||
if (!strcmp(ast_sockaddr_stringify_addr(&us), "127.0.0.1")) {
|
if (!strcmp(ast_sockaddr_stringify_addr(&us), "127.0.0.1")) {
|
||||||
ast_log(LOG_WARNING, "Found a loopback IP on the system, check your network configuration or set the bindaddr attribute.");
|
ast_log(LOG_WARNING, "Found a loopback IP on the system, check your network configuration or set the bindaddr attribute.");
|
||||||
|
@ -956,7 +956,7 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const
|
||||||
tmp->initiator = 1;
|
tmp->initiator = 1;
|
||||||
}
|
}
|
||||||
/* clear codecs */
|
/* clear codecs */
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
if (!(tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL))) {
|
if (!(tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL))) {
|
||||||
ast_log(LOG_ERROR, "Failed to create a new RTP instance (possibly an invalid bindaddr?)\n");
|
ast_log(LOG_ERROR, "Failed to create a new RTP instance (possibly an invalid bindaddr?)\n");
|
||||||
ast_free(tmp);
|
ast_free(tmp);
|
||||||
|
@ -2096,7 +2096,7 @@ static int load_module(void)
|
||||||
if (!io)
|
if (!io)
|
||||||
ast_log(LOG_WARNING, "Unable to create I/O context\n");
|
ast_log(LOG_WARNING, "Unable to create I/O context\n");
|
||||||
|
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp)) {
|
if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp)) {
|
||||||
ast_log(LOG_WARNING, "Unable to get own IP address, Gtalk disabled\n");
|
ast_log(LOG_WARNING, "Unable to get own IP address, Gtalk disabled\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -962,7 +962,7 @@ static int __oh323_rtp_create(struct oh323_pvt *pvt)
|
||||||
{
|
{
|
||||||
struct ast_sockaddr tmp;
|
struct ast_sockaddr tmp;
|
||||||
|
|
||||||
tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&tmp, &bindaddr);
|
||||||
if (ast_find_ourip(&our_addr, &tmp)) {
|
if (ast_find_ourip(&our_addr, &tmp)) {
|
||||||
ast_mutex_unlock(&pvt->lock);
|
ast_mutex_unlock(&pvt->lock);
|
||||||
ast_log(LOG_ERROR, "Unable to locate local IP address for RTP stream\n");
|
ast_log(LOG_ERROR, "Unable to locate local IP address for RTP stream\n");
|
||||||
|
@ -1994,7 +1994,7 @@ static void setup_rtp_connection(unsigned call_reference, const char *remoteIp,
|
||||||
{
|
{
|
||||||
struct ast_sockaddr tmp;
|
struct ast_sockaddr tmp;
|
||||||
|
|
||||||
tmp = ast_sockaddr_from_sin(them);
|
ast_sockaddr_from_sin(&tmp, &them);
|
||||||
ast_rtp_instance_set_remote_address(pvt->rtp, &tmp);
|
ast_rtp_instance_set_remote_address(pvt->rtp, &tmp);
|
||||||
}
|
}
|
||||||
if (pvt->recvonly) {
|
if (pvt->recvonly) {
|
||||||
|
|
|
@ -622,7 +622,7 @@ static int jingle_create_candidates(struct jingle *client, struct jingle_pvt *p,
|
||||||
|
|
||||||
ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
|
ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
|
||||||
ast_sockaddr_to_sin(&sin_tmp, &sin);
|
ast_sockaddr_to_sin(&sin_tmp, &sin);
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
ast_find_ourip(&us_tmp, &bindaddr_tmp);
|
ast_find_ourip(&us_tmp, &bindaddr_tmp);
|
||||||
us.s_addr = htonl(ast_sockaddr_ipv4(&us_tmp));
|
us.s_addr = htonl(ast_sockaddr_ipv4(&us_tmp));
|
||||||
|
|
||||||
|
@ -782,7 +782,7 @@ static struct jingle_pvt *jingle_alloc(struct jingle *client, const char *from,
|
||||||
ast_copy_string(tmp->them, idroster, sizeof(tmp->them));
|
ast_copy_string(tmp->them, idroster, sizeof(tmp->them));
|
||||||
tmp->initiator = 1;
|
tmp->initiator = 1;
|
||||||
}
|
}
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL);
|
tmp->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL);
|
||||||
tmp->parent = client;
|
tmp->parent = client;
|
||||||
if (!tmp->rtp) {
|
if (!tmp->rtp) {
|
||||||
|
@ -1084,7 +1084,7 @@ static int jingle_update_stun(struct jingle *client, struct jingle_pvt *p)
|
||||||
sin.sin_port = htons(tmp->port);
|
sin.sin_port = htons(tmp->port);
|
||||||
snprintf(username, sizeof(username), "%s:%s", tmp->ufrag, p->ourcandidates->ufrag);
|
snprintf(username, sizeof(username), "%s:%s", tmp->ufrag, p->ourcandidates->ufrag);
|
||||||
|
|
||||||
sin_tmp = ast_sockaddr_from_sin(sin);
|
ast_sockaddr_from_sin(&sin_tmp, &sin);
|
||||||
ast_rtp_instance_stun_request(p->rtp, &sin_tmp, username);
|
ast_rtp_instance_stun_request(p->rtp, &sin_tmp, username);
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
@ -1906,7 +1906,7 @@ static int load_module(void)
|
||||||
if (!io)
|
if (!io)
|
||||||
ast_log(LOG_WARNING, "Unable to create I/O context\n");
|
ast_log(LOG_WARNING, "Unable to create I/O context\n");
|
||||||
|
|
||||||
bindaddr_tmp = ast_sockaddr_from_sin(bindaddr);
|
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
|
||||||
if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp)) {
|
if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp)) {
|
||||||
ast_log(LOG_WARNING, "Unable to get own IP address, Jingle disabled\n");
|
ast_log(LOG_WARNING, "Unable to get own IP address, Jingle disabled\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue