diff options
author | rh <rh> | 1999-02-23 18:20:59 +0000 |
---|---|---|
committer | rh <rh> | 1999-02-23 18:20:59 +0000 |
commit | f50b36adfbe4e34e48bd1761a17548a9cc0a90c4 (patch) | |
tree | fa8377b770399ce94a13a9466f2e4c94fa2fa91b /net/delegate/patches | |
parent | b414adbdc4f6e129d6e142503a953068e12a3ca7 (diff) | |
download | pkgsrc-f50b36adfbe4e34e48bd1761a17548a9cc0a90c4.tar.gz |
A general purpose TCP/IP proxy system.
Diffstat (limited to 'net/delegate/patches')
-rw-r--r-- | net/delegate/patches/patch-aa | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/net/delegate/patches/patch-aa b/net/delegate/patches/patch-aa new file mode 100644 index 00000000000..7232ff8e789 --- /dev/null +++ b/net/delegate/patches/patch-aa @@ -0,0 +1,47 @@ +--- src/lock.c.orig Tue Aug 4 09:13:18 1998 ++++ src/lock.c Thu Nov 19 18:17:09 1998 +@@ -18,6 +18,7 @@ + History: + 970403 extracted from cache.c + //////////////////////////////////////////////////////////////////////#*/ ++#include <errno.h> + #include <stdio.h> + #include <sys/types.h> + extern double Time(); +@@ -112,6 +113,22 @@ + rcode = 0; + break; + } ++#ifdef EWOULDBLOCK ++ /* ++ * Only retry the lock if it was busy. Other ++ * possible sources for the lock to fail are: ++ * invalid argument, bad filedescriptor, and ++ * operation not supported by device. The latter ++ * happens if you start DeleGateD with -v, so it ++ * logs to stderr (which usually doesn't support ++ * locking at all). ++ */ ++ if (rcode == -1 && errno != EWOULDBLOCK) { ++ /* pretend lock succeeded */ ++ rcode = 0; ++ break; ++ } ++#endif + remain = timeout - elapsed; + if( remain <= 0 ) + break; +@@ -122,6 +139,13 @@ + + start = Time(); + rcode = callFuncTimeout(remain/1000,-1,func,fd); ++#ifdef EWOULDBLOCK ++ if (rcode == -1 && errno != EWOULDBLOCK) { ++ /* pretend lock succeeded */ ++ rcode = 0; ++ break; ++ } ++#endif + elapse1 = (Time() - start) * 1000; + /*{ + static int n; |