Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
libremedia
Tethys
FFmpeg
Commits
371d15ec
Commit
371d15ec
authored
13 years ago
by
Martin Storsjö
Browse files
Options
Downloads
Patches
Plain Diff
tls: Use the URLContext as logging context
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
c9e5ac33
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
libavformat/tls.c
+5
-5
5 additions, 5 deletions
libavformat/tls.c
with
5 additions
and
5 deletions
libavformat/tls.c
+
5
−
5
View file @
371d15ec
...
@@ -73,7 +73,7 @@ static int do_tls_poll(URLContext *h, int ret)
...
@@ -73,7 +73,7 @@ static int do_tls_poll(URLContext *h, int ret)
struct
pollfd
p
=
{
c
->
fd
,
0
,
0
};
struct
pollfd
p
=
{
c
->
fd
,
0
,
0
};
#if CONFIG_GNUTLS
#if CONFIG_GNUTLS
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
if
(
ret
!=
GNUTLS_E_AGAIN
&&
ret
!=
GNUTLS_E_INTERRUPTED
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"%s
\n
"
,
gnutls_strerror
(
ret
));
av_log
(
h
,
AV_LOG_ERROR
,
"%s
\n
"
,
gnutls_strerror
(
ret
));
return
AVERROR
(
EIO
);
return
AVERROR
(
EIO
);
}
}
if
(
gnutls_record_get_direction
(
c
->
session
))
if
(
gnutls_record_get_direction
(
c
->
session
))
...
@@ -87,7 +87,7 @@ static int do_tls_poll(URLContext *h, int ret)
...
@@ -87,7 +87,7 @@ static int do_tls_poll(URLContext *h, int ret)
}
else
if
(
ret
==
SSL_ERROR_WANT_WRITE
)
{
}
else
if
(
ret
==
SSL_ERROR_WANT_WRITE
)
{
p
.
events
=
POLLOUT
;
p
.
events
=
POLLOUT
;
}
else
{
}
else
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
av_log
(
h
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
return
AVERROR
(
EIO
);
return
AVERROR
(
EIO
);
}
}
#endif
#endif
...
@@ -148,13 +148,13 @@ static int tls_open(URLContext *h, const char *uri, int flags)
...
@@ -148,13 +148,13 @@ static int tls_open(URLContext *h, const char *uri, int flags)
#elif CONFIG_OPENSSL
#elif CONFIG_OPENSSL
c
->
ctx
=
SSL_CTX_new
(
SSLv3_client_method
());
c
->
ctx
=
SSL_CTX_new
(
SSLv3_client_method
());
if
(
!
c
->
ctx
)
{
if
(
!
c
->
ctx
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
av_log
(
h
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
ret
=
AVERROR
(
EIO
);
ret
=
AVERROR
(
EIO
);
goto
fail
;
goto
fail
;
}
}
c
->
ssl
=
SSL_new
(
c
->
ctx
);
c
->
ssl
=
SSL_new
(
c
->
ctx
);
if
(
!
c
->
ssl
)
{
if
(
!
c
->
ssl
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
av_log
(
h
,
AV_LOG_ERROR
,
"%s
\n
"
,
ERR_error_string
(
ERR_get_error
(),
NULL
));
ret
=
AVERROR
(
EIO
);
ret
=
AVERROR
(
EIO
);
goto
fail
;
goto
fail
;
}
}
...
@@ -166,7 +166,7 @@ static int tls_open(URLContext *h, const char *uri, int flags)
...
@@ -166,7 +166,7 @@ static int tls_open(URLContext *h, const char *uri, int flags)
if
(
ret
>
0
)
if
(
ret
>
0
)
break
;
break
;
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unable to negotiate TLS/SSL session
\n
"
);
av_log
(
h
,
AV_LOG_ERROR
,
"Unable to negotiate TLS/SSL session
\n
"
);
ret
=
AVERROR
(
EIO
);
ret
=
AVERROR
(
EIO
);
goto
fail
;
goto
fail
;
}
}
...
...
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