Hi Henrik,
A little question:
In helper.c, the function helperHandleRead() use the FD_READ_METHOD macro
to read from socket, in helperStatefulHandleRead() is used read(). I think
that there is no special reason for this.
On nt port the FD_READ_METHOD macro is very useful, because I need to use
recv() instead of read(), so, this is the patch.
Index: helper.c
===================================================================
RCS file: /cvsroot/squid/squid/src/helper.c,v
retrieving revision 1.17
diff -u -p -r1.17 helper.c
--- helper.c 13 Apr 2002 23:09:17 -0000 1.17
+++ helper.c 28 Apr 2002 09:17:56 -0000
@@ -756,7 +756,7 @@ helperStatefulHandleRead(int fd, void *d
assert(fd == srv->rfd);
assert(cbdataReferenceValid(data));
statCounter.syscalls.sock.reads++;
- len = read(fd, srv->buf + srv->offset, srv->buf_sz - srv->offset);
+ len = FD_READ_METHOD(fd, srv->buf + srv->offset, srv->buf_sz -
srv->offset);
fd_bytes(fd, len, FD_READ);
debug(29, 5) ("helperStatefulHandleRead: %d bytes from %s #%d.\n",
len, hlp->id_name, srv->index + 1);
Regards
Guido
-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Sun Apr 28 2002 - 03:26:25 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:22 MST