summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 00:23:50 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-24 00:23:50 +0000
commit87f9445eb26e7c46475234ab3a5b30fa1f7d1bd5 (patch)
treefdd746c784ca2c6643ff71f17106a36ecdfa6bbf /net
parent0e99b20309c9dd45d122d597ddcaab33a2653826 (diff)
downloadchromium_src-87f9445eb26e7c46475234ab3a5b30fa1f7d1bd5.zip
chromium_src-87f9445eb26e7c46475234ab3a5b30fa1f7d1bd5.tar.gz
chromium_src-87f9445eb26e7c46475234ab3a5b30fa1f7d1bd5.tar.bz2
The constructor should initialize callback_ to NULL.
R=dank Review URL: http://codereview.chromium.org/6372 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3879 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/tcp_client_socket.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/base/tcp_client_socket.cc b/net/base/tcp_client_socket.cc
index d42cf1b..bb25e34 100644
--- a/net/base/tcp_client_socket.cc
+++ b/net/base/tcp_client_socket.cc
@@ -56,7 +56,8 @@ TCPClientSocket::TCPClientSocket(const AddressList& addresses)
: socket_(INVALID_SOCKET),
addresses_(addresses),
current_ai_(addresses_.head()),
- wait_state_(NOT_WAITING) {
+ wait_state_(NOT_WAITING),
+ callback_(NULL) {
memset(&overlapped_, 0, sizeof(overlapped_));
EnsureWinsockInit();
}
@@ -228,11 +229,11 @@ int TCPClientSocket::CreateSocket(const struct addrinfo* ai) {
// http://support.microsoft.com/kb/823764/EN-US
// On XP, the default buffer sizes are 8KB.
const int kSocketBufferSize = 32 * 1024;
- int rv = setsockopt(socket_, SOL_SOCKET, SO_SNDBUF,
+ int rv = setsockopt(socket_, SOL_SOCKET, SO_SNDBUF,
reinterpret_cast<const char*>(&kSocketBufferSize),
sizeof(kSocketBufferSize));
DCHECK(!rv) << "Could not set socket send buffer size";
- rv = setsockopt(socket_, SOL_SOCKET, SO_RCVBUF,
+ rv = setsockopt(socket_, SOL_SOCKET, SO_RCVBUF,
reinterpret_cast<const char*>(&kSocketBufferSize),
sizeof(kSocketBufferSize));
DCHECK(!rv) << "Could not set socket receive buffer size";
@@ -254,7 +255,7 @@ int TCPClientSocket::CreateSocket(const struct addrinfo* ai) {
// Client writes 50 bytes of POST data (partial packet #2)
// In the above example, with Nagle, a RTT delay is inserted between these
// two sends due to nagle. RTTs can easily be 100ms or more. The best
- // fix is to make sure that for POSTing data, we write as much data as
+ // fix is to make sure that for POSTing data, we write as much data as
// possible and minimize partial packets. We will fix that. But disabling
// Nagle also ensure we don't run into this delay in other edge cases.
// See also: