Bugfix EnableIPV6 issue 255
Review URL: https://webrtc-codereview.appspot.com/378005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1633 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1970b2fcb3
commit
95392e64ba
src/modules/udp_transport/source
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* Use of this source code is governed by a BSD-style license
|
||||||
* that can be found in the LICENSE file in the root of the source
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@ -117,7 +117,6 @@ UdpTransportImpl::UdpTransportImpl(const WebRtc_Word32 id,
|
|||||||
_useSetSockOpt(false),
|
_useSetSockOpt(false),
|
||||||
_qos(false),
|
_qos(false),
|
||||||
_pcp(0),
|
_pcp(0),
|
||||||
_IpV6EnabledRead(false),
|
|
||||||
_ipV6Enabled(false),
|
_ipV6Enabled(false),
|
||||||
_serviceType(0),
|
_serviceType(0),
|
||||||
_overrideDSCP(0),
|
_overrideDSCP(0),
|
||||||
@ -1075,22 +1074,21 @@ bool UdpTransportImpl::SetSockOptUsed()
|
|||||||
return _useSetSockOpt;
|
return _useSetSockOpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32 UdpTransportImpl::EnableIpV6()
|
WebRtc_Word32 UdpTransportImpl::EnableIpV6() {
|
||||||
{
|
WEBRTC_TRACE(kTraceModuleCall, kTraceTransport, _id, "%s", __FUNCTION__);
|
||||||
WEBRTC_TRACE(kTraceModuleCall, kTraceTransport, _id, "%s", __FUNCTION__);
|
|
||||||
CriticalSectionScoped cs(_crit);
|
CriticalSectionScoped cs(_crit);
|
||||||
if(_IpV6EnabledRead)
|
const bool initialized = (_ptrSendRtpSocket || _ptrRtpSocket);
|
||||||
{
|
|
||||||
if(_ipV6Enabled)
|
if (_ipV6Enabled) {
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}else {
|
|
||||||
_lastError = kIpVersion6Error;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ipV6Enabled=true;
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
if (initialized) {
|
||||||
|
_lastError = kIpVersion6Error;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
_ipV6Enabled = true;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32 UdpTransportImpl::FilterIP(
|
WebRtc_Word32 UdpTransportImpl::FilterIP(
|
||||||
@ -1208,7 +1206,6 @@ bool UdpTransportImpl::SourcePortsInitialized() const
|
|||||||
bool UdpTransportImpl::IpV6Enabled() const
|
bool UdpTransportImpl::IpV6Enabled() const
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceTransport, _id, "%s", __FUNCTION__);
|
WEBRTC_TRACE(kTraceStream, kTraceTransport, _id, "%s", __FUNCTION__);
|
||||||
_IpV6EnabledRead=true;
|
|
||||||
return _ipV6Enabled;
|
return _ipV6Enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Use of this source code is governed by a BSD-style license
|
* Use of this source code is governed by a BSD-style license
|
||||||
* that can be found in the LICENSE file in the root of the source
|
* that can be found in the LICENSE file in the root of the source
|
||||||
@ -224,7 +224,6 @@ private:
|
|||||||
bool _useSetSockOpt;
|
bool _useSetSockOpt;
|
||||||
bool _qos;
|
bool _qos;
|
||||||
WebRtc_Word32 _pcp;
|
WebRtc_Word32 _pcp;
|
||||||
mutable bool _IpV6EnabledRead;
|
|
||||||
bool _ipV6Enabled;
|
bool _ipV6Enabled;
|
||||||
WebRtc_Word32 _serviceType;
|
WebRtc_Word32 _serviceType;
|
||||||
WebRtc_Word32 _overrideDSCP;
|
WebRtc_Word32 _overrideDSCP;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user