summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0df94a5)
before retrieving its contents.
***********************
** FILE NAME : configuration.cpp
** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
***********************
** FILE NAME : configuration.cpp
** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
-** VERSION NUMBER : $Revision: 1.1 $
+** VERSION NUMBER : $Revision: 1.2 $
**
** DESCRIPTION : Implementation of configuration class
**
**
** DESCRIPTION : Implementation of configuration class
**
/*****************************
$Log: configuration.cpp,v $
/*****************************
$Log: configuration.cpp,v $
- Revision 1.1 2002-07-25 08:01:26 arjen
+ Revision 1.2 2002-09-28 06:48:46 arjen
+ Bugfix: In configuration::find_parameter(), check if the parameter node exists
+ before retrieving its contents.
+
+ Revision 1.1 2002/07/25 08:01:26 arjen
First checkin, AXE release 0.2
*****************************/
First checkin, AXE release 0.2
*****************************/
-static const char *RCSID = "$Id: configuration.cpp,v 1.1 2002-07-25 08:01:26 arjen Exp $";
+static const char *RCSID = "$Id: configuration.cpp,v 1.2 2002-09-28 06:48:46 arjen Exp $";
#include "configuration.h"
#include "configuration.h"
if (system != NULL)
{
root = xmlDocGetRootElement(system);
if (system != NULL)
{
root = xmlDocGetRootElement(system);
- if (app_name != (char *)root->name)
+ if (app_name != (const char *)root->name)
- cerr << "Wrong config file.\n";
+ std::cerr << "Wrong config file.\n";
xmlFreeDoc(system);
system = NULL;
}
xmlFreeDoc(system);
system = NULL;
}
if (user != NULL)
{
root = xmlDocGetRootElement(user);
if (user != NULL)
{
root = xmlDocGetRootElement(user);
- if (app_name != (char *)root->name)
+ if (app_name != (const char *)root->name)
- cerr << "Wrong config file.\n";
+ std::cerr << "Wrong config file.\n";
xmlFreeDoc(user);
user = NULL;
}
xmlFreeDoc(user);
user = NULL;
}
if (section_node != NULL)
{
param_node = xmlFindTag(section_node->childs, parameter);
if (section_node != NULL)
{
param_node = xmlFindTag(section_node->childs, parameter);
- param_node = param_node->childs;
+ if (param_node != NULL)
+ {
+ param_node = param_node->childs;
+ }
if (param_node != NULL)
{
param_value = (char *)param_node->content;
if (param_node != NULL)
{
param_value = (char *)param_node->content;