ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
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);
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.");
tmp->initiator = 1;
}
/* 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))) {
ast_log(LOG_ERROR, "Failed to create a new RTP instance (possibly an invalid bindaddr?)\n");
ast_free(tmp);
if (!io)
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)) {
ast_log(LOG_WARNING, "Unable to get own IP address, Gtalk disabled\n");
return 0;
{
struct ast_sockaddr tmp;
- tmp = ast_sockaddr_from_sin(bindaddr);
+ ast_sockaddr_from_sin(&tmp, &bindaddr);
if (ast_find_ourip(&our_addr, &tmp)) {
ast_mutex_unlock(&pvt->lock);
ast_log(LOG_ERROR, "Unable to locate local IP address for RTP stream\n");
{
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);
}
if (pvt->recvonly) {
ast_rtp_instance_get_local_address(p->rtp, &sin_tmp);
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);
us.s_addr = htonl(ast_sockaddr_ipv4(&us_tmp));
ast_copy_string(tmp->them, idroster, sizeof(tmp->them));
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->parent = client;
if (!tmp->rtp) {
sin.sin_port = htons(tmp->port);
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);
tmp = tmp->next;
}
if (!io)
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)) {
ast_log(LOG_WARNING, "Unable to get own IP address, Jingle disabled\n");
return 0;