Closed Bug 317327 Opened 15 years ago Closed 15 years ago

Eliminate method |nsImapServerResponseParser::end_of_line()|

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: engel, Assigned: engel)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

The method |nsImapServerResponseParser::end_of_line()| should be inlined and eliminated, because this makes the code in |nsImapServerResponseParser.cpp| easier to understand.
Note that the method |response_data()| is invoked only once.  I suggest to no longer call |end_of_line()| from that method; but rather to call it directly from |nsImapServerResponseParser::ParseIMAPServerResponse|
Blocks: 313038
Status: NEW → ASSIGNED
Attachment #203828 - Flags: review?(bienvenu)
Comment on attachment 203828 [details] [diff] [review]
Eliminate |nsImapServerResponseParser::end_of_line()|

I'll give this a try. Thx for the patch!
Attachment #203828 - Flags: review?(bienvenu) → review+
this caused syntax errors at shutdown parsing the "BYE" response...
David, thank you for the hint.  A check for |ContinueParse()| was missing in the  previous patch!  This is now fixed.

Additionally, I added another such check which is needed further below.  Also, in |nsImapServerResponseParser::resp_cond_bye()|, the call to |skip_to_CRLF()| can be eliminated (it did not do anything because the parser was already disconnected).
Attachment #203828 - Attachment is obsolete: true
Attachment #204829 - Flags: review?(bienvenu)
Comment on attachment 204829 [details] [diff] [review]
Eliminate |nsImapServerResponseParser::end_of_line()|, v2

fix checked in, thx Hans-Andreas.
Attachment #204829 - Flags: superreview+
Attachment #204829 - Flags: review?(bienvenu)
Attachment #204829 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Keywords: fixed1.8.1
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.