aboutsummaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-05 07:42:33 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-11-05 07:42:33 +0000
commite8c1720d8476aa310bf470d023e59f3d5e14a84a (patch)
tree3c82f6ae7e5f9238a7788e80d4271d55d3cbe581 /socket.c
parentAllow blank passwords to be passed via the management interface. (diff)
downloadopenvpn-e8c1720d8476aa310bf470d023e59f3d5e14a84a.tar.xz
svn merge -r 771:780 $SO/trunk/openvpn
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@781 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 012158c..b7a25ca 100644
--- a/socket.c
+++ b/socket.c
@@ -587,6 +587,15 @@ socket_do_accept (socket_descriptor_t sd,
new_sd = accept (sd, (struct sockaddr *) &act->dest.sa, &remote_len);
}
+#if 0 /* For debugging only, test the effect of accept() failures */
+ {
+ static int foo = 0;
+ ++foo;
+ if (foo & 1)
+ new_sd = -1;
+ }
+#endif
+
if (!socket_defined (new_sd))
{
msg (D_LINK_ERRORS | M_ERRNO_SOCK, "TCP: accept(%d) failed", sd);