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

Unified Diff: webrtc/p2p/base/turnport.h

Issue 1547373002: Cease all future TURN requests when a TURN refresh request fails. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years 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
Index: webrtc/p2p/base/turnport.h
diff --git a/webrtc/p2p/base/turnport.h b/webrtc/p2p/base/turnport.h
index 4be9249c8fb6fbb802db91f06f5f11f1ccf29c65..09d78d56b8b4310388f5325994555d927d14f5ca 100644
--- a/webrtc/p2p/base/turnport.h
+++ b/webrtc/p2p/base/turnport.h
@@ -141,7 +141,8 @@ class TurnPort : public Port {
sigslot::signal2<TurnPort*, int> SignalTurnRefreshResult;
sigslot::signal3<TurnPort*, const rtc::SocketAddress&, int>
SignalCreatePermissionResult;
- void FlushRequests() { request_manager_.Flush(); }
+ void FlushRequests(int msg_type) { request_manager_.Flush(msg_type); }
+ bool RequestsEmpty() { return request_manager_.empty(); }
pthatcher1 2016/01/05 00:10:03 How about name this HasRequests() (with the opposi
honghaiz3 2016/01/05 04:47:39 Done.
void set_credentials(RelayCredentials& credentials) {
credentials_ = credentials;
}
@@ -178,7 +179,8 @@ class TurnPort : public Port {
enum {
MSG_ALLOCATE_ERROR = MSG_FIRST_AVAILABLE,
MSG_ALLOCATE_MISMATCH,
- MSG_TRY_ALTERNATE_SERVER
+ MSG_TRY_ALTERNATE_SERVER,
+ MSG_REFRESH_ERROR
};
typedef std::list<TurnEntry*> EntryList;
@@ -199,7 +201,7 @@ class TurnPort : public Port {
// Shuts down the turn port, usually because of some fatal errors.
void Close();
- void OnTurnRefreshError() { Close(); }
+ void OnTurnRefreshError();
bool SetAlternateServer(const rtc::SocketAddress& address);
void ResolveTurnAddress(const rtc::SocketAddress& address);
void OnResolveResult(rtc::AsyncResolverInterface* resolver);

Powered by Google App Engine
This is Rietveld 408576698