Commit 0a34d599 authored by Marc Ariberti's avatar Marc Ariberti

* when vlanbridge support is compiled and nothing specified in the

config file, vlanserver returns an error message, stops and do not segfault
parent d8dc24b6
......@@ -3,7 +3,7 @@
* Generate a parser for the config file
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: config.fl,v 1.24 2001/10/26 23:16:10 marcari Exp $
* $Id: config.fl,v 1.25 2001/11/12 17:30:42 marcari Exp $
*
* Authors: Brieuc Jeunhomme <bbp@via.ecp.fr>
*
......@@ -1167,6 +1167,16 @@ ERR_CODE CFG_init(struct VS_config *cfg,int argc,char *argv[])
VS_log(LOGERROR,CFG,"Unable to open %s",filepath);
return VS_R_FILE;
}
#ifdef VLB
if ((cfg->vlanbridge==NULL)||(cfg->vlanbridge==NULL)||(cfg->vlanbridge==NULL))
{
VS_log(LOGERROR,CFG,"Vlanbridge support compiled, "
"but bad configuration file");
return VS_R_BAD_CONFIG;
}
#endif
if (fclose(CFG_yyin))
VS_log(LOGERROR,CFG,"An error occured while closing %s, still going on",\
filepath);
......
......@@ -3,7 +3,7 @@
* Print a log to a file or to screen
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: logger.c,v 1.22 2001/10/24 15:03:16 gunther Exp $
* $Id: logger.c,v 1.23 2001/11/12 17:30:42 marcari Exp $
*
* Authors: Damien Lucas <nitrox@via.ecp.fr>
* Marc Ariberti <marcari@via.ecp.fr>
......@@ -648,6 +648,7 @@ char * VS_log_errstr(ERR_CODE err)
"object not found",
"trying to do a walk on a switch is currently walked by an other thread",
"the authentification failed",
"bad configuration file",
"unable to bind a socket",
"unable to connect to remote host",
"unable to stop the database",
......
......@@ -4,7 +4,7 @@
* Provide all typedefs
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: types.h,v 1.23 2001/11/12 15:46:09 gunther Exp $
* $Id: types.h,v 1.24 2001/11/12 17:30:42 marcari Exp $
*
* Authors:
*
......@@ -62,6 +62,7 @@ typedef enum {VS_R_OK,
VS_R_ABSENT,
VS_R_ALREADY_WALKING,
VS_R_AUTH_FAILURE,
VS_R_BAD_CONFIG,
VS_R_BIND,
VS_R_CONNECT,
VS_R_DB_STOP,
......
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