[vlc-commits] http: simplify vlc_http_auth cleanup
Rémi Denis-Courmont
git at videolan.org
Tue Feb 2 21:47:18 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 2 22:45:42 2016 +0200| [64460798fafbb02cbf7da8b44f628e722d4b2c03] | committer: Rémi Denis-Courmont
http: simplify vlc_http_auth cleanup
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64460798fafbb02cbf7da8b44f628e722d4b2c03
---
include/vlc_http.h | 2 +-
modules/access/http.c | 4 ++--
src/libvlccore.sym | 2 +-
src/network/http_auth.c | 22 ++++++++++------------
4 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/include/vlc_http.h b/include/vlc_http.h
index ff332cf..6065e7c 100644
--- a/include/vlc_http.h
+++ b/include/vlc_http.h
@@ -53,7 +53,7 @@ typedef struct vlc_http_auth_t
VLC_API void vlc_http_auth_Init( vlc_http_auth_t * );
-VLC_API void vlc_http_auth_Reset( vlc_http_auth_t * );
+VLC_API void vlc_http_auth_Deinit( vlc_http_auth_t * );
VLC_API void vlc_http_auth_ParseWwwAuthenticateHeader
( vlc_object_t *, vlc_http_auth_t * , const char * );
VLC_API int vlc_http_auth_ParseAuthenticationInfoHeader
diff --git a/modules/access/http.c b/modules/access/http.c
index 5646d52..4e3beb6 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -470,10 +470,10 @@ static void Close( vlc_object_t *p_this )
access_sys_t *p_sys = p_access->p_sys;
vlc_UrlClean( &p_sys->url );
- vlc_http_auth_Reset( &p_sys->auth );
+ vlc_http_auth_Deinit( &p_sys->auth );
if( p_sys->b_proxy )
vlc_UrlClean( &p_sys->proxy );
- vlc_http_auth_Reset( &p_sys->proxy_auth );
+ vlc_http_auth_Deinit( &p_sys->proxy_auth );
free( p_sys->psz_mime );
free( p_sys->psz_location );
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 5ee84e3..64469d3 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -135,7 +135,7 @@ GetLang_1
GetLang_2B
GetLang_2T
vlc_http_auth_Init
-vlc_http_auth_Reset
+vlc_http_auth_Deinit
vlc_http_auth_ParseWwwAuthenticateHeader
vlc_http_auth_ParseAuthenticationInfoHeader
vlc_http_auth_FormatAuthorizationHeader
diff --git a/src/network/http_auth.c b/src/network/http_auth.c
index b46538b..56b2cdb 100644
--- a/src/network/http_auth.c
+++ b/src/network/http_auth.c
@@ -491,17 +491,15 @@ void vlc_http_auth_Init( vlc_http_auth_t *p_auth )
memset( p_auth, 0, sizeof( *p_auth ) );
}
-void vlc_http_auth_Reset( vlc_http_auth_t *p_auth )
+void vlc_http_auth_Deinit( vlc_http_auth_t *p_auth )
{
- p_auth->i_nonce = 0;
-
- FREENULL( p_auth->psz_realm );
- FREENULL( p_auth->psz_domain );
- FREENULL( p_auth->psz_nonce );
- FREENULL( p_auth->psz_opaque );
- FREENULL( p_auth->psz_stale );
- FREENULL( p_auth->psz_algorithm );
- FREENULL( p_auth->psz_qop );
- FREENULL( p_auth->psz_cnonce );
- FREENULL( p_auth->psz_HA1 );
+ free( p_auth->psz_realm );
+ free( p_auth->psz_domain );
+ free( p_auth->psz_nonce );
+ free( p_auth->psz_opaque );
+ free( p_auth->psz_stale );
+ free( p_auth->psz_algorithm );
+ free( p_auth->psz_qop );
+ free( p_auth->psz_cnonce );
+ free( p_auth->psz_HA1 );
}
More information about the vlc-commits
mailing list