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
0d1b4b50
Commit
0d1b4b50
authored
20 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Unbork windows whitespace
svn:r1949
parent
17b5b368
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/util.c
+5
-5
5 additions, 5 deletions
src/common/util.c
src/or/router.c
+2
-2
2 additions, 2 deletions
src/or/router.c
with
7 additions
and
7 deletions
src/common/util.c
+
5
−
5
View file @
0d1b4b50
...
...
@@ -1741,7 +1741,7 @@ void tor_mutex_free(tor_mutex_t *m) { }
struct
tor_mutex_t
{
HANDLE
handle
;
};
tor_mutex_t
*
tor_mutex_new
(
void
)
tor_mutex_t
*
tor_mutex_new
(
void
)
{
tor_mutex_t
*
m
;
m
=
tor_malloc_zero
(
sizeof
(
tor_mutex_t
));
...
...
@@ -1760,12 +1760,12 @@ void tor_mutex_acquire(tor_mutex_t *m)
r
=
WaitForSingleObject
(
m
->
handle
,
INFINITE
);
switch
(
r
)
{
case
WAIT_ABANDONED
:
/* holding thread exited. */
case
WAIT_OBJECT_0
:
/* we got the mutex normally. */
case
WAIT_OBJECT_0
:
/* we got the mutex normally. */
break
;
case
WAIT_TIMEOUT
:
/* Should never happen. */
tor_assert
(
0
);
tor_assert
(
0
);
break
;
case
WAIT_FAILED
:
case
WAIT_FAILED
:
log_fn
(
LOG_WARN
,
"Failed to acquire mutex: %d"
,
GetLastError
());
}
}
...
...
@@ -1774,7 +1774,7 @@ void tor_mutex_release(tor_mutex_t *m)
BOOL
r
;
r
=
ReleaseMutex
(
m
->
handle
);
if
(
!
r
)
{
log_fn
(
LOG_WARN
,
"Failed to release mutex: %d"
,
GetLastError
());
log_fn
(
LOG_WARN
,
"Failed to release mutex: %d"
,
GetLastError
());
}
}
...
...
This diff is collapsed.
Click to expand it.
src/or/router.c
+
2
−
2
View file @
0d1b4b50
...
...
@@ -59,7 +59,7 @@ void dup_onion_keys(crypto_pk_env_t **key, crypto_pk_env_t **last)
tor_mutex_acquire
(
key_lock
);
*
key
=
crypto_pk_dup_key
(
onionkey
);
if
(
lastonionkey
)
*
last
=
crypto_pk_dup_key
(
lastonionkey
);
*
last
=
crypto_pk_dup_key
(
lastonionkey
);
else
*
last
=
NULL
;
tor_mutex_release
(
key_lock
);
...
...
@@ -187,7 +187,7 @@ int init_keys(void) {
crypto_pk_env_t
*
prkey
;
if
(
!
key_lock
)
key_lock
=
tor_mutex_new
();
key_lock
=
tor_mutex_new
();
/* OP's don't need keys. Just initialize the TLS context.*/
if
(
!
options
.
ORPort
)
{
...
...
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