[vlc-commits] Rename and remove unused ACL parameter of httpd_UrlNewUnique()
Rémi Denis-Courmont
git at videolan.org
Sun Apr 1 21:14:21 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 1 22:13:54 2012 +0300| [339ef8e2d3af31a881dca86e023d1451d33f510b] | committer: Rémi Denis-Courmont
Rename and remove unused ACL parameter of httpd_UrlNewUnique()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=339ef8e2d3af31a881dca86e023d1451d33f510b
---
include/vlc_httpd.h | 2 +-
modules/misc/rtsp.c | 6 ++----
modules/stream_out/rtsp.c | 5 ++---
src/libvlccore.sym | 2 +-
src/missing.c | 7 +++----
src/network/httpd.c | 32 +++++++++++++++++---------------
6 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/include/vlc_httpd.h b/include/vlc_httpd.h
index f689bdb..e851481 100644
--- a/include/vlc_httpd.h
+++ b/include/vlc_httpd.h
@@ -101,7 +101,7 @@ VLC_API httpd_host_t *vlc_rtsp_HostNew( vlc_object_t * ) VLC_USED;
VLC_API void httpd_HostDelete( httpd_host_t * );
/* register a new url */
-VLC_API httpd_url_t * httpd_UrlNewUnique( httpd_host_t *, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl ) VLC_USED;
+VLC_API httpd_url_t * httpd_UrlNew( httpd_host_t *, const char *psz_url, const char *psz_user, const char *psz_password ) VLC_USED;
/* register callback on a url */
VLC_API int httpd_UrlCatch( httpd_url_t *, int i_msg, httpd_callback_t, httpd_callback_sys_t * );
/* delete a url */
diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index d7eaf13..8829c0a 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -372,8 +372,7 @@ static vod_media_t *MediaNew( vod_t *p_vod, const char *psz_name,
p_sys->psz_path, psz_name ) <0 )
return NULL;
p_media->p_rtsp_url =
- httpd_UrlNewUnique( p_sys->p_rtsp_host, p_media->psz_rtsp_path, NULL,
- NULL, NULL );
+ httpd_UrlNew( p_sys->p_rtsp_host, p_media->psz_rtsp_path, NULL, NULL );
if( !p_media->p_rtsp_url )
{
@@ -678,8 +677,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
}
p_es->p_rtsp_url =
- httpd_UrlNewUnique( p_vod->p_sys->p_rtsp_host, psz_urlc, NULL, NULL,
- NULL );
+ httpd_UrlNew( p_vod->p_sys->p_rtsp_host, psz_urlc, NULL, NULL );
if( !p_es->p_rtsp_url )
{
diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index 2f9569a..a49bd8a 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -125,8 +125,7 @@ rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
char *user = var_InheritString(owner, "sout-rtsp-user");
char *pwd = var_InheritString(owner, "sout-rtsp-pwd");
- rtsp->url = httpd_UrlNewUnique( rtsp->host, rtsp->psz_path,
- user, pwd, NULL );
+ rtsp->url = httpd_UrlNew( rtsp->host, rtsp->psz_path, user, pwd );
free(user);
free(pwd);
if( rtsp->url == NULL )
@@ -258,7 +257,7 @@ rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
char *user = var_InheritString(rtsp->owner, "sout-rtsp-user");
char *pwd = var_InheritString(rtsp->owner, "sout-rtsp-pwd");
- url = id->url = httpd_UrlNewUnique( rtsp->host, urlbuf, user, pwd, NULL );
+ url = id->url = httpd_UrlNew( rtsp->host, urlbuf, user, pwd );
free( user );
free( pwd );
free( urlbuf );
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6abcb67..770740f 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -176,7 +176,7 @@ httpd_StreamNew
httpd_StreamSend
httpd_UrlCatch
httpd_UrlDelete
-httpd_UrlNewUnique
+httpd_UrlNew
image_Ext2Fourcc
image_HandlerCreate
image_HandlerDelete
diff --git a/src/missing.c b/src/missing.c
index c4d6b31..58082d9 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -183,11 +183,10 @@ void httpd_UrlDelete (httpd_url_t *url)
assert (0);
}
-httpd_url_t *httpd_UrlNewUnique (httpd_host_t *host, const char *url,
- const char *login, const char *password,
- const vlc_acl_t *acl)
+httpd_url_t *httpd_UrlNew (httpd_host_t *host, const char *url,
+ const char *login, const char *password)
{
- (void) host; (void) url; (void) login; (void) password; (void) acl;
+ (void) host; (void) url; (void) login; (void) password;
assert (0);
}
#endif /* !ENABLE_HTTPD */
diff --git a/src/network/httpd.c b/src/network/httpd.c
index cd22b91..c458fca 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -68,6 +68,9 @@
#endif
static void httpd_ClientClean( httpd_client_t *cl );
+static httpd_url_t *httpd_UrlNewPrivate( httpd_host_t *, const char *,
+ const char *, const char *,
+ const vlc_acl_t * );
/* each host run in his own thread */
struct httpd_host_t
@@ -447,9 +450,9 @@ httpd_file_t *httpd_FileNew( httpd_host_t *host,
{
httpd_file_t *file = xmalloc( sizeof( httpd_file_t ) );
- if( ( file->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ file->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( file->url == NULL )
{
free( file );
return NULL;
@@ -595,9 +598,9 @@ httpd_handler_t *httpd_HandlerNew( httpd_host_t *host, const char *psz_url,
{
httpd_handler_t *handler = xmalloc( sizeof( httpd_handler_t ) );
- if( ( handler->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ handler->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( handler->url == NULL )
{
free( handler );
return NULL;
@@ -666,7 +669,8 @@ httpd_redirect_t *httpd_RedirectNew( httpd_host_t *host, const char *psz_url_dst
{
httpd_redirect_t *rdir = xmalloc( sizeof( httpd_redirect_t ) );
- if( !( rdir->url = httpd_UrlNewUnique( host, psz_url_src, NULL, NULL, NULL ) ) )
+ rdir->url = httpd_UrlNew( host, psz_url_src, NULL, NULL );
+ if( rdir->url == NULL )
{
free( rdir );
return NULL;
@@ -849,9 +853,9 @@ httpd_stream_t *httpd_StreamNew( httpd_host_t *host,
{
httpd_stream_t *stream = xmalloc( sizeof( httpd_stream_t ) );
- if( ( stream->url = httpd_UrlNewUnique( host, psz_url, psz_user,
- psz_password, p_acl )
- ) == NULL )
+ stream->url = httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password,
+ p_acl );
+ if( stream->url == NULL )
{
free( stream );
return NULL;
@@ -1237,12 +1241,10 @@ static httpd_url_t *httpd_UrlNewPrivate( httpd_host_t *host, const char *psz_url
return url;
}
-httpd_url_t *httpd_UrlNewUnique( httpd_host_t *host, const char *psz_url,
- const char *psz_user, const char *psz_password,
- const vlc_acl_t *p_acl )
+httpd_url_t *httpd_UrlNew( httpd_host_t *host, const char *psz_url,
+ const char *psz_user, const char *psz_password )
{
- return httpd_UrlNewPrivate( host, psz_url, psz_user,
- psz_password, p_acl );
+ return httpd_UrlNewPrivate( host, psz_url, psz_user, psz_password, NULL );
}
/* register callback on a url */
More information about the vlc-commits
mailing list