Fix an issue where building with DEBUG_FD_LEAKS enabled would not work due to sorcery...
authorJoshua Colp <jcolp@digium.com>
Tue, 29 Jan 2013 20:19:28 +0000 (20:19 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 29 Jan 2013 20:19:28 +0000 (20:19 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380407 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/sorcery.c
tests/test_sorcery.c

index ca7efb0..bed4d85 100644 (file)
@@ -39,6 +39,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/netsock2.h"
 #include "asterisk/module.h"
 
+/* To prevent DEBUG_FD_LEAKS from interfering with things we undef open and close */
+#undef open
+#undef close
+
 /*! \brief Number of buckets for wizards (should be prime for performance reasons) */
 #define WIZARD_BUCKETS 7
 
index 66dce34..cf53b19 100644 (file)
@@ -195,7 +195,7 @@ AST_TEST_DEFINE(wizard_registration)
        return AST_TEST_PASS;
 }
 
-AST_TEST_DEFINE(open)
+AST_TEST_DEFINE(sorcery_open)
 {
        RAII_VAR(struct ast_sorcery *, sorcery, NULL, ast_sorcery_unref);
 
@@ -1937,7 +1937,7 @@ AST_TEST_DEFINE(configuration_file_wizard_retrieve_multiple_all)
 static int unload_module(void)
 {
        AST_TEST_UNREGISTER(wizard_registration);
-       AST_TEST_UNREGISTER(open);
+       AST_TEST_UNREGISTER(sorcery_open);
        AST_TEST_UNREGISTER(apply_default);
        AST_TEST_UNREGISTER(apply_config);
        AST_TEST_UNREGISTER(object_register);
@@ -1976,7 +1976,7 @@ static int unload_module(void)
 static int load_module(void)
 {
        AST_TEST_REGISTER(wizard_registration);
-       AST_TEST_REGISTER(open);
+       AST_TEST_REGISTER(sorcery_open);
        AST_TEST_REGISTER(apply_default);
        AST_TEST_REGISTER(apply_config);
        AST_TEST_REGISTER(object_register);