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 );
vlc_object_lock( host );
if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 )
{
+ msg_Err( host, "signaling pipe error: %m" );
vlc_object_unlock( host );
goto error;
}
vlc_object_lock( host );
evfd = vlc_object_waitpipe( VLC_OBJECT( host ) );
- b_die = vlc_object_alive( 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 ) )