* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#ifdef ENABLE_HTTPD
psz_connection = httpd_MsgGet( &cl->query, "Connection" );
if( psz_connection != NULL )
{
- httpd_MsgAdd( answer, "Connection", psz_connection );
+ httpd_MsgAdd( answer, "Connection", "%s", psz_connection );
}
httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );
return file;
}
-void httpd_FileDelete( httpd_file_t *file )
+httpd_file_sys_t *httpd_FileDelete( httpd_file_t *file )
{
+ httpd_file_sys_t *p_sys = file->p_sys;
+
httpd_UrlDelete( file->url );
free( file->psz_url );
free( file->psz_mime );
free( file );
+
+ return p_sys;
}
/*****************************************************************************
return handler;
}
-void httpd_HandlerDelete( httpd_handler_t *handler )
+httpd_handler_sys_t *httpd_HandlerDelete( httpd_handler_t *handler )
{
+ httpd_handler_sys_t *p_sys = handler->p_sys;
httpd_UrlDelete( handler->url );
free( handler );
+ return p_sys;
}
/*****************************************************************************
goto error;
vlc_object_lock( host );
- if( vlc_object_waitpipe( host ) == -1 )
+ if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 )
{
+ msg_Err( host, "signaling pipe error: %m" );
vlc_object_unlock( host );
goto error;
}
counter_t *p_total_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
counter_t *p_active_counter = stats_CounterCreate( host, VLC_VAR_INTEGER, STATS_COUNTER );
int evfd;
- vlc_bool_t b_die = VLC_FALSE;
+ vlc_bool_t b_die;
vlc_object_lock( host );
- evfd = vlc_object_waitpipe( host );
+ evfd = vlc_object_waitpipe( VLC_OBJECT( host ) );
+ b_die = !vlc_object_alive( host );
vlc_object_unlock( host );
while( !b_die )
{
httpd_client_t *cl;
int i_state = -1;
+ int fd = ufd[nfd].fd;
- assert (ufd[nfd].fd == host->fds[nfd]);
+ assert (fd == host->fds[nfd]);
if( ufd[nfd].revents == 0 )
continue;
/* */
- int kludge[] = { ufd[nfd].fd, -1 };
- int fd = net_Accept( host, kludge, 0 );
- if( fd < 0 )
+ fd = accept (fd, NULL, NULL);
+ if (fd == -1)
continue;
+ net_SetupSocket (fd);
if( p_tls != NULL )
{
switch( tls_ServerSessionHandshake( p_tls, fd ) )