Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
e9b33ed1
Commit
e9b33ed1
authored
12 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rc
parent
d13389b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changes/bug6296
+4
-0
4 additions, 0 deletions
changes/bug6296
src/common/compat.h
+3
-0
3 additions, 0 deletions
src/common/compat.h
src/or/connection.c
+2
-2
2 additions, 2 deletions
src/or/connection.c
with
9 additions
and
2 deletions
changes/bug6296
0 → 100644
+
4
−
0
View file @
e9b33ed1
o Minor bugfixes:
- Instead of ENOBUFS on Windows, say WSAENOBUFS. Fixes
compilation on Windows. Fixes bug 6296; bugfix on 0.2.3.18-rc.
This diff is collapsed.
Click to expand it.
src/common/compat.h
+
3
−
0
View file @
e9b33ed1
...
...
@@ -500,6 +500,8 @@ int network_init(void);
* the actual errno after a socket operation fails.
*/
#if defined(_WIN32)
/** Expands to WSA<b>e</b> on Windows, and to <b>e</b> elsewhere. */
#define SOCK_ERRNO(e) WSA##e
/** Return true if e is EAGAIN or the local equivalent. */
#define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN || (e) == WSAEWOULDBLOCK)
/** Return true if e is EINPROGRESS or the local equivalent. */
...
...
@@ -520,6 +522,7 @@ int network_init(void);
int
tor_socket_errno
(
tor_socket_t
sock
);
const
char
*
tor_socket_strerror
(
int
e
);
#else
#define SOCK_ERRNO(e) e
#define ERRNO_IS_EAGAIN(e) ((e) == EAGAIN)
#define ERRNO_IS_EINPROGRESS(e) ((e) == EINPROGRESS)
#define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == EINPROGRESS)
...
...
This diff is collapsed.
Click to expand it.
src/or/connection.c
+
2
−
2
View file @
e9b33ed1
...
...
@@ -1336,7 +1336,7 @@ connection_connect(connection_t *conn, const char *address,
if
(
get_n_open_sockets
()
>=
get_options
()
->
_ConnLimit
-
1
)
{
warn_too_many_conns
();
*
socket_error
=
ENOBUFS
;
*
socket_error
=
SOCK_ERRNO
(
ENOBUFS
)
;
return
-
1
;
}
...
...
@@ -1431,7 +1431,7 @@ connection_connect(connection_t *conn, const char *address,
conn
->
s
=
s
;
if
(
connection_add_connecting
(
conn
)
<
0
)
{
/* no space, forget it */
*
socket_error
=
ENOBUFS
;
*
socket_error
=
SOCK_ERRNO
(
ENOBUFS
)
;
return
-
1
;
}
return
inprogress
?
0
:
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment