Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
31636e68
Commit
31636e68
authored
Oct 14, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Even more strange error returns on Solaris
parent
bebf42d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
vtcp.h
include/vtcp.h
+16
-8
No files found.
include/vtcp.h
View file @
31636e68
...
@@ -33,16 +33,24 @@
...
@@ -33,16 +33,24 @@
#define VTCP_ADDRBUFSIZE 64
#define VTCP_ADDRBUFSIZE 64
#define VTCP_PORTBUFSIZE 16
#define VTCP_PORTBUFSIZE 16
static
inline
int
VTCP_Check
(
int
a
)
{
if
(
a
==
0
)
return
(
1
);
if
(
errno
==
ECONNRESET
||
errno
==
ENOTCONN
)
return
(
1
);
#if (defined (__SVR4) && defined (__sun)) || defined (__NetBSD__)
#if (defined (__SVR4) && defined (__sun)) || defined (__NetBSD__)
/*
/*
* Solaris returns EINVAL if the other end unexepectedly reset the
* Solaris returns EINVAL if the other end unexepectedly reset the
* connection. This is a bug in Solaris and documented behaviour on NetBSD.
* connection.
*/
* This is a bug in Solaris and documented behaviour on NetBSD.
#define VTCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN \
*/
|| errno == EINVAL)
if
(
errno
==
EINVAL
||
errno
==
ETIMEDOUT
)
#else
return
(
1
);
#define VTCP_Check(a) ((a) == 0 || errno == ECONNRESET || errno == ENOTCONN)
#endif
#endif
return
(
0
);
}
#define VTCP_Assert(a) assert(VTCP_Check(a))
#define VTCP_Assert(a) assert(VTCP_Check(a))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment