summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-14 21:36:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-14 21:36:14 +0000
commit4482876dd3d7d4e6f06ac43dcdbe98db04512ab2 (patch)
tree0a38baae4a638e1bc7ac7e3cac42e453c6404469
parenta3de29f341a1a7e057d248686a9a9170ac67f466 (diff)
Tidyup and tons of debug in here, to troubleshoot an ongoing issue with gcc3.3 and what seems like a stack corruption
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5743 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index b1fbea0f8..d71a504eb 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -714,22 +714,22 @@ void ServerConfig::Read(bool bail, userrec* user)
*/
for (int Index = 0; Values[Index].tag; Index++)
{
- int* val_i = (int*) Values[Index].val;
- char* val_c = (char*) Values[Index].val;
-
switch (Values[Index].datatype)
{
case DT_CHARPTR:
/* Assuming MAXBUF here, potentially unsafe */
- ConfValue(this->config_data, Values[Index].tag, Values[Index].value, 0, val_c, MAXBUF);
+ ConfValue(this->config_data, Values[Index].tag, Values[Index].value, 0, ((char*)Values[Index].val), MAXBUF);
+ ServerInstance->Log(DEBUG,"Data type DT_CHARPTR item <%s:%s> = '%s'", Values[Index].tag, Values[Index].value, ((char*)Values[Index].val));
break;
case DT_INTEGER:
- ConfValueInteger(this->config_data, Values[Index].tag, Values[Index].value, 0, *val_i);
+ ConfValueInteger(this->config_data, Values[Index].tag, Values[Index].value, 0, *((int*)Values[Index].val));
+ ServerInstance->Log(DEBUG,"Data type DT_CHARPTR item <%s:%s> = '%d'", Values[Index].tag, Values[Index].value, *((int*)Values[Index].val));
break;
case DT_BOOLEAN:
- *val_i = ConfValueBool(this->config_data, Values[Index].tag, Values[Index].value, 0);
+ *((bool*)(Values[Index].val)) = (ConfValueBool(this->config_data, Values[Index].tag, Values[Index].value, 0));
+ ServerInstance->Log(DEBUG,"Data type DT_CHARPTR item <%s:%s> = '%d'", Values[Index].tag, Values[Index].value, *((bool*)(Values[Index].val)));
break;
case DT_NOTHING:
@@ -793,7 +793,7 @@ void ServerConfig::Read(bool bail, userrec* user)
// write once here, to try it out and make sure its ok
ServerInstance->WritePID(this->PID);
- ServerInstance->Log(DEFAULT,"Done reading configuration file, InspIRCd is now starting.");
+ ServerInstance->Log(DEFAULT,"Done reading configuration file.");
/* If we're rehashing, let's load any new modules, and unload old ones
*/