Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b0f45973
Commit
b0f45973
authored
May 17, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix initialization
parent
04d05b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
libs/srtp/Makefile.am
libs/srtp/Makefile.am
+14
-0
libs/srtp/srtp.c
libs/srtp/srtp.c
+11
-8
No files found.
libs/srtp/Makefile.am
View file @
b0f45973
...
...
@@ -36,3 +36,17 @@ test_aes_SOURCES = test-aes.c
srtp_SOURCES
=
recv.c
srtp_LDADD
=
libvlc_srtp.la
lcov-run
:
rm
-f
*
.gcda lcov
$(MAKE)
$(AM_MAKEFLAGS)
check
lcov-pre.out
:
lcov
-c
-d
.
-o
lcov.tmp
lcov.out
:
lcov-pre.out
lcov
-r
lcov.tmp
'*test*'
>
lcov.out
lcov
:
lcov.out
genhtml lcov.out
-o
lcov
.PHONY
:
lcov-run
libs/srtp/srtp.c
View file @
b0f45973
...
...
@@ -90,13 +90,13 @@ static bool libgcrypt_usable = false;
static
void
initonce_libgcrypt
(
void
)
{
if
((
gcry_check_version
(
"1.1.94"
)
==
NULL
)
||
gcry_control
(
GCRYCTL_DISABLE_SECMEM
,
0
)
||
gcry_control
(
GCRYCTL_INITIALIZATION_FINISHED
,
0
)
#ifndef WIN32
||
gcry_control
(
GCRYCTL_SET_THREAD_CBS
,
&
gcry_threads_pthread
)
gcry_control
(
GCRYCTL_SET_THREAD_CBS
,
&
gcry_threads_pthread
);
#endif
)
if
((
gcry_check_version
(
"1.1.94"
)
==
NULL
)
||
gcry_control
(
GCRYCTL_DISABLE_SECMEM
,
0
)
||
gcry_control
(
GCRYCTL_INITIALIZATION_FINISHED
,
0
))
return
;
libgcrypt_usable
=
true
;
...
...
@@ -111,13 +111,16 @@ static int init_libgcrypt (void)
pthread_mutex_lock
(
&
mutex
);
pthread_once
(
&
once
,
initonce_libgcrypt
);
retval
=
-
libgcrypt_usable
;
pthread_mutex_unlock
(
&
mutex
);
#else
# warning FIXME: This is not thread-safe.
if
(
!
libgcrypt_usable
)
initonce_libgcrypt
();
retval
=
-
libgcrypt_usable
;
#endif
retval
=
libgcrypt_usable
?
0
:
-
1
;
#ifndef WIN32
pthread_mutex_unlock
(
&
mutex
);
#endif
return
retval
;
...
...
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