summaryrefslogtreecommitdiff
path: root/src/common/conf.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-28 14:40:54 -0200
committershennetsind <ind@henn.et>2013-11-28 14:40:54 -0200
commit3a269dca93c421141631b4c87b2f366b6c130a42 (patch)
tree338da9b8a0073038ca2c777a879903d8846c6a9a /src/common/conf.c
parent3c8e2e97243866b0a650002d59fdf2435874fd9a (diff)
downloadhercules-3a269dca93c421141631b4c87b2f366b6c130a42.tar.gz
hercules-3a269dca93c421141631b4c87b2f366b6c130a42.tar.bz2
hercules-3a269dca93c421141631b4c87b2f366b6c130a42.tar.xz
hercules-3a269dca93c421141631b4c87b2f366b6c130a42.zip
Fixed conf inheritance issue
Special Thanks to bgamez23, kyeme. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/conf.c')
-rw-r--r--src/common/conf.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/common/conf.c b/src/common/conf.c
index 6802f728b..a6329d70e 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "conf.h"
#include "../../3rdparty/libconfig/libconfig.h"
@@ -32,9 +33,12 @@ void config_setting_copy_simple(config_setting_t *parent, const config_setting_t
config_setting_copy_aggregate(parent, src);
}
else {
- config_setting_t *set = config_setting_add(parent, config_setting_name(src), config_setting_type(src));
-
- if (set == NULL)
+ config_setting_t *set;
+
+ if( config_setting_get_member(parent, config_setting_name(src)) != NULL )
+ return;
+
+ if ((set = config_setting_add(parent, config_setting_name(src), config_setting_type(src))) == NULL)
return;
if (CONFIG_TYPE_INT == config_setting_type(src)) {