diff options
Diffstat (limited to 'net/ftp/ftp_ctrl_response_buffer.h')
-rw-r--r-- | net/ftp/ftp_ctrl_response_buffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ftp/ftp_ctrl_response_buffer.h b/net/ftp/ftp_ctrl_response_buffer.h index 66aae8b..6ea34cb 100644 --- a/net/ftp/ftp_ctrl_response_buffer.h +++ b/net/ftp/ftp_ctrl_response_buffer.h @@ -24,7 +24,8 @@ struct FtpCtrlResponse { class FtpCtrlResponseBuffer { public: - FtpCtrlResponseBuffer() {} + FtpCtrlResponseBuffer() : multiline_(false) { + } // Called when data is received from the control socket. Returns error code. int ConsumeData(const char* data, int data_length); @@ -81,6 +82,9 @@ class FtpCtrlResponseBuffer { std::queue<ParsedLine> lines_; + // True if we are in the middle of parsing a multi-line response. + bool multiline_; + // When parsing a multiline response, we don't know beforehand if a line // will have a continuation. So always store last line of multiline response // so we can append the continuation to it. |