From: adrian <> Date: Mon, 21 Oct 2002 11:38:32 +0000 (+0000) Subject: Add in a recvfrom() wrapper - its still non-callback, but it means I can X-Git-Tag: SQUID_3_0_PRE1~613 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce767c23a10185c9af7aa5444d58769502f5b163;p=thirdparty%2Fsquid.git Add in a recvfrom() wrapper - its still non-callback, but it means I can tidy things up and remove the direct socket calls from other places. --- diff --git a/src/comm.cc b/src/comm.cc index d78abc8c50..c988b99007 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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