Closed
Bug 939549
Opened 11 years ago
Closed 8 years ago
Checking the return value of Write() in CopyData mailnews/imap/src/nsImapMailFolder.cpp
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1242030
People
(Reporter: ishikawa, Assigned: ishikawa)
References
Details
Attachments
(1 file)
(This is related to Bug 939548.
I am checking for some I/O issues not checked properly by TB when
the underlying file system is a remotely mounted CIFS-share.
I recognized the issue is very similar in nature to
Bug 936990)
The return value of Write() is not checked in a few places, and
also I noticed the return value of Close() is not checked in many places.
These are bad coding style since remotely mounted filesystem can fail in Write() and Close() during transient network errors (or for that matter, local
file system can return errors to write() or close() when the file system becomes full.)
So these should be checked.
I am attaching a patch that checks the return value of Write(), but
just marked places where the return value of Close() is not checked.
TIA
Do we really NOT want a message in the console when these fail (very rare)? If we want, you can use NS_ENSURE_SUCCESS(rv, rv).
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to :aceman from comment #1)
> Do we really NOT want a message in the console when these fail (very rare)?
> If we want, you can use NS_ENSURE_SUCCESS(rv, rv).
Yes, I want it printed. I got quite confused with these macro's semantics.
Thank you for pointing this out.
I will roll up another patch.
TIA
Updated•11 years ago
|
Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core
Assignee | ||
Comment 3•8 years ago
|
||
This is now being taken care of in bug Bug 1242030 - Consolidated patch set from bug 1122698, bug 1134527, bug 1134529, bug 1174500
Especially the patch named
fix-close-MERGED-imap-dir.patch
there.
So I am setting this as duplicate of that bug.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•