Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
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
debian
tor
Commits
a73b0da6
Commit
a73b0da6
authored
11 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/maint-0.2.4'
parents
a0577aac
7f6aa780
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/or/channeltls.c
+26
-0
26 additions, 0 deletions
src/or/channeltls.c
with
26 additions
and
0 deletions
src/or/channeltls.c
+
26
−
0
View file @
a73b0da6
...
...
@@ -53,6 +53,7 @@ static void channel_tls_common_init(channel_tls_t *tlschan);
static
void
channel_tls_close_method
(
channel_t
*
chan
);
static
const
char
*
channel_tls_describe_transport_method
(
channel_t
*
chan
);
static
void
channel_tls_free_method
(
channel_t
*
chan
);
static
int
channel_tls_get_remote_addr_method
(
channel_t
*
chan
,
tor_addr_t
*
addr_out
);
static
int
...
...
@@ -114,6 +115,7 @@ channel_tls_common_init(channel_tls_t *tlschan)
chan
->
state
=
CHANNEL_STATE_OPENING
;
chan
->
close
=
channel_tls_close_method
;
chan
->
describe_transport
=
channel_tls_describe_transport_method
;
chan
->
free
=
channel_tls_free_method
;
chan
->
get_remote_addr
=
channel_tls_get_remote_addr_method
;
chan
->
get_remote_descr
=
channel_tls_get_remote_descr_method
;
chan
->
get_transport_name
=
channel_tls_get_transport_name_method
;
...
...
@@ -386,6 +388,30 @@ channel_tls_describe_transport_method(channel_t *chan)
return
rv
;
}
/**
* Free a channel_tls_t
*
* This is called by the generic channel layer when freeing a channel_tls_t;
* this happens either on a channel which has already reached
* CHANNEL_STATE_CLOSED or CHANNEL_STATE_ERROR from channel_run_cleanup() or
* on shutdown from channel_free_all(). In the latter case we might still
* have an orconn active (which connection_free_all() will get to later),
* so we should null out its channel pointer now.
*/
static
void
channel_tls_free_method
(
channel_t
*
chan
)
{
channel_tls_t
*
tlschan
=
BASE_CHAN_TO_TLS
(
chan
);
tor_assert
(
tlschan
);
if
(
tlschan
->
conn
)
{
tlschan
->
conn
->
chan
=
NULL
;
tlschan
->
conn
=
NULL
;
}
}
/**
* Get the remote address of a channel_tls_t
*
...
...
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