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

Unified Diff: net/base/nss_memio.c

Issue 337823002: Stop attempting to write to transport sockets in NSS on failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rsleevi comments Created 6 years, 6 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
Index: net/base/nss_memio.c
diff --git a/net/base/nss_memio.c b/net/base/nss_memio.c
index 77e35da2d550642e637a1059a49aa48a56316a28..0af7310f6ad03b80428f818566f1d30fc29286b7 100644
--- a/net/base/nss_memio.c
+++ b/net/base/nss_memio.c
@@ -469,6 +469,14 @@ void memio_PutWriteResult(memio_Private *secret, int bytes_written)
}
}
+int memio_LastWriteError(memio_Private *secret)
+{
+ struct memio_buffer* mb = &((PRFilePrivate *)secret)->writebuf;
+ PR_ASSERT(mb->bufsize);
+
+ return mb->last_err;
+}
+
/*--------------- private memio_buffer self-test -----------------*/
/* Even a trivial unit test is very helpful when doing circular buffers. */

Powered by Google App Engine
This is Rietveld 408576698