]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add in a recvfrom() wrapper - its still non-callback, but it means I can
authoradrian <>
Mon, 21 Oct 2002 11:38:32 +0000 (11:38 +0000)
committeradrian <>
Mon, 21 Oct 2002 11:38:32 +0000 (11:38 +0000)
tidy things up and remove the direct socket calls from other places.

src/comm.cc

index d78abc8c5006a7e62f8067214a19d94c784828db..c988b990074ebd84f69c25195f7032677ac697d4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.340 2002/10/16 15:03:12 adrian Exp $
+ * $Id: comm.cc,v 1.341 2002/10/21 05:38:32 adrian Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -549,6 +549,20 @@ fdc_open(int fd, unsigned int type, char *desc)
 }
 
 
+/*
+ * synchronous wrapper around udp socket functions
+ */
+
+int
+comm_recvfrom(int fd, void *buf, size_t len, int flags,
+  struct sockaddr *from, socklen_t *fromlen)
+{
+       statCounter.syscalls.sock.recvfroms++;     
+       return recvfrom(fd, buf, len, flags, from, fromlen);
+}
+
+
+
 /* Older stuff */
 
 static void