Index: webrtc/p2p/base/turnport.cc |
diff --git a/webrtc/p2p/base/turnport.cc b/webrtc/p2p/base/turnport.cc |
index 7e0e64d6edacaf97751c3cbc56d18ca9a6f88dad..3f6443e0ea1fa65208e3d4841d1028392a4e2baa 100644 |
--- a/webrtc/p2p/base/turnport.cc |
+++ b/webrtc/p2p/base/turnport.cc |
@@ -199,7 +199,7 @@ TurnPort::TurnPort(rtc::Thread* thread, |
server_address_(server_address), |
credentials_(credentials), |
socket_(socket), |
- resolver_(NULL), |
+ resolver_(nullptr), |
error_(0), |
request_manager_(thread), |
next_channel_number_(TURN_CHANNEL_NUMBER_START), |
@@ -233,8 +233,8 @@ TurnPort::TurnPort(rtc::Thread* thread, |
password), |
server_address_(server_address), |
credentials_(credentials), |
- socket_(NULL), |
- resolver_(NULL), |
+ socket_(nullptr), |
+ resolver_(nullptr), |
error_(0), |
request_manager_(thread), |
next_channel_number_(TURN_CHANNEL_NUMBER_START), |
@@ -441,7 +441,7 @@ void TurnPort::OnAllocateMismatch() { |
} else { |
delete socket_; |
} |
- socket_ = NULL; |
+ socket_ = nullptr; |
ResetNonce(); |
PrepareAddress(); |
@@ -452,11 +452,11 @@ Connection* TurnPort::CreateConnection(const Candidate& remote_candidate, |
CandidateOrigin origin) { |
// TURN-UDP can only connect to UDP candidates. |
if (!SupportsProtocol(remote_candidate.protocol())) { |
- return NULL; |
+ return nullptr; |
} |
if (state_ == STATE_DISCONNECTED || state_ == STATE_RECEIVEONLY) { |
- return NULL; |
+ return nullptr; |
} |
// A TURN port will have two candiates, STUN and TURN. STUN may not |
@@ -476,7 +476,7 @@ Connection* TurnPort::CreateConnection(const Candidate& remote_candidate, |
return conn; |
} |
} |
- return NULL; |
+ return nullptr; |
} |
bool TurnPort::FailAndPruneConnection(const rtc::SocketAddress& address) { |
@@ -807,7 +807,7 @@ void TurnPort::OnMessage(rtc::Message* message) { |
RTC_DCHECK(server_address().proto == PROTO_TCP); |
RTC_DCHECK(!SharedSocket()); |
delete socket_; |
- socket_ = NULL; |
+ socket_ = nullptr; |
PrepareAddress(); |
} |
break; |
@@ -993,7 +993,7 @@ static bool MatchesAddress(TurnEntry* e, rtc::SocketAddress addr) { |
TurnEntry* TurnPort::FindEntry(const rtc::SocketAddress& addr) const { |
EntryList::const_iterator it = std::find_if(entries_.begin(), entries_.end(), |
std::bind2nd(std::ptr_fun(MatchesAddress), addr)); |
- return (it != entries_.end()) ? *it : NULL; |
+ return (it != entries_.end()) ? *it : nullptr; |
} |
static bool MatchesChannelId(TurnEntry* e, int id) { |
@@ -1002,7 +1002,7 @@ static bool MatchesChannelId(TurnEntry* e, int id) { |
TurnEntry* TurnPort::FindEntry(int channel_id) const { |
EntryList::const_iterator it = std::find_if(entries_.begin(), entries_.end(), |
std::bind2nd(std::ptr_fun(MatchesChannelId), channel_id)); |
- return (it != entries_.end()) ? *it : NULL; |
+ return (it != entries_.end()) ? *it : nullptr; |
} |
bool TurnPort::EntryExists(TurnEntry* e) { |
@@ -1023,7 +1023,7 @@ void TurnPort::CreateOrRefreshEntry(const rtc::SocketAddress& addr) { |
} |
void TurnPort::DestroyEntry(TurnEntry* entry) { |
- RTC_DCHECK(entry != NULL); |
+ RTC_DCHECK(entry != nullptr); |
entry->SignalDestroyed(entry); |
entries_.remove(entry); |
delete entry; |
@@ -1044,7 +1044,7 @@ void TurnPort::HandleConnectionDestroyed(Connection* conn) { |
// already destroyed. |
const rtc::SocketAddress& remote_address = conn->remote_candidate().address(); |
TurnEntry* entry = FindEntry(remote_address); |
- RTC_DCHECK(entry != NULL); |
+ RTC_DCHECK(entry != nullptr); |
ScheduleEntryDestruction(entry); |
} |
@@ -1371,7 +1371,7 @@ void TurnCreatePermissionRequest::OnTimeout() { |
void TurnCreatePermissionRequest::OnEntryDestroyed(TurnEntry* entry) { |
RTC_DCHECK(entry_ == entry); |
- entry_ = NULL; |
+ entry_ = nullptr; |
} |
TurnChannelBindRequest::TurnChannelBindRequest( |
@@ -1441,7 +1441,7 @@ void TurnChannelBindRequest::OnTimeout() { |
void TurnChannelBindRequest::OnEntryDestroyed(TurnEntry* entry) { |
RTC_DCHECK(entry_ == entry); |
- entry_ = NULL; |
+ entry_ = nullptr; |
} |
TurnEntry::TurnEntry(TurnPort* port, int channel_id, |