From: adrian <> Date: Mon, 21 Oct 2002 21:21:52 +0000 (+0000) Subject: convert to use new comm_write(). X-Git-Tag: SQUID_3_0_PRE1~595 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e65468654c8631503226897c08a2ed01a5e50d26;p=thirdparty%2Fsquid.git convert to use new comm_write(). --- diff --git a/src/whois.cc b/src/whois.cc index 06763aa99a..c1d37b5180 100644 --- a/src/whois.cc +++ b/src/whois.cc @@ -1,6 +1,6 @@ /* - * $Id: whois.cc,v 1.21 2002/10/21 14:00:03 adrian Exp $ + * $Id: whois.cc,v 1.22 2002/10/21 15:21:52 adrian Exp $ * * DEBUG: section 75 WHOIS protocol * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -35,6 +35,7 @@ #include "squid.h" #include "Store.h" +#include "comm.h" #define WHOIS_PORT 43 @@ -53,6 +54,12 @@ static IOCB whoisReadReply; CBDATA_TYPE(WhoisState); +static void +whoisWriteComplete(int fd, char *buf, size_t size, comm_err_t flag, int xerrno, void *data) +{ + xfree(buf); +} + void whoisStart(FwdState * fwd) { @@ -70,7 +77,7 @@ whoisStart(FwdState * fwd) l = strLen(p->request->urlpath) + 3; buf = (char *)xmalloc(l); snprintf(buf, l, "%s\r\n", strBuf(p->request->urlpath) + 1); - comm_old_write(fd, buf, strlen(buf), NULL, p, xfree); + comm_write(fd, buf, strlen(buf), whoisWriteComplete, p); comm_read(fd, p->buf, BUFSIZ, whoisReadReply, p); commSetTimeout(fd, Config.Timeout.read, whoisTimeout, p); }