Chromium Code Reviews

Unified Diff: runtime/bin/socket_linux.cc

Issue 312343002: - Fix truncation in Socket calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « runtime/bin/socket_android.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_linux.cc
===================================================================
--- runtime/bin/socket_linux.cc (revision 37036)
+++ runtime/bin/socket_linux.cc (working copy)
@@ -94,7 +94,7 @@
}
-int Socket::Read(intptr_t fd, void* buffer, intptr_t num_bytes) {
+intptr_t Socket::Read(intptr_t fd, void* buffer, intptr_t num_bytes) {
ASSERT(fd >= 0);
ssize_t read_bytes = TEMP_FAILURE_RETRY(read(fd, buffer, num_bytes));
ASSERT(EAGAIN == EWOULDBLOCK);
@@ -107,7 +107,7 @@
}
-int Socket::RecvFrom(intptr_t fd, void* buffer, intptr_t num_bytes,
+intptr_t Socket::RecvFrom(intptr_t fd, void* buffer, intptr_t num_bytes,
RawAddr* addr) {
ASSERT(fd >= 0);
socklen_t addr_len = sizeof(addr->ss);
@@ -122,7 +122,7 @@
}
-int Socket::Write(intptr_t fd, const void* buffer, intptr_t num_bytes) {
+intptr_t Socket::Write(intptr_t fd, const void* buffer, intptr_t num_bytes) {
ASSERT(fd >= 0);
ssize_t written_bytes = TEMP_FAILURE_RETRY(write(fd, buffer, num_bytes));
ASSERT(EAGAIN == EWOULDBLOCK);
@@ -135,7 +135,7 @@
}
-int Socket::SendTo(intptr_t fd, const void* buffer, intptr_t num_bytes,
+intptr_t Socket::SendTo(intptr_t fd, const void* buffer, intptr_t num_bytes,
RawAddr addr) {
ASSERT(fd >= 0);
ssize_t written_bytes = TEMP_FAILURE_RETRY(
« no previous file with comments | « runtime/bin/socket_android.cc ('k') | runtime/bin/socket_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine