Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: webrtc/p2p/base/stunrequest.cc

Issue 1737493004: Keep on sending stun binding requests on zero-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change back to uint32_t timestamp Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/stunrequest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stunrequest.cc
diff --git a/webrtc/p2p/base/stunrequest.cc b/webrtc/p2p/base/stunrequest.cc
index ce0364e8db55e48bb6b7afd22d98d1ff2c1b3b04..3338861cfba3ee4b6020f09b4679f235d1770276 100644
--- a/webrtc/p2p/base/stunrequest.cc
+++ b/webrtc/p2p/base/stunrequest.cc
@@ -63,6 +63,16 @@ void StunRequestManager::Flush(int msg_type) {
}
}
+bool StunRequestManager::HasRequest(int msg_type) {
+ for (const auto kv : requests_) {
+ StunRequest* request = kv.second;
+ if (msg_type == kAllRequests || msg_type == request->type()) {
+ return true;
+ }
+ }
+ return false;
+}
+
void StunRequestManager::Remove(StunRequest* request) {
ASSERT(request->manager() == this);
RequestMap::iterator iter = requests_.find(request->id());
« no previous file with comments | « webrtc/p2p/base/stunrequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698