Commit 501fadff authored by Marc Ariberti's avatar Marc Ariberti

Corrected some mistakes about channels (those were segfaults roots)

Corrected a few spelling mistakes
parent 5c69dd11
......@@ -3,7 +3,7 @@
* Generate a parser for the config file
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: config.fl,v 1.23 2001/10/24 20:35:16 marcari Exp $
* $Id: config.fl,v 1.24 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Brieuc Jeunhomme <bbp@via.ecp.fr>
*
......@@ -292,7 +292,7 @@ channel{BL}{INT}{BL}vlan{BL}{INT}{BL}protection{BL}{INT} {
BEGIN(INITIAL);
eof_expected=1;
CFG_yytext[strlen(CFG_yytext)-1]='\0';
VS_log(LOGDEBUG,CFG,"Successfuly defined channel %lu on vlan "\
VS_log(LOGDEBUG,CFG,"Successfully defined channel %lu on vlan "\
"%lu protection %u %s",ul1,ul2,ui1,CFG_yytext);
}
......@@ -1173,6 +1173,6 @@ ERR_CODE CFG_init(struct VS_config *cfg,int argc,char *argv[])
if (ret)
cleanup(cfg);
else
VS_log(LOGINFO,CFG,"Setup successfuly terminated");
VS_log(LOGINFO,CFG,"Setup successfully terminated");
return ret;
}
......@@ -3,7 +3,7 @@
* database file
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: db.c,v 1.22 2001/07/01 02:02:52 tooney Exp $
* $Id: db.c,v 1.23 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Brieuc Jeunhomme <bbp@via.ecp.fr>
*
......@@ -529,7 +529,7 @@ ERR_CODE DB_start(struct DB_db * db)
}
db->runlevel=DB_RUN;
pthread_mutex_unlock(&db->db_lock);
VS_log(LOGINFO, DB, "Database engine successfuly started");
VS_log(LOGINFO, DB, "Database engine successfully started");
return 0;
}
......
......@@ -85,7 +85,7 @@ last, the linux VLAN project enables to do so with most common NICs.
So let's start with our tricks.
The solution that has been sucessfuly experimented by the VideoLAN team is to
The solution that has been sucessfully experimented by the VideoLAN team is to
have a host connected to each VLAN, which transmits IP datagrams between VLANs
when needed. Such a host is called a VLAN bridge. The VLAN bridge's code is not
released yet, but it is available from the CVS.
......
......@@ -3,7 +3,7 @@
* Main functions that are use by interfaces
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: interface.c,v 1.15 2001/10/08 16:37:57 gunther Exp $
* $Id: interface.c,v 1.16 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Damien Lucas <nitrox@via.ecp.fr>
*
......@@ -425,7 +425,7 @@ ERR_CODE IF_Auth(char* sUser, char* sPasswd)
/*
* At this point, authentification is ok
*/
VS_log(LOGINFO,TELNET, "User %s, login sucessful", sUser);
VS_log(LOGINFO,TELNET, "User %s, login successful", sUser);
return VS_R_OK;
......
......@@ -3,7 +3,7 @@
* Functions to communicate with the vlanbridge
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: connect.c,v 1.14 2001/10/24 20:35:16 marcari Exp $
* $Id: connect.c,v 1.15 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Brieuc Jeunhomme <bbp@via.ecp.fr>
*
......@@ -111,7 +111,7 @@ unsigned int CNX_vlb_set_vlan(unsigned int session_id,
if (i==j)
{
VS_log(LOGDEBUG, SERVER, "Request (%u) to change %s %s from VS_VLAN %u to"\
" %u successfuly sent to VLANbridge",session_id, IP, MAC,\
" %u successfully sent to VLANbridge",session_id, IP, MAC,\
(unsigned int)VLANsrc, (unsigned int)VLANdest);
return 0;
}
......@@ -181,7 +181,7 @@ unsigned int CNX_vlb_login(char * version)
VS_log(LOGERROR, SERVER, "Unable to close the socket for the VLB");
return VS_R_CONNECT;
}
VS_log(LOGINFO, SERVER, "Successfuly connected to VLANbridge");
VS_log(LOGINFO, SERVER, "Successfully connected to VLANbridge");
VS_log(LOGDEBUG, SERVER, "Sending string to VLANbridge: %s", message);
i=send(k, message, j, 0);
......
......@@ -3,7 +3,7 @@
* Function to order SNMP init of switches
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: poll_switch.c,v 1.18 2001/10/24 15:03:16 gunther Exp $
* $Id: poll_switch.c,v 1.19 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Laurent Rosier <gunther@via.ecp.fr>
* Damien Lucas <nitrox@via.ecp.fr>
......@@ -79,8 +79,8 @@ ERR_CODE VS_switch_init(struct VS_switches * list_switch)
{
if(list_switch->zwitch[iter]->ports[k].vlan_struct == NULL)
{
VS_log(LOGWARNING,SERVER,"The port %u of the switch %u is in no vlan",
k,iter);
VS_log(LOGWARNING,SERVER,"The port %u of the switch %s is in no vlan",
k,list_switch->zwitch[iter]->s2.peername);
}
for(vlanLoop = list_switch->zwitch[iter]->ports[k].vlan_struct;
vlanLoop != NULL;
......
......@@ -3,7 +3,7 @@
* Functions to handle a request from client
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: request_handler.c,v 1.31 2001/10/24 20:35:16 marcari Exp $
* $Id: request_handler.c,v 1.32 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Laurent Rossier <gunther@via.ecp.fr>
*
......@@ -171,20 +171,18 @@ ERR_CODE VS_request_handler(struct VS_info_client * info_client)
* But before, we send to the client the new information
* (server, method, TCP port, ...)
*/
vlan_dest=ChannelToVlan(*(vs->cfg), channel_dest);
if(uType == 0)
if(channel_dest<vs->cfg->nchannels)
{
sendto(iSocket, vs->cfg->chan_map[vlan_dest].raw_data,
strlen(vs->cfg->chan_map[vlan_dest].raw_data)+1, 0,
(struct sockaddr *)(&sa_client), sizeof(struct sockaddr));
}
vlan_dest=ChannelToVlan(*(vs->cfg), channel_dest);
if(uType == 0)
{
sendto(iSocket, vs->cfg->chan_map[channel_dest].raw_data,
strlen(vs->cfg->chan_map[channel_dest].raw_data)+1, 0,
(struct sockaddr *)(&sa_client), sizeof(struct sockaddr));
}
if(zwitch->ports[machines_elt->port].protection<VS_PL_VIDEOLAN)
{
/* FIXME test here channel_dest
*/
if(channel_dest<vs->cfg->nchannels)
if(zwitch->ports[machines_elt->port].protection<VS_PL_VIDEOLAN)
{
for(vlanLoop=zwitch->ports[machines_elt->port].vlan_struct;
vlanLoop!=NULL;
......@@ -398,13 +396,13 @@ ERR_CODE VS_request_handler(struct VS_info_client * info_client)
vlanLoop!=NULL;
vlanLoop=vlanLoop->next)
{
VS_log(LOGDEBUG,SERVER,"vlan %hi whith the type %i",
VS_log(LOGDEBUG,SERVER,"vlan %hi with the type %i",
vlanLoop->vlan,vlanLoop->vlanType);
}
/* Changing the DB entry */
machines_elt->channel=channel_dest;
VS_log(LOGINFO, SERVER, "suceed to change client's channel");
VS_log(LOGINFO, SERVER, "succeed to change client's channel");
}
else
{
......@@ -419,21 +417,21 @@ ERR_CODE VS_request_handler(struct VS_info_client * info_client)
}
else
{
VS_log(LOGERROR,SERVER,"Bad channel dest from client, %hhu",
channel_dest);
/* Failed because of permission */
VS_log(LOGWARNING,SERVER,"Permission denied to change the VLAN of a "\
"protected port");
sprintf(sMessage, "You are not allowed to change the VLAN of this "\
"port : it is protected.");
VS_send(uType, iSocket, sa_client, sMessage);
}
DB_switchs_port_unlock(vs->db, port);
}
else
{
/* Failed because of permission */
VS_log(LOGWARNING,SERVER,"Permission denied to change the VLAN of a "\
"protected port");
sprintf(sMessage, "You are not allowed to change the VLAN of this "\
"port : it is protected.");
VS_send(uType, iSocket, sa_client, sMessage);
VS_log(LOGERROR,SERVER,"Bad channel dest from client, %hhu",
channel_dest);
}
DB_switchs_port_unlock(vs->db, port);
}
else
{
......
......@@ -4,7 +4,7 @@
* snmp_timeout
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: callback.c,v 1.18 2001/10/08 16:37:57 gunther Exp $
* $Id: callback.c,v 1.19 2001/10/26 23:16:10 marcari Exp $
*
* Authors: Damien Lucas <nitrox@via.ecp.fr>
*
......@@ -500,7 +500,7 @@ inline static unsigned int Callback_Portid(struct snmp_session *session,
!(zwitch->ports[i].flags&PF_UNUSEDPORT))
{
/* Consider here init failed */
VS_log(LOGERROR,SNMP,"Switch %s init: Walk on PORTids failed # %u /nbporst : %u - %u",\
VS_log(LOGERROR,SNMP,"Switch %s init: Walk on PORTids failed # %u /nbports : %u - %u",\
zwitch->s2.peername,i,zwitch->nb_ports,zwitch->unit);
SNMP_get_portids(vs->snmp,zwitch);
return 3;
......
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