From: serassio <> Date: Sun, 2 Mar 2008 20:32:24 +0000 (+0000) Subject: Windows port: Fix wrong FD read/write CPU profiling. X-Git-Tag: BASIC_TPROXY4~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0242b721bb9d7865c61afe4e464ab19a0928961b;p=thirdparty%2Fsquid.git Windows port: Fix wrong FD read/write CPU profiling. --- diff --git a/src/fd.cc b/src/fd.cc index 04b5f7b0d7..bc5e1226fa 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -1,6 +1,6 @@ /* - * $Id: fd.cc,v 1.60 2007/12/14 23:11:46 amosjeffries Exp $ + * $Id: fd.cc,v 1.61 2008/03/02 13:32:24 serassio Exp $ * * DEBUG: section 51 Filedescriptor Functions * AUTHOR: Duane Wessels @@ -113,9 +113,9 @@ int socket_read_method(int fd, char *buf, int len) { int i; - PROF_start(send); + PROF_start(recv); i = recv(fd, (void *) buf, len, 0); - PROF_stop(send); + PROF_stop(recv); return i; } @@ -142,7 +142,11 @@ socket_write_method(int fd, const char *buf, int len) int file_write_method(int fd, const char *buf, int len) { - return (_write(fd, buf, len)); + int i; + PROF_start(write); + i = (_write(fd, buf, len)); + PROF_stop(write); + return i; } #else