| Index: webrtc/p2p/base/rawtransportchannel.cc
|
| diff --git a/webrtc/p2p/base/rawtransportchannel.cc b/webrtc/p2p/base/rawtransportchannel.cc
|
| index b032e63cdae2c18c8b7217d5bd7c33a134308d61..5b6eed8845604acc1984843b8565e8f74aad328d 100644
|
| --- a/webrtc/p2p/base/rawtransportchannel.cc
|
| +++ b/webrtc/p2p/base/rawtransportchannel.cc
|
| @@ -22,19 +22,12 @@
|
|
|
| #if defined(FEATURE_ENABLE_PSTN)
|
|
|
| -namespace {
|
| -
|
| -const uint32 MSG_DESTROY_RTC_UNUSED_PORTS = 1;
|
| -
|
| -} // namespace
|
| -
|
| namespace cricket {
|
|
|
| RawTransportChannel::RawTransportChannel(const std::string& content_name,
|
| int component,
|
| RawTransport* transport,
|
| - rtc::Thread *worker_thread,
|
| - PortAllocator *allocator)
|
| + PortAllocator* allocator)
|
| : TransportChannelImpl(content_name, component),
|
| raw_transport_(transport),
|
| allocator_(allocator),
|
| @@ -43,10 +36,6 @@ RawTransportChannel::RawTransportChannel(const std::string& content_name,
|
| relay_port_(NULL),
|
| port_(NULL),
|
| use_relay_(false) {
|
| - if (worker_thread == NULL)
|
| - worker_thread_ = raw_transport_->worker_thread();
|
| - else
|
| - worker_thread_ = worker_thread;
|
| }
|
|
|
| RawTransportChannel::~RawTransportChannel() {
|
| @@ -158,7 +147,7 @@ void RawTransportChannel::OnPortReady(
|
| }
|
|
|
| void RawTransportChannel::OnCandidatesReady(
|
| - PortAllocatorSession *session, const std::vector<Candidate>& candidates) {
|
| + PortAllocatorSession* session, const std::vector<Candidate>& candidates) {
|
| ASSERT(session == allocator_session_);
|
| ASSERT(candidates.size() >= 1);
|
|
|
| @@ -207,8 +196,7 @@ void RawTransportChannel::SetPort(PortInterface* port) {
|
|
|
| // We don't need any ports other than the one we picked.
|
| allocator_session_->StopGettingPorts();
|
| - worker_thread_->Post(
|
| - this, MSG_DESTROY_RTC_UNUSED_PORTS, NULL);
|
| + DestroyUnusedPorts();
|
|
|
| // Send a message to the other client containing our address.
|
|
|
| @@ -243,8 +231,7 @@ void RawTransportChannel::OnReadPacket(
|
| SignalReadPacket(this, data, size, rtc::CreatePacketTime(0), 0);
|
| }
|
|
|
| -void RawTransportChannel::OnMessage(rtc::Message* msg) {
|
| - ASSERT(msg->message_id == MSG_DESTROY_RTC_UNUSED_PORTS);
|
| +void RawTransportChannel::DestroyUnusedPorts() {
|
| ASSERT(port_ != NULL);
|
| if (port_ != stun_port_) {
|
| stun_port_->Destroy();
|
|
|