* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "http.h"
TAB_APPEND( p_sys->i_handlers, p_sys->pp_handlers, p_handler );
}
}
- if( psz_src != NULL )
- free( psz_src );
+ free( psz_src );
#endif
/* determine SSL configuration */
if( ( psz_src == NULL ) || ( *psz_src == '\0' ) )
{
- static char const* ppsz_paths[] = {
+ const char *data_path = config_GetDataDir ();
+ char buf[strlen (data_path) + sizeof ("/http")];
+ snprintf (buf, sizeof (buf), "%s/http", data_path);
+
+ const char const* ppsz_paths[] = {
"share/http",
"../share/http",
- DATA_PATH"/http",
+ buf,
NULL
};
unsigned i;
- if( psz_src != NULL )
- {
- free( psz_src );
- psz_src = NULL;
- }
+ free( psz_src );
+ psz_src = NULL;
for( i = 0; ppsz_paths[i] != NULL; i++ )
if( !DirectoryCheck( ppsz_paths[i] ) )
free( p_sys->pp_files[i]->name );
free( p_sys->pp_files[i] );
}
- if( p_sys->pp_files )
- {
- free( p_sys->pp_files );
- }
+ free( p_sys->pp_files );
for( i = 0; i < p_sys->i_handlers; i++ )
{
http_association_t *p_handler = p_sys->pp_handlers[i];
uint8_t *_p_request,
uint8_t **_pp_data, int *pi_data )
{
+ VLC_UNUSED(p_file);
char *p_request = (char *)_p_request;
char **pp_data = (char **)_pp_data;
FILE *f;
char *psz_remote_addr, char *psz_remote_host,
uint8_t **_pp_data, int *pi_data )
{
+ VLC_UNUSED(p_handler); VLC_UNUSED(_p_in);
char *p_url = (char *)_p_url;
char *p_request = (char *)_p_request;
char **pp_data = (char **)_pp_data;
NULL );
TAB_REMOVE( p_args->p_association->i_argc, p_args->p_association->ppsz_argv,
psz_file );
- if( psz_cwd != NULL )
- free( psz_cwd );
+ free( psz_cwd );
while( i_env )
TAB_REMOVE( i_env, ppsz_env, ppsz_env[0] );
char *psz_remote_addr, char *psz_remote_host,
uint8_t **pp_data, int *pi_data )
{
+ VLC_UNUSED(p_handler); VLC_UNUSED(_p_url); VLC_UNUSED(i_type);
+ VLC_UNUSED(p_in); VLC_UNUSED(i_in); VLC_UNUSED(psz_remote_addr);
+ VLC_UNUSED(psz_remote_host);
+
char *psz_art = NULL;
intf_thread_t *p_intf = p_args->file.p_intf;
intf_sys_t *p_sys = p_intf->p_sys;