]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows port: Fix wrong FD read/write CPU profiling.
authorserassio <>
Sun, 2 Mar 2008 20:32:24 +0000 (20:32 +0000)
committerserassio <>
Sun, 2 Mar 2008 20:32:24 +0000 (20:32 +0000)
src/fd.cc

index 04b5f7b0d75431dc082c033fe01342efdfe9f6b0..bc5e1226fa0956850104b17a45aad4887c1139f3 100644 (file)
--- 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