summaryrefslogtreecommitdiffstats
path: root/src/openvpn/proxy.c
diff options
context:
space:
mode:
authorHeiko Hund <heiko.hund@sophos.com>2012-07-17 18:25:16 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-07-19 21:20:39 +0200
commit910675de28956cf8d028aed727486b64747362fb (patch)
treec42b15a45e8056baea13ea6d5bb3d3b08a63292e /src/openvpn/proxy.c
parent9081e0ad4c496a0334a21fc4e8e4f1f73a470b5a (diff)
downloadopenvpn-910675de28956cf8d028aed727486b64747362fb.tar.gz
openvpn-910675de28956cf8d028aed727486b64747362fb.tar.xz
openvpn-910675de28956cf8d028aed727486b64747362fb.zip
don't treat socket related errors special anymore
WSAGetLastError() is just a wrapper for GetLastError(). So, there's no need to differentiate between socket related and other errors. This patch removes all special handling of socket errors in favor of simplifying the codebase somewhat. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1342542316-32563-1-git-send-email-heiko.hund@sophos.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6876 Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'src/openvpn/proxy.c')
-rw-r--r--src/openvpn/proxy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openvpn/proxy.c b/src/openvpn/proxy.c
index d33f88f..200ca44 100644
--- a/src/openvpn/proxy.c
+++ b/src/openvpn/proxy.c
@@ -93,7 +93,7 @@ recv_line (socket_descriptor_t sd,
if (status == 0)
{
if (verbose)
- msg (D_LINK_ERRORS | M_ERRNO_SOCK, "recv_line: TCP port read timeout expired");
+ msg (D_LINK_ERRORS | M_ERRNO, "recv_line: TCP port read timeout expired");
goto error;
}
@@ -101,7 +101,7 @@ recv_line (socket_descriptor_t sd,
if (status < 0)
{
if (verbose)
- msg (D_LINK_ERRORS | M_ERRNO_SOCK, "recv_line: TCP port read failed on select()");
+ msg (D_LINK_ERRORS | M_ERRNO, "recv_line: TCP port read failed on select()");
goto error;
}
@@ -112,7 +112,7 @@ recv_line (socket_descriptor_t sd,
if (size != 1)
{
if (verbose)
- msg (D_LINK_ERRORS | M_ERRNO_SOCK, "recv_line: TCP port read failed on recv()");
+ msg (D_LINK_ERRORS | M_ERRNO, "recv_line: TCP port read failed on recv()");
goto error;
}
@@ -137,7 +137,7 @@ recv_line (socket_descriptor_t sd,
if (!isprint(c) && !isspace(c)) /* not ascii? */
{
if (verbose)
- msg (D_LINK_ERRORS | M_ERRNO_SOCK, "recv_line: Non-ASCII character (%d) read on recv()", (int)c);
+ msg (D_LINK_ERRORS | M_ERRNO, "recv_line: Non-ASCII character (%d) read on recv()", (int)c);
*lookahead = la;
return false;
}
@@ -167,7 +167,7 @@ send_line (socket_descriptor_t sd,
const ssize_t size = send (sd, buf, strlen (buf), MSG_NOSIGNAL);
if (size != (ssize_t) strlen (buf))
{
- msg (D_LINK_ERRORS | M_ERRNO_SOCK, "send_line: TCP port write failed on send()");
+ msg (D_LINK_ERRORS | M_ERRNO, "send_line: TCP port write failed on send()");
return false;
}
return true;