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

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

Issue 2837133003: Don't crash if STUN error message is missing ERROR-CODE attribute. (Closed)
Patch Set: Created 3 years, 8 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/relayport.cc ('k') | webrtc/p2p/base/stun.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stun.h
diff --git a/webrtc/p2p/base/stun.h b/webrtc/p2p/base/stun.h
index ab200687f5ba4d8855730ade4dde2786c0354124..4ea45050cab4350c2d964dcb84e285665a25612e 100644
--- a/webrtc/p2p/base/stun.h
+++ b/webrtc/p2p/base/stun.h
@@ -156,6 +156,9 @@ class StunMessage {
// Gets these specific attribute values.
const StunErrorCodeAttribute* GetErrorCode() const;
+ // Returns the code inside the error code attribute, if present, and
+ // STUN_ERROR_GLOBAL_FAILURE otherwise.
+ int GetErrorCodeValue() const;
const StunUInt16ListAttribute* GetUnknownAttributes() const;
// Takes ownership of the specified attribute and adds it to the message.
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/stun.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698