Commit c3593dcb authored by Simon Morlat's avatar Simon Morlat

cleanup based on lastest ortp

parent fa223109
......@@ -195,8 +195,6 @@ LOCAL_CFLAGS += \
-include $(LOCAL_PATH)/../build/android/libmediastreamer2_AndroidConfig.h \
-DMS2_INTERNAL \
-DMS2_FILTERS \
-DINET6 \
-DORTP_INET6 \
-D_POSIX_SOURCE -Wall
......
......@@ -54,8 +54,6 @@ AC_ARG_ENABLE(strict,
[wall_werror=$enableval],
[wall_werror=yes]
)
CFLAGS="-DORTP_INET6 $CFLAGS "
#for clang
case $CC in
......@@ -64,19 +62,7 @@ case $CC in
;;
esac
dnl enable ipv6 support
AC_ARG_ENABLE(ipv6,
[AS_HELP_STRING([--enable-ipv6], [Turn on IPv6 support (default=yes)])],
[case "${enableval}" in
yes) ipv6=true;;
no) ipv6=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
esac],
[ipv6=true]
)
if test x$ipv6 = xtrue ; then
CFLAGS="$CFLAGS -DINET6"
fi
dnl enable timestamp support
AC_ARG_ENABLE(ntp-timestamp,
......
......@@ -89,7 +89,6 @@ endif(GIT_PROGRAM)
add_definitions(
-DMEDIASTREAMER2_EXPORTS
-DMEDIASTREAMER2_INTERNAL_EXPORTS
-DORTP_INET6
-D_TRUE_TIME
-DMS2_INTERNAL
-DMS2_FILTERS
......
......@@ -36,13 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/mscodecutils.h"
#include "private.h"
#ifdef INET6
#include <sys/types.h>
#ifndef WIN32
#include <sys/socket.h>
#include <netdb.h>
#endif
#endif
static void audio_stream_free(AudioStream *stream) {
media_stream_free(&stream->ms);
......
......@@ -1894,7 +1894,7 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
mblk_t *mp = evt_data->packet;
struct sockaddr_in *udp_remote = NULL;
struct sockaddr_in source_addr;
struct sockaddr_storage *aaddr;
const struct sockaddr_storage *aaddr;
int remote_port;
bool_t res;
char tr_id_str[25];
......@@ -1910,14 +1910,14 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
}
memset(src6host, 0, sizeof(src6host));
aaddr = (struct sockaddr_storage *)&evt_data->ep->addr;
aaddr = &evt_data->source_addr;
switch (aaddr->ss_family) {
case AF_INET6:
remote_port = ntohs(((struct sockaddr_in6 *)&evt_data->ep->addr)->sin6_port);
remote_port = ntohs(((struct sockaddr_in6 *)&evt_data->source_addr)->sin6_port);
ms_warning("ice: Received IPv6 STUN packet. Not supported yet!");
return;
case AF_INET:
udp_remote = (struct sockaddr_in*)&evt_data->ep->addr;
udp_remote = (struct sockaddr_in*)&evt_data->source_addr;
remote_port = ntohs(udp_remote->sin_port);
break;
default:
......@@ -1925,7 +1925,7 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
return;
}
ice_inet_ntoa((struct sockaddr *)&evt_data->ep->addr, evt_data->ep->addrlen, src6host, sizeof(src6host));
ice_inet_ntoa((struct sockaddr *)&evt_data->source_addr, evt_data->source_addrlen, src6host, sizeof(src6host));
if (src6host[0] == '\0') return;
remote_addr.addr = ntohl(udp_remote->sin_addr.s_addr);
remote_addr.port = ntohs(udp_remote->sin_port);
......
......@@ -243,7 +243,6 @@ const MSQualityIndicator *media_stream_get_quality_indicator(MediaStream *stream
bool_t ms_is_ipv6(const char *remote) {
bool_t ret = FALSE;
#ifdef INET6
struct addrinfo hints, *res0;
int err;
......@@ -257,7 +256,6 @@ bool_t ms_is_ipv6(const char *remote) {
}
ret = (res0->ai_addr->sa_family == AF_INET6);
freeaddrinfo(res0);
#endif
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment