diff --git a/src/include/switch_xml_config.h b/src/include/switch_xml_config.h index 8d0f15f57b..3f9bdb92fb 100644 --- a/src/include/switch_xml_config.h +++ b/src/include/switch_xml_config.h @@ -77,9 +77,9 @@ struct switch_xml_config_item { } ; -#define SWITCH_CONFIG_ITEM (_key, _type, _reloadable, _ptr, _defaultvalue, _data) { _key, _type, _reloadable, _ptr, _defaultvalue, _data, NULL, NULL } -#define SWITCH_CONFIG_ITEM_CALLBACK (_key, _type, _reloadable, _ptr, _defaultvalue, _data, _functiondata) { _key, _type, _reloadable, _ptr, _defaultvalue, _data, _functiondata } -#define SWITCH_CONFIG_ITEM_END () { NULL, SWITCH_CONFIG_LAST, 0, NULL ,NULL, NULL, NULL } +#define SWITCH_CONFIG_ITEM(_key, _type, _reloadable, _ptr, _defaultvalue, _data) { _key, _type, _reloadable, _ptr, _defaultvalue, _data, NULL, NULL } +#define SWITCH_ITEM_CALLBACK(_key, _type, _reloadable, _ptr, _defaultvalue, _data, _functiondata) { _key, _type, _reloadable, _ptr, _defaultvalue, _data, _functiondata } +#define SWITCH_CONFIG_ITEM_END() { NULL, SWITCH_CONFIG_LAST, 0, NULL ,NULL, NULL, NULL } /*! * \brief Parses all the xml elements, following a ruleset defined by an array of switch_xml_config_item_t diff --git a/src/switch_xml_config.c b/src/switch_xml_config.c index b146d139a7..ffd82583e2 100644 --- a/src/switch_xml_config.c +++ b/src/switch_xml_config.c @@ -30,7 +30,7 @@ * */ -//#define SWITCH_XML_CONFIG_TEST +#define SWITCH_XML_CONFIG_TEST #include @@ -211,7 +211,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse(switch_xml_t xml, int re } -#if SWITCH_XML_CONFIG_TEST +#ifdef SWITCH_XML_CONFIG_TEST typedef enum { MYENUM_TEST1 = 1, MYENUM_TEST2 = 2, @@ -243,7 +243,7 @@ SWITCH_DECLARE(void) switch_xml_config_test() switch_xml_config_item_t instructions[] = { SWITCH_CONFIG_ITEM("db_host", SWITCH_CONFIG_STRING, SWITCH_TRUE, &globals.stringalloc, "blah", &config_opt_stringalloc), SWITCH_CONFIG_ITEM("db_user", SWITCH_CONFIG_STRING, SWITCH_TRUE, globals.string, "dflt", &config_opt_buffer ), - SWITCH_CONFIG_ITEM("test", SWITCH_CONFIG_ENUM, SWITCH_FALSE, &globals.enumm, (void*)MYENUM_TEST1, enumm_options ), + SWITCH_CONFIG_ITEM("test", SWITCH_CONFIG_ENUM, SWITCH_FALSE, &globals.enumm, (void*)MYENUM_TEST1, enumm_options), SWITCH_CONFIG_ITEM_END() };