Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
28fb3417
Commit
28fb3417
authored
Dec 18, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: use vlc_tls_Close()
parent
8fa6f55c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
24 deletions
+6
-24
modules/access/http/connmgr.c
modules/access/http/connmgr.c
+2
-2
modules/access/http/h1conn.c
modules/access/http/h1conn.c
+3
-3
modules/access/http/h2conn.c
modules/access/http/h2conn.c
+1
-1
modules/access/http/transport.c
modules/access/http/transport.c
+0
-16
modules/access/http/transport.h
modules/access/http/transport.h
+0
-2
No files found.
modules/access/http/connmgr.c
View file @
28fb3417
...
@@ -170,7 +170,7 @@ struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
...
@@ -170,7 +170,7 @@ struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
if
(
likely
(
conn2
!=
NULL
))
if
(
likely
(
conn2
!=
NULL
))
mgr
->
conn2
=
conn2
;
mgr
->
conn2
=
conn2
;
else
else
vlc_
https_disconnect
(
tls
);
vlc_
tls_Close
(
tls
);
}
}
else
/* TODO: HTTP/1.x support */
else
/* TODO: HTTP/1.x support */
{
{
...
@@ -178,7 +178,7 @@ struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
...
@@ -178,7 +178,7 @@ struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
if
(
likely
(
conn1
!=
NULL
))
if
(
likely
(
conn1
!=
NULL
))
mgr
->
conn1
=
conn1
;
mgr
->
conn1
=
conn1
;
else
else
vlc_
https_disconnect
(
tls
);
vlc_
tls_Close
(
tls
);
}
}
return
vlc_https_request_reuse
(
mgr
,
host
,
port
,
req
);
return
vlc_https_request_reuse
(
mgr
,
host
,
port
,
req
);
...
...
modules/access/http/h1conn.c
View file @
28fb3417
...
@@ -124,7 +124,7 @@ static void vlc_h1_conn_destroy(struct vlc_h1_conn *conn);
...
@@ -124,7 +124,7 @@ static void vlc_h1_conn_destroy(struct vlc_h1_conn *conn);
static
void
*
vlc_h1_stream_fatal
(
struct
vlc_h1_conn
*
conn
)
static
void
*
vlc_h1_stream_fatal
(
struct
vlc_h1_conn
*
conn
)
{
{
msg_Dbg
(
CO
(
conn
),
"connection failed"
);
msg_Dbg
(
CO
(
conn
),
"connection failed"
);
vlc_
https_disconnect
(
conn
->
tls
);
vlc_
tls_Close
(
conn
->
tls
);
conn
->
tls
=
NULL
;
conn
->
tls
=
NULL
;
return
NULL
;
return
NULL
;
}
}
...
@@ -242,7 +242,7 @@ static void vlc_h1_stream_close(struct vlc_http_stream *stream, bool abort)
...
@@ -242,7 +242,7 @@ static void vlc_h1_stream_close(struct vlc_http_stream *stream, bool abort)
if
(
abort
)
if
(
abort
)
{
{
vlc_
https_disconnect
(
conn
->
tls
);
vlc_
tls_Close
(
conn
->
tls
);
conn
->
tls
=
NULL
;
conn
->
tls
=
NULL
;
}
}
...
@@ -277,7 +277,7 @@ static void vlc_h1_conn_destroy(struct vlc_h1_conn *conn)
...
@@ -277,7 +277,7 @@ static void vlc_h1_conn_destroy(struct vlc_h1_conn *conn)
assert
(
conn
->
released
);
assert
(
conn
->
released
);
if
(
conn
->
tls
!=
NULL
)
if
(
conn
->
tls
!=
NULL
)
vlc_
https_disconnect
(
conn
->
tls
);
vlc_
tls_Close
(
conn
->
tls
);
free
(
conn
);
free
(
conn
);
}
}
...
...
modules/access/http/h2conn.c
View file @
28fb3417
...
@@ -686,7 +686,7 @@ static void vlc_h2_conn_destroy(struct vlc_h2_conn *conn)
...
@@ -686,7 +686,7 @@ static void vlc_h2_conn_destroy(struct vlc_h2_conn *conn)
vlc_mutex_destroy
(
&
conn
->
lock
);
vlc_mutex_destroy
(
&
conn
->
lock
);
vlc_h2_output_destroy
(
conn
->
out
);
vlc_h2_output_destroy
(
conn
->
out
);
vlc_
https_disconnect
(
conn
->
tls
);
vlc_
tls_Close
(
conn
->
tls
);
free
(
conn
);
free
(
conn
);
}
}
...
...
modules/access/http/transport.c
View file @
28fb3417
...
@@ -131,19 +131,3 @@ vlc_tls_t *vlc_https_connect(vlc_tls_creds_t *creds, const char *name,
...
@@ -131,19 +131,3 @@ vlc_tls_t *vlc_https_connect(vlc_tls_creds_t *creds, const char *name,
free
(
alp
);
free
(
alp
);
return
tls
;
return
tls
;
}
}
void
vlc_http_disconnect
(
int
fd
)
{
shutdown
(
fd
,
SHUT_RDWR
);
net_Close
(
fd
);
}
void
vlc_https_disconnect
(
vlc_tls_t
*
tls
)
{
int
canc
=
vlc_savecancel
();
int
fd
=
tls
->
fd
;
vlc_tls_SessionDelete
(
tls
);
vlc_http_disconnect
(
fd
);
vlc_restorecancel
(
canc
);
}
modules/access/http/transport.h
View file @
28fb3417
...
@@ -30,7 +30,5 @@ struct vlc_tls_creds;
...
@@ -30,7 +30,5 @@ struct vlc_tls_creds;
struct
vlc_tls
*
vlc_https_connect
(
struct
vlc_tls_creds
*
creds
,
struct
vlc_tls
*
vlc_https_connect
(
struct
vlc_tls_creds
*
creds
,
const
char
*
name
,
unsigned
port
,
const
char
*
name
,
unsigned
port
,
bool
*
restrict
two
);
bool
*
restrict
two
);
void
vlc_http_disconnect
(
int
fd
);
void
vlc_https_disconnect
(
struct
vlc_tls
*
tls
);
#endif
#endif
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