Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ced26a2c
Commit
ced26a2c
authored
Feb 16, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/tls: add () to protect macro arguments
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6e365198
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
tls.c
libavformat/tls.c
+14
-14
No files found.
libavformat/tls.c
View file @
ced26a2c
...
@@ -30,27 +30,27 @@
...
@@ -30,27 +30,27 @@
#if CONFIG_GNUTLS
#if CONFIG_GNUTLS
#include <gnutls/gnutls.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#include <gnutls/x509.h>
#define TLS_read(c, buf, size) gnutls_record_recv(
c->session, buf, size
)
#define TLS_read(c, buf, size) gnutls_record_recv(
(c)->session, (buf), (size)
)
#define TLS_write(c, buf, size) gnutls_record_send(
c->session, buf, size
)
#define TLS_write(c, buf, size) gnutls_record_send(
(c)->session, (buf), (size)
)
#define TLS_shutdown(c) gnutls_bye(
c
->session, GNUTLS_SHUT_RDWR)
#define TLS_shutdown(c) gnutls_bye(
(c)
->session, GNUTLS_SHUT_RDWR)
#define TLS_free(c) do { \
#define TLS_free(c) do { \
if (
c
->session) \
if (
(c)
->session) \
gnutls_deinit(
c
->session); \
gnutls_deinit(
(c)
->session); \
if (
c
->cred) \
if (
(c)
->cred) \
gnutls_certificate_free_credentials(
c
->cred); \
gnutls_certificate_free_credentials(
(c)
->cred); \
} while (0)
} while (0)
#elif CONFIG_OPENSSL
#elif CONFIG_OPENSSL
#include <openssl/bio.h>
#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/err.h>
#define TLS_read(c, buf, size) SSL_read(
c->ssl, buf, size
)
#define TLS_read(c, buf, size) SSL_read(
(c)->ssl, (buf), (size)
)
#define TLS_write(c, buf, size) SSL_write(
c->ssl, buf, size
)
#define TLS_write(c, buf, size) SSL_write(
(c)->ssl, (buf), (size)
)
#define TLS_shutdown(c) SSL_shutdown(
c
->ssl)
#define TLS_shutdown(c) SSL_shutdown(
(c)
->ssl)
#define TLS_free(c) do { \
#define TLS_free(c) do { \
if (
c
->ssl) \
if (
(c)
->ssl) \
SSL_free(
c
->ssl); \
SSL_free(
(c)
->ssl); \
if (
c
->ctx) \
if (
(c)
->ctx) \
SSL_CTX_free(
c
->ctx); \
SSL_CTX_free(
(c)
->ctx); \
} while (0)
} while (0)
#endif
#endif
#if HAVE_POLL_H
#if HAVE_POLL_H
...
...
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