| 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;
|
| }
|
|
|