summaryrefslogtreecommitdiffstats
path: root/ini
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-02-24 17:49:02 -0500
committerDmitri Pal <dpal@redhat.com>2009-02-24 17:49:02 -0500
commit78c5ff376dd37462fad9a2194e4ee4931dcbc473 (patch)
treecc99f4c16be76362f0b934cea688fd5a21d0a6de /ini
parent27d15caafe401160fcc62829a3460a52cd45d429 (diff)
downloadelapi_draft-78c5ff376dd37462fad9a2194e4ee4931dcbc473.tar.gz
elapi_draft-78c5ff376dd37462fad9a2194e4ee4931dcbc473.tar.xz
elapi_draft-78c5ff376dd37462fad9a2194e4ee4931dcbc473.zip
Fixing unittest. Fininshing with submit to syslog.
Diffstat (limited to 'ini')
-rw-r--r--ini/elapi_ini.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ini/elapi_ini.c b/ini/elapi_ini.c
index ed6b4c7..52af8dc 100644
--- a/ini/elapi_ini.c
+++ b/ini/elapi_ini.c
@@ -6,8 +6,9 @@
#include <ctype.h>
#include <stdlib.h>
#include "elapi_collection.h"
-#include "elapi_debug.h"
#include "elapi_ini.h"
+#include "elapi_tools.h"
+#include "elapi_debug.h"
/* STATIC INTERNAL FUNCTIONS */
@@ -526,7 +527,12 @@ int ini_to_collection(char *filename, struct collection_item *ini_config)
/* Close file */
fclose(file);
+
+ DEBUG_COLLECTION(ini_config);
+
destroy_collection(current_section);
+
+ DEBUG_COLLECTION(ini_config);
DEBUG_STRING("ini_to_collection", "Success Exit");
@@ -602,6 +608,9 @@ int get_value_from_config(void *value,
if(section == NULL) to_find = default_section;
else to_find = section;
+ DEBUG_STRING("Getting Name:", name);
+ DEBUG_STRING("In Section:", section);
+
/* Get Subcollection */
error = get_collection_reference(ini_config,&section_handle,to_find);
if(section_handle == (struct collection_item *)(NULL)) {
@@ -611,7 +620,7 @@ int get_value_from_config(void *value,
}
/* If we have the section then get the data */
- error = get_item_and_do(ini_config, name,type, ELAPI_TRAVERSE_ONELEVEL, value_extractor, value);
+ error = get_item_and_do(section_handle, name,type, ELAPI_TRAVERSE_ONELEVEL, value_extractor, value);
DEBUG_STRING("get_value_from_config", "Exit");
return error;