struct oh323_pvt *pvt;
struct sockaddr_in us;
struct rtp_info *info;
- char iabuf[INET_ADDRSTRLEN];
info = (struct rtp_info *)malloc(sizeof(struct rtp_info));
if (!info) {
}
pvt = find_call(call_reference, token);
if (!pvt) {
+ free(info);
ast_log(LOG_ERROR, "Unable to find call %s(%d)\n", token, call_reference);
return NULL;
}
ast_rtp_get_us(pvt->rtp, &us);
ast_mutex_unlock(&pvt->lock);
/* evil hack, until I (or someone?) figures out a better way */
- info->addr = ast_inet_ntoa(iabuf, sizeof(iabuf), bindaddr.sin_addr);
+ ast_inet_ntoa(info->addr, sizeof(info->addr), bindaddr.sin_addr);
info->port = ntohs(us.sin_port);
ast_log(LOG_DEBUG, "Sending RTP 'US' %s:%d\n", info->addr, info->port);
return info;