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

Unified Diff: net/quic/crypto/crypto_framer.cc

Issue 147763009: Add the client address to the Public Reset packet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove crypto_handshake_message.* from the CL; they were committed separately Created 6 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 | « net/quic/crypto/crypto_framer.h ('k') | net/quic/crypto/crypto_handshake.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_framer.cc
===================================================================
--- net/quic/crypto/crypto_framer.cc (revision 248755)
+++ net/quic/crypto/crypto_framer.cc (working copy)
@@ -4,7 +4,7 @@
#include "net/quic/crypto/crypto_framer.h"
-#include "net/quic/crypto/crypto_handshake.h"
+#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/quic_data_reader.h"
#include "net/quic/quic_data_writer.h"
@@ -26,7 +26,8 @@
public:
explicit OneShotVisitor(CryptoHandshakeMessage* out)
: out_(out),
- error_(false) {
+ error_(false),
+ done_(false) {
}
virtual void OnError(CryptoFramer* framer) OVERRIDE { error_ = true; }
@@ -34,13 +35,17 @@
virtual void OnHandshakeMessage(
const CryptoHandshakeMessage& message) OVERRIDE {
*out_ = message;
+ done_ = true;
}
bool error() const { return error_; }
+ bool done() const { return done_; }
+
private:
CryptoHandshakeMessage* const out_;
bool error_;
+ bool done_;
};
} // namespace
@@ -61,7 +66,7 @@
CryptoFramer framer;
framer.set_visitor(&visitor);
- if (!framer.ProcessInput(in) || visitor.error() ||
+ if (!framer.ProcessInput(in) || visitor.error() || !visitor.done() ||
framer.InputBytesRemaining()) {
return NULL;
}
« no previous file with comments | « net/quic/crypto/crypto_framer.h ('k') | net/quic/crypto/crypto_handshake.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698