Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
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
The Tor Project
Core
Tor
Commits
f608b85d
Commit
f608b85d
authored
21 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Replace all connection_removes outsice of main.c with connection_mark_for_close
svn:r1328
parent
b7c2b18b
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
doc/TODO
+1
-1
1 addition, 1 deletion
doc/TODO
src/or/connection_or.c
+2
-6
2 additions, 6 deletions
src/or/connection_or.c
src/or/directory.c
+2
-4
2 additions, 4 deletions
src/or/directory.c
with
5 additions
and
11 deletions
doc/TODO
+
1
−
1
View file @
f608b85d
...
...
@@ -83,7 +83,7 @@ Short-term:
X remove per-connection rate limiting
- Make it harder to circumvent bandwidth caps: look at number of bytes
sent across sockets, not number sent inside TLS stream.
-
Audit users of connnection_remove and connection_free outside of
o
Audit users of connnection_remove and connection_free outside of
main.c; many should use mark_for_close instead.
On-going
...
...
This diff is collapsed.
Click to expand it.
src/or/connection_or.c
+
2
−
6
View file @
f608b85d
...
...
@@ -112,8 +112,6 @@ connection_t *connection_or_connect(routerinfo_t *router) {
/* set up conn so it's got all the data we need to remember */
connection_or_init_conn_from_router
(
conn
,
router
);
/* XXXX Should all this stuff do mark-for-close instead? */
if
(
connection_add
(
conn
)
<
0
)
{
/* no space, forget it */
connection_free
(
conn
);
return
NULL
;
...
...
@@ -121,8 +119,7 @@ connection_t *connection_or_connect(routerinfo_t *router) {
switch
(
connection_connect
(
conn
,
router
->
address
,
router
->
addr
,
router
->
or_port
))
{
case
-
1
:
connection_remove
(
conn
);
connection_free
(
conn
);
connection_mark_for_close
(
conn
,
0
);
return
NULL
;
case
0
:
connection_set_poll_socket
(
conn
);
...
...
@@ -140,8 +137,7 @@ connection_t *connection_or_connect(routerinfo_t *router) {
return
conn
;
/* failure */
connection_remove
(
conn
);
connection_free
(
conn
);
connection_mark_for_close
(
conn
,
0
);
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
src/or/directory.c
+
2
−
4
View file @
f608b85d
...
...
@@ -48,8 +48,7 @@ void directory_initiate_command(routerinfo_t *router, int command) {
switch
(
connection_connect
(
conn
,
router
->
address
,
router
->
addr
,
router
->
dir_port
))
{
case
-
1
:
router_mark_as_down
(
conn
->
nickname
);
/* don't try him again */
connection_remove
(
conn
);
connection_free
(
conn
);
connection_mark_for_close
(
conn
,
0
);
return
;
case
0
:
connection_set_poll_socket
(
conn
);
...
...
@@ -63,8 +62,7 @@ void directory_initiate_command(routerinfo_t *router, int command) {
connection_set_poll_socket
(
conn
);
if
(
directory_send_command
(
conn
,
command
)
<
0
)
{
connection_remove
(
conn
);
connection_free
(
conn
);
connection_mark_for_close
(
conn
,
0
);
}
}
...
...
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