Commit af3dd2cf authored by Laurent Aimar's avatar Laurent Aimar

* httpd: fix a segfault.

parent 21c3df33
......@@ -2,7 +2,7 @@
* httpd.c
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.c,v 1.23 2003/07/10 22:24:09 fenrir Exp $
* $Id: httpd.c,v 1.24 2003/07/10 22:37:02 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -953,7 +953,7 @@ static void httpd_info_add_ss( httpd_info_t *p_info, char *name, char *value )
sizeof( httpd_val_t ) * ( p_info->i_count + 1 ) );
}
p_info->info[p_info->i_count].psz_name = strdup( name );
p_info->info[p_info->i_count].psz_value = strdup( value );
p_info->info[p_info->i_count].psz_value = strdup( value ? value : "(null)");
p_info->i_count++;
}
......@@ -1028,6 +1028,8 @@ static int Control( httpd_t *p_httpd,
p_info->i_count = 0;
/* we can't take lock */
for( p_con = p_httpt->p_first_connection;p_con != NULL; p_con = p_con->p_next )
{
if( p_con->i_state != HTTPD_CONNECTION_TO_BE_CLOSED )
{
httpd_info_add_sp( p_info,
"id", p_con );
......@@ -1038,6 +1040,7 @@ static int Control( httpd_t *p_httpd,
httpd_info_add_si( p_info,
"status", p_con->i_http_error );
}
}
return VLC_SUCCESS;
case HTTPD_GET_ACL:
p_info = arg1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment