From ce767c23a10185c9af7aa5444d58769502f5b163 Mon Sep 17 00:00:00 2001 From: adrian <> Date: Mon, 21 Oct 2002 11:38:32 +0000 Subject: [PATCH] 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. --- src/comm.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- 2.47.2