]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
convert to use new comm_write().
authoradrian <>
Mon, 21 Oct 2002 21:21:52 +0000 (21:21 +0000)
committeradrian <>
Mon, 21 Oct 2002 21:21:52 +0000 (21:21 +0000)
src/whois.cc

index 06763aa99a290b7d2f659cbdcf93a7093ccad587..c1d37b51804120435aec386569459a1a9808be01 100644 (file)
@@ -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);
 }