--------------------- PatchSet 5322 Date: 2002/10/09 09:56:05 Author: adri Branch: commloops Tag: (none) Log: * modify ipc.c to use fdc_open() instead of fd_open() - use the new comm system! Members: src/ipc.c:1.8.10.1->1.8.10.2 Index: squid/src/ipc.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ipc.c,v retrieving revision 1.8.10.1 retrieving revision 1.8.10.2 diff -u -r1.8.10.1 -r1.8.10.2 --- squid/src/ipc.c 13 Sep 2002 04:51:27 -0000 1.8.10.1 +++ squid/src/ipc.c 9 Oct 2002 09:56:05 -0000 1.8.10.2 @@ -1,6 +1,6 @@ /* - * $Id: ipc.c,v 1.8.10.1 2002/09/13 04:51:27 adri Exp $ + * $Id: ipc.c,v 1.8.10.2 2002/10/09 09:56:05 adri Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -34,6 +34,8 @@ */ #include "squid.h" +#include "StoreIOBuffer.h" +#include "comm.h" static const char *hello_string = "hi there\n"; #define HELLO_BUF_SZ 32 @@ -119,10 +121,10 @@ debug(50, 0) ("ipcCreate: pipe: %s\n", xstrerror()); return -1; } - fd_open(prfd = p2c[0], FD_PIPE, "IPC FIFO Parent Read"); - fd_open(cwfd = p2c[1], FD_PIPE, "IPC FIFO Child Write"); - fd_open(crfd = c2p[0], FD_PIPE, "IPC FIFO Child Read"); - fd_open(pwfd = c2p[1], FD_PIPE, "IPC FIFO Parent Write"); + fdc_open(prfd = p2c[0], FD_PIPE, "IPC FIFO Parent Read"); + fdc_open(cwfd = p2c[1], FD_PIPE, "IPC FIFO Child Write"); + fdc_open(crfd = c2p[0], FD_PIPE, "IPC FIFO Child Read"); + fdc_open(pwfd = c2p[1], FD_PIPE, "IPC FIFO Parent Write"); #if HAVE_SOCKETPAIR && defined(AF_UNIX) } else if (type == IPC_UNIX_STREAM) { int fds[2]; @@ -135,16 +137,16 @@ setsockopt(fds[0], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen)); setsockopt(fds[1], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen)); setsockopt(fds[1], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen)); - fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX STREAM Parent"); - fd_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX STREAM Parent"); + fdc_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX STREAM Parent"); + fdc_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX STREAM Parent"); } else if (type == IPC_UNIX_DGRAM) { int fds[2]; if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) < 0) { debug(50, 0) ("ipcCreate: socketpair: %s\n", xstrerror()); return -1; } - fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX DGRAM Parent"); - fd_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX DGRAM Parent"); + fdc_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX DGRAM Parent"); + fdc_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX DGRAM Parent"); #endif } else { assert(IPC_NONE);