From 78c5ff376dd37462fad9a2194e4ee4931dcbc473 Mon Sep 17 00:00:00 2001 From: Dmitri Pal Date: Tue, 24 Feb 2009 17:49:02 -0500 Subject: Fixing unittest. Fininshing with submit to syslog. --- ini/elapi_ini.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ini') 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 #include #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,§ion_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; -- cgit